News for hackers. Stuff that matters.
Re:Widdler is a single binary that serves up TiddlyWikis by mark_l_watson on Sunday December 05, 2021 @10:28AM (#29449953)
Wow, that is just 357 lines of Go code. So much of my work life is using complex systems in AWS and GCP that are beyond my ability to understand “turtles all the way down.” It is refreshing to see something so simple and focused on one thing. In the early days of Ruby on Rails, I had the source code to Ruby and for Ruby on Rails on my laptop and it was all fairly readable. Those days are long gone.
Re:Widdler is a single binary that serves up TiddlyWikis by skybrian on Sunday December 05, 2021 @12:18PM (#29450842)
The trick seems to be that all the complexity is in the html file and runs in the browser. The server is just a basic WebDAV server.

It looks like the entire wiki implementation is copied to a new file when you create a new wiki page. It's a 2.3 MB file, which seems like a lot to download when you visit a new page.

Re:Widdler is a single binary that serves up TiddlyWikis by mch82 on Sunday December 05, 2021 @12:53PM (#29451135)
Each HTML file is a complete wiki instance. The wiki code and data for all pages within the wiki are bundled in that file. The code let’s the webpage edit itself.
Re:Widdler is a single binary that serves up TiddlyWikis by Abishek_Muthian on Monday December 06, 2021 @02:36AM (#29457193)
> It's a 2.3 MB file, which seems like a lot to download when you visit a new page.

It is, But I feel it's still better than what ever framework they're using nowadays to generate doc/wiki for APIs which hijacks Ctrl-F with a useless pop-up which rarely gets me what I need[1]. Please bring back plain HTML document pages.

[1] https://stripe.com/docs/api

Re:Widdler is a single binary that serves up TiddlyWikis by dTal on Sunday December 05, 2021 @03:50PM (#29453102)
I don't get it. Why is it making me compile a Go webserver then? There aren't even binaries provided.
Re:Widdler is a single binary that serves up TiddlyWikis by detaro on Sunday December 05, 2021 @04:28PM (#29453477)
So you can save the modified file on the server.
Re:Widdler is a single binary that serves up TiddlyWikis by hwers on Sunday December 05, 2021 @11:51AM (#29450620)
It's a weird phenomenon though since even though ruby on rails was readible in a small code base, it was still building on top of a ton of abstractions that hid lower detail. It makes me think that we're just failing to build clean good abstractions that make coding for cloud as beautiful as it could be.
Re:Widdler is a single binary that serves up TiddlyWikis by halfdan on Sunday December 05, 2021 @12:20PM (#29450855)
The difference between Rails and AWS however is that you can inspect the former and understand all its underpinnings whereas AWS is almost entirely proprietary and your experience with their services entirely depends on what services you select.
Re:Widdler is a single binary that serves up TiddlyWikis by fartcannon on Sunday December 05, 2021 @10:53AM (#29450146)
Like using the command line, its all so flexible, dynamic and powerful while being small and understandable. It was possibly my favourite part of learning to use Linux 20 years ago.
Re:Widdler is a single binary that serves up TiddlyWikis by lanstin on Sunday December 05, 2021 @02:18PM (#29452099)
i keep the code for CPython, Go, terraform and the terraform providers i use checked out. It is still useful and educational to read source code. i confess i only rarely check out the kernel or glibc code. kernel code is good but usually not the issue glibc has the tendency to make me mad.
Re:Widdler is a single binary that serves up TiddlyWikis by orf on Sunday December 05, 2021 @11:23AM (#29450396)
Does that LOC count include dependencies?
Re:Widdler is a single binary that serves up TiddlyWikis by monsieurbanana on Sunday December 05, 2021 @11:49AM (#29450603)
If you want to make something from scratch, you must first invent the universe.

Anyway, I wouldn't count the kind of simple, focused libraries dependencies Widdler relies on as additional LOC.

As a rule of thumb, if it's something that wouldn't make me blink an eye if I found it was in the python stdlib, it gets a pass from me. Only the webdav library might not fit this.

This is subjective, of course. If anyone has a better heuristic for this, I'm all ears.

Re:Widdler is a single binary that serves up TiddlyWikis by branko_d on Sunday December 05, 2021 @11:33PM (#29456195)
“If you wish to make an apple pie from scratch, you must first invent the universe” - Carl Sagan.
Re:Widdler is a single binary that serves up TiddlyWikis by kenniskrag on Sunday December 05, 2021 @12:11PM (#29450774)
There are only native packages + 1 external packages suah.dev/protect.
Re:Widdler is a single binary that serves up TiddlyWikis by IceWreck on Sunday December 05, 2021 @02:58PM (#29452507)
Looks like the package in question only has packages from the Go project itself.

The only external dependency is OpenBSD specific and used on that operating system only.

Re:Widdler is a single binary that serves up TiddlyWikis by evilDagmar on Sunday December 05, 2021 @05:50PM (#29454160)
That really seems like a lot of code just to do the job of cp.

Perhaps their time would be better spent thinking up some way to prevent a TiddlyWiki from becoming a wormable nightmare.

Re:Widdler is a single binary that serves up TiddlyWikis by the_qbit on Sunday December 05, 2021 @07:47PM (#29454923)
Na, cp doesn’t cut it :p - if it was that trivial of a task I wouldn’t have taken the time to write it!

Thanks for your opinion on where my time is better spent though, I don’t know what I was thinking.. building a tool to solve a problem I had and releasing it completely free of charge! I’ll know better next time!