Conversation

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! <3

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.)

10
9
4

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 and :

https://codeberg.org/blinry/view-source-button

I enters a "dev shell" with the required tools already in the PATH, and even sets up a Git remote to start contributing. :D

3
0
1

So if you've been wondering why I'm into obscure bugs this week like:

- Figuring out why I'm missing icons in pavucontrol https://chaos.social/@blinry/116081436255395069

- Improving the man page of a Nix CLI helper https://github.com/nix-community/nh/pull/568

- Reporting broken shortcuts in the Firefox DevTools https://bugzilla.mozilla.org/show_bug.cgi?id=2017113

… it was testcases for tying out this "View Source Button". :P

1
0
0

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 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. https://nixos.org/manual/nixpkgs/stable/#sec-building-stdenv-package-in-nix-shell

1
0
0

For myself, ideally, the script would set up a 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: https://github.com/NixOS/nix/issues/15282

0
0
0
unsolicited advice, feel free to ignore
Show content

@blinry Might I suggest using `nix eval --raw nixpkgs#$PKG --apply 'pkg: …'` to avoid repeatedly invoking `nix eval`?

1
0
0
unsolicited advice, feel free to ignore
Show content

@korenchkin Oh cool, that would speed things up a bit for sure! :)

1
0
0
unsolicited advice, feel free to ignore
Show content

@blinry @korenchkin some other unsolicited advise: if the directory already exists and you decide not to delete it, change to it.

0
0
0

@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.

1
0
0

@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).

0
0
1

@blinry @gvwilson amazing work! the lack of such a thing is one of my primary complaints about the so-called “open” operating systems, and the FLOSS movement generally. if we can’t put the actual control in users’ hands, then what’s the point? seeing an actual modern prototype of this is really encouraging. Particularly because it seems you have a scalable approach which won’t require work from every app? I wish you great luck in making it happen more broadly!

0
0
0

@blinry I think the OLPC project failed because they foolishly rejected my implementation suggestion

0
0
0
@blinry "Remember"? Still using that one. It is great terminal that works in direct sunlight :-).

And yes, being able to easily edit existing applications would be cool. But may be tricky with all the languages / build systems around...
0
0
1

@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 ;)

3
1
0

@blinry When in Munich, feel free to visit me and I’ll put you in a room with working OLPCs so you can geek out for hours and end up with a big smile that will take weeks to fade ;) (that offer isn’t limited to blinry, when anyone of you wants to learn about OLPC hands-on, be my guest. I will flood you with details and experiences :)

0
0
0

@blinry @jwildeboer so that is where they all ended up! 😜 (it's great someone is able to help us not forget that access to computing and tinkering shouldn't be privilege, but a basic right in the XXI century).
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.

1
0
0

@jt_rebelo Yes (W)Intel lobbied hard to make sure the OLPC never became successful. They were willing to throw a lot of money at that. The mesh networking of the OLPC was the kind of magic they desperately wanted to keep out of the tiny hands of smart kids. @blinry

1
0
0

@blinry And for those not nixed there's "apt-get source <package-name>" 😀

0
0
0

@jwildeboer mesh networking? That's the first time I heard about it alongside the OLPC project. The (W)Intel cover-up worked on me then (at that time I did not have regular acess to the Internet - used "free" WAP on a Nokia 5210 - and mostly read IT magazines for the tutorials and free software/ISO CDs).
@blinry

1
0
0

@jt_rebelo The Marvel Chip in the OLPC did mesh without needing the CPU for basic functions, so it worked as low power repeater, keeping the mesh alive even when closed and switched off. It was quite fascinating. As the mesh also had a coordinated time base you could do Doppler calculations between two devices for distance measurements etc. @blinry

1
0
0

@jwildeboer I'm in awe. No way Intel could risk that having mass adoption. At the time they couldn't even get Wi-Fi right (back then, I remember laptops not waking up their cards even if Windows told them not to "suspend" them to save power, and most wifi and wired hardware I knew about and was around me was from Intel), not that they have it much better right now
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

1
0
0

@jt_rebelo Here's the fun part. That approach to mesh still exists and is being massively used. It's called AirDrop ;) Ad-hoc networking, coordinated mesh style. It added Bluetooth as a layer for proximity testing. That same thing (low power bluetooth for proximity data) was also used for the covid warn apps, by the way ;) @blinry

0
0
0

@jwildeboer @blinry OLPC was a total failure, it didn't provide any advantages to supposed user. It looked like a toy, it was fragile, openness wasn't easy to use because it wasn't explained to children.

1
0
0

@sobkas That’s your opinion. Did you work with the OLPC and children between 5-12 years old? I did. They „get“ it after a few minutes. We did a lot of cool things with them. @blinry

0
0
0