Die Medien in diesem Beitrag werden Besuchern nicht angezeigt. Um sie anzusehen, gehe bitte zum Originalbeitrag.
Remember the "One Laptop Per Child" project, that developed a low-cost computer for children in developing countries? I was always amazed by a certain feature: The "View Source" button.
When you pressed it, the source code for the currently running application would open. This was supposed to encourage tinkering with the software on your device! ❤
I've been pondering what it would take to build that button on modern machines. Has anyone seen something like that?
(Prototype in next toot.)
teilten dies erneut
Klaus Frank
Als Antwort auf blinry • • •Haelwenn /элвэн/
Als Antwort auf Klaus Frank • • •dwardoric
Als Antwort auf blinry • • •blinry
Als Antwort auf blinry • • •You'd roughly need to:
- Figure out which program is currently focused
- Figure out the Git repo of this software
- Clone it into a temporary directory
- Set up the required tools to start hacking on it and compile it
As a quick prototype, I wrote a li'l Bash script that does some of these things. It makes heavy use of #nix and #nixpkgs:
codeberg.org/blinry/view-sourc…
I enters a "dev shell" with the required tools already in the PATH, and even sets up a Git remote to start contributing. :D
view-source-button
Codeberg.orgKlaus Frank
Als Antwort auf blinry • • •Or have the entire system built around being interpreted like Python or C#. Maybe C# would even be a better option as it's JIT compiler is better in my eyes. And it integrates better with that XML based GUI definition language Microsoft had.
Edit: WPF XAML was it.
blinry
Als Antwort auf blinry • • •So if you've been wondering why I'm into obscure bugs this week like:
- Figuring out why I'm missing icons in pavucontrol chaos.social/@blinry/116081436…
- Improving the man page of a Nix CLI helper github.com/nix-community/nh/pu…
- Reporting broken shortcuts in the Firefox DevTools bugzilla.mozilla.org/show_bug.…
… it was testcases for tying out this "View Source Button". :P
docs: Move mention of formats for --keep-since to argument itself by blinry · Pull Request #568 · nix-community/nh
GitHubblinry
2026-02-16 17:15:49
blinry
Als Antwort auf blinry • • •It's been fun, it feels like a new superpower to "quickly fix something and send a PR". It's also a super dangerous rabbit hole generator, because now that it's easy to fix stuff, it's very tempting to do so… 🐇
My prototype has some rough edges:
It clones the latest commit, which doesn't always compile using the #nixpkgs setup (but it seems reasonable to check whether the bug is still there).
And invoking the phases of the nixpkgs stdenv manually can be tricky. nixos.org/manual/nixpkgs/stabl…
stable
nixos.orgdwardoric
Als Antwort auf blinry • • •blinry
Als Antwort auf blinry • • •For myself, ideally, the script would set up a #Nix flake with all dependencies in it, and activate it using direnv. Which would probably mean transforming the nixpkgs package into a flake?
The script could also give you some aliases to run the nixpkgs phases like configure, patch, or build, from your current shell – I like using the fish shell, but the stdenv assumes bash. I haven't found a reasonable way to invoke the phases "in a subshell"… Getting errors like this: github.com/NixOS/nix/issues/15…
nix develop --unpack fails with "read-only" error · Issue #15282 · NixOS/nix
blinry (GitHub)Quincy ⁂
Als Antwort auf blinry • • •ShadSterling
Als Antwort auf blinry • • •benrutter
Als Antwort auf blinry • • •This is such an awesome idea! When I read your first toot I thought immediately "that'd be near impossible for non-interpetted language programmes" but I love this because you've converted it into essentially a search problem!
Such a clever way to take stuff from "almost impossible" to "super achievable" almost instantly!
Max
Als Antwort auf blinry • • •Sensitiver Inhalt
blinry
Als Antwort auf Max • • •Sensitiver Inhalt
Gina Häußge
Als Antwort auf blinry • • •Sensitiver Inhalt
Benjamin Braatz
Als Antwort auf blinry • • •Not sure if I'm thinking too complicated here, but doesn't it get ever more complicated what exactly to show there?
If I'm currently looking at a web app that shows some data retrieved from a server-side backend in a browser whose UI is written in (say) Python calling one of the dominant rendering engines and one of the dominant Javascript engines, which of the sources do I show on “View Source”?
It could be anything from the operating system kernel via the CPython or the Javascript runtime to the web app or its server-side counter-part that could be considered most interesting and answering the question: “Oh, I wonder how this works.”
blinry
Als Antwort auf Benjamin Braatz • • •@HeptaSean Yeah, that doesn't really seem possible to figure out. For non-web applications, maybe the button could show you the tree of processes that are involved in your "current application", and allow you to pick?
For expert users, I guess they could provide the name of the desired component directly.
ShadSterling
Als Antwort auf blinry • • •Space Catitude 🚀
Als Antwort auf blinry • • •blinry
Als Antwort auf Space Catitude 🚀 • • •sounddrill
Als Antwort auf blinry • • •Ken Milmore
Als Antwort auf blinry • • •Armin H. aus F.
Als Antwort auf blinry • • •Sebastian Krzyszkowiak
Als Antwort auf blinry • • •Space Catitude 🚀
Als Antwort auf blinry • • •Yeah, I've often wondered about that myself. I understand that you can install the Sugar DE on Linux, generally, and get that "view source" button. But it seems specifically designed to oppose multitasking, too.
en.wikipedia.org/wiki/Sugar_(d…
Sugar (desktop environment) - Wikipedia
Contributors to Wikimedia projects (Wikimedia Foundation, Inc.)blinry
Als Antwort auf Space Catitude 🚀 • • •Space Catitude 🚀
Als Antwort auf blinry • • •Well, I have never actually tried it, but supposedly it's there.
I do see the point in trying to port the "view source" feature to a more conventional DE. It seems unlikely that I could commit to using Sugar as a general purpose environment, but it would be cool for some of the ideas to get around.
Jan D
Als Antwort auf blinry • • •snaums
Als Antwort auf blinry • • •Well. Several idea pop up. The currently focused Application is easy to find. With something like apt-file you can find the package, download the source package and show that. That won't be much fun.
If you were to limit it to python-Apps, showing the directory of the python-file seems easy. Then you will want an overlay fs to not destroy the installed App, but write changes to "disk" and rerun the application from there.
blinry
Als Antwort auf snaums • • •@snaums Yeah, I also thought this should work well with tools that do a "reverse lookup" from your binary to a software package!
You mean it won't be fun because you can't easily modify the source code and then use it immediately? That's probably right…
snaums
Als Antwort auf blinry • • •luca
Als Antwort auf blinry • • •IMHO any fun and clear didactics has ended since almost thirty years.
blinry
Als Antwort auf luca • • •@luc0x61 My prototype later in the thread has been somewhat useful to me already!
But I agree that this can get really hairy, depending on the application.
luca
Als Antwort auf blinry • • •Cassidy James
Als Antwort auf blinry • • •oh oh oh talk to @EndlessAccess folks about this! They hold a defensive patent (which is usable by open source projects) for “Flip to Hack” which was this idea taken to the extreme as far as coolness goes.
I imagine @wjt, @ramcq, and maybe @chergert (because I think it used GNOME Builder?) could share some pointers to the history.
David Chisnall (*Now with 50% more sarcasm!*)
Als Antwort auf blinry • • •It originally ran Sqeak. Sqeak is a modern Smalltalk (though Pharo is positioning itself as a replacement). It was also inspired by the DynaBook, which was another of Alan Kay's projects.
Smalltalk environments all let you inspect both the source code and the state of running objects.
For Étoilé, we built a persistent object model with some common interfaces and the UI framework exposed the same introspection APIs, so you could attach an inspector to any object and see it in a generic way, but then attach an inspector to the UI for the model object, and then to that in turn and have inspectors all the way down (or up, or something).
Siguza
Als Antwort auf blinry • • •aburka 🫣
Als Antwort auf blinry • • •aburka 🫣
Als Antwort auf aburka 🫣 • • •aburka 🫣
Als Antwort auf aburka 🫣 • • •blinry
Als Antwort auf aburka 🫣 • • •Marc A. Kastner
Als Antwort auf blinry • • •Svavar the Neurospicy
Als Antwort auf blinry • • •Back in the 90s I taught myself HTML and CSS by using the view source feature in Netscape.
You can theoretically still do that if you can reverse the minification on modern websites.
sythys
Als Antwort auf blinry • • •Ekaitz Zarraga 👹
Als Antwort auf blinry • • •I'd like to have one to tinker with.
Glyph
Als Antwort auf blinry • • •Trammell Hudson
Als Antwort auf blinry • • •I think the OLPC project failed because they foolishly rejected my implementation suggestion
blinry
Als Antwort auf Trammell Hudson • • •Svante
Als Antwort auf blinry • • •Yes, see Lisp Machines, OpenGenera, Medley Interlisp, McCLIM, or almost any Smalltalk dialect. You can glimpse this in Emacs+SLIME »presentations«.
The system is »live«, and you can inspect it directly. Typically, this goes down to individual widgets.
»Modern« machines have lost the connection to their source, and trying to recover it with heuristics and remote repositories will necessarily be only a distant shimmer of that connection.
Knightmare
Als Antwort auf blinry • • •Ben Foote
Als Antwort auf blinry • • •Bill Halcyon
Als Antwort auf blinry • • •Devin Prater :blind:
Als Antwort auf blinry • • •Len 🍉
Als Antwort auf blinry • • •awesome idea. I know of a project inspired by olpc: balthazar.space/wiki/Balthazar
maybe you can collaborate
Balthazar - Balthazar
balthazar.spaceKarl Voit
Als Antwort auf blinry • • •Jaddy
Als Antwort auf blinry • •Bill Seitz
Als Antwort auf blinry • • •wiki.sugarlabs.org/index.php?t…
wiki.sugarlabs.org/go/Human_In….
reddit.com/r/freesoftware/comm…
Chris Ball » The “View Source” key
cjb (Chris Ball)Aral Balkan
Als Antwort auf blinry • • •@enkiv2 Well there’s one at the bottom of every web site we make and all it takes is a link to a git remote somewhere :)
e.g. see footer of kitten.small-web.org/
Might be harder on native/proprietary platforms but I’d love to see this become a pattern that’s embraced on the web.
Kitten: Home
kitten.small-web.orgAral Balkan hat dies geteilt.
Simon Brooke
Als Antwort auf blinry • • •All #Smalltalk systems have that feature, I think. All #LOGO systems, similarly. Back in the day most #Lisp systems did, but that's largely gone out of fashion over the past 40 years. Interpreted language (e.g. #BASIC, #JavaScript, #Lua, #Python) programs necessarily come with user-editable source code, although this is sometimes deliberately obfuscated.
Even in pure compiled languages, most academic (and all #OpenSoirce and #Libre) programs come with user editable source.
Daniel Bohrer
Als Antwort auf blinry • • •blinry
Als Antwort auf Daniel Bohrer • • •Daniel Bohrer
Als Antwort auf blinry • • •Daniel Bohrer
Als Antwort auf blinry • • •yes! :O it boots into something that looks like GNOME, but there is a "Switch to Sugar" menu item! I think this one was a development model…
blinry
Als Antwort auf Daniel Bohrer • • •Daniel Bohrer
Als Antwort auf blinry • • •Carl B. Latro
Als Antwort auf blinry • • •Web browsers have always had this, of course.
What I'd like is an OS that comes with an interpreter for a decent language and which most of the default apps are written in. One that'd allow you to write simple little apps very quickly.
Yogthos
Als Antwort auf blinry • • •incidentally, Lisp Machines took it a step further where you could inspect and modify code of your running applications, and see changes live.
It's really sad to see that modern environments still haven't caught up to that.
tfeb.org/fragments/2025/11/18/…
The lost cause of the Lisp machines
www.tfeb.orgBen Zanin
Als Antwort auf blinry • • •blinry
Als Antwort auf Ben Zanin • • •Ben Zanin
Als Antwort auf blinry • • •tom jennings
Als Antwort auf blinry • • •Though crude, BASIC programs from 70s and 80s had that lovely feature as (often undesired) side effect. I didn't appreciate it for that at the time but i bet a lot of people did.
Most modern programs probably wont have that nice one to one correspondence.
Kapitän Clownfeuer
Als Antwort auf blinry • • •Lars Brinkhoff
Als Antwort auf blinry • • •Oblomov
Als Antwort auf blinry • • •Claudius
Als Antwort auf blinry • • •Claudius
Als Antwort auf blinry • • •Nelson
Als Antwort auf blinry • • •This reminds me of a concept I "came up with" (certainly inspired by existing works) I dubbed WikiOS, to make your desktop environment as easy to edit as a wiki:
jawns.club/@skyfaller/10737492…
lobste.rs/s/ko5i9y/if_you_coul…
Obviously you are doing more to actually implement this vision than I am, but I just wanted to toss in more ideas about how you could empower users beyond "view source".
If you could redesign Linux userland from scratch, what would you do differently?
Lobstersder.hans
Als Antwort auf blinry • • •A "make this particular source code available" requirement is somewhat[0] baked into the AGPLv3 license, tons of discussion about showing code in use back then, I believe
Does PHP still have a "show the source code" option builtin?
[0] I think it's fully baked in, but it's been a long time since I looked at actual text of the license
Jan Wildeboer 😷
Als Antwort auf blinry • • •Yep. That was one of the design goals. When the decision was made by Bill Gates to NOT support the OLPC, it needed a new OS and UI. Which became SugarUI running on top of Fedora. Red Hat put in a bunch of engineers to help get it all up and running. It was a special time :) I still use working OLPCs for demos and workshops ;)
Jan Wildeboer 😷
Als Antwort auf Jan Wildeboer 😷 • • •João Tiago Rebelo (NAFO J-121)
Als Antwort auf Jan Wildeboer 😷 • • •My country had what was called "e-Initiatives" that provided access to subsidized laptops and mobile broadband Internet access to students, teachers and trade school pupils. One of those projects had the "e-schools" Magalhães PC (basically a 2nd gen Intel Classmate/Eduwise PC, but assembled in Portugal) at a cost of up to €50,00 (built at €180 per unit on a v1 configuration, the Portuguese State subsidized its sale price difference). Many kids from 2007 on had their first contact with a computer (and Linux, through a now out of active development Portuguese distro called Caixa Mágica that was pre-installed in dual boot alongside Windows XP), some never stopped using computers as a way of learning.
Jan Wildeboer 😷
Als Antwort auf João Tiago Rebelo (NAFO J-121) • • •João Tiago Rebelo (NAFO J-121)
Als Antwort auf Jan Wildeboer 😷 • • •@blinry
Jan Wildeboer 😷
Als Antwort auf João Tiago Rebelo (NAFO J-121) • • •João Tiago Rebelo (NAFO J-121)
Als Antwort auf Jan Wildeboer 😷 • • •Now I want to know more about those mesh capabilities and how to implement it on more modern hardware (for example, into some open hardware like an MNT laptop, or a RPi board). I'm a big nerd for mesh (Meshtastic, Meshcore, etc.) on a "prosumer" capacity.
@blinry
Jan Wildeboer 😷
Als Antwort auf João Tiago Rebelo (NAFO J-121) • • •João Tiago Rebelo (NAFO J-121)
Als Antwort auf Jan Wildeboer 😷 • • •@blinry
sobkas
Als Antwort auf Jan Wildeboer 😷 • • •Jan Wildeboer 😷
Als Antwort auf sobkas • • •Ronnie Soak
Als Antwort auf blinry • • •That is a very interesting point form a software architecture perspective. Since the 90's we preach to separate the view from the data and the business model. The MVC concept is no longer popular by this name, but still pretty much the norm in any architecture.
But this makes it nearly impossible to zoom in on a specific feature with the press of a button. You may see the 'view' code, but can't do meaningful changes without understanding many other files.
Could we do it differently?
Patrick Seemann
Als Antwort auf blinry • • •this is a great idea.
Could something like this be integrated into a Linux distribution? The source code is available anyway, and having it as part of the distribution would take away some of the guesswork around versions and dev/build environments
Claus Wilcke
Als Antwort auf blinry • • •Morgan G. Ames : The Charisma Machine
morganya.orgKensan
Als Antwort auf blinry • • •__
¹ Oberon is a Programming Language, Compiler and Desktop System