Mastodon Skip to content
  • Home
  • Aktuell
  • Tags
  • Über dieses Forum
Einklappen
Grafik mit zwei überlappenden Sprechblasen, eine grün und eine lila.
Abspeckgeflüster – Forum für Menschen mit Gewicht(ung)

Kostenlos. Werbefrei. Menschlich. Dein Abnehmforum.

  1. Home
  2. Uncategorized
  3. Remember the "One Laptop Per Child" project, that developed a low-cost computer for children in developing countries?

Remember the "One Laptop Per Child" project, that developed a low-cost computer for children in developing countries?

Geplant Angeheftet Gesperrt Verschoben Uncategorized
95 Beiträge 40 Kommentatoren 1 Aufrufe
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • blinry@chaos.socialB blinry@chaos.social

    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:

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

    heptasean@social.tchncs.deH This user is from outside of this forum
    heptasean@social.tchncs.deH This user is from outside of this forum
    heptasean@social.tchncs.de
    schrieb zuletzt editiert von
    #14

    @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@chaos.socialB clew@ecoevo.socialC 2 Antworten Letzte Antwort
    0
    • dwardoric@chaos.socialD dwardoric@chaos.social

      @blinry Everything in me currently screams "Smalltalk" 😉

      korenchkin@chaos.socialK This user is from outside of this forum
      korenchkin@chaos.socialK This user is from outside of this forum
      korenchkin@chaos.social
      schrieb zuletzt editiert von
      #15

      @dwardoric @blinry I was thinking Lisp Machines, but, nevertheless, very cool project! :3

      technomancy@hey.hagelb.orgT 1 Antwort Letzte Antwort
      0
      • blinry@chaos.socialB blinry@chaos.social

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

        blinry@chaos.socialB This user is from outside of this forum
        blinry@chaos.socialB This user is from outside of this forum
        blinry@chaos.social
        schrieb zuletzt editiert von
        #16

        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: https://github.com/NixOS/nix/issues/15282

        quincy@chaos.socialQ S 2 Antworten Letzte Antwort
        0
        • blinry@chaos.socialB blinry@chaos.social

          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: https://github.com/NixOS/nix/issues/15282

          quincy@chaos.socialQ This user is from outside of this forum
          quincy@chaos.socialQ This user is from outside of this forum
          quincy@chaos.social
          schrieb zuletzt editiert von
          #17

          @blinry this looks extremely useful / promising!

          1 Antwort Letzte Antwort
          0
          • blinry@chaos.socialB blinry@chaos.social

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

            snaums@toot.kif.rocksS This user is from outside of this forum
            snaums@toot.kif.rocksS This user is from outside of this forum
            snaums@toot.kif.rocks
            schrieb zuletzt editiert von
            #18

            @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@chaos.socialB 1 Antwort Letzte Antwort
            0
            • heptasean@social.tchncs.deH heptasean@social.tchncs.de

              @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@chaos.socialB This user is from outside of this forum
              blinry@chaos.socialB This user is from outside of this forum
              blinry@chaos.social
              schrieb zuletzt editiert von
              #19

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

              S 1 Antwort Letzte Antwort
              0
              • blinry@chaos.socialB blinry@chaos.social

                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:

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

                terryhancock@realsocial.lifeT This user is from outside of this forum
                terryhancock@realsocial.lifeT This user is from outside of this forum
                terryhancock@realsocial.life
                schrieb zuletzt editiert von
                #20

                @blinry
                Is it possible to find out what shared library is responsible for some windows? I often wonder which project is actually behind the file browser or print dialog that I'm using and whether I can change it. My understanding is that these are usually delegated to an SO?

                blinry@chaos.socialB S 2 Antworten Letzte Antwort
                0
                • korenchkin@chaos.socialK korenchkin@chaos.social

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

                  blinry@chaos.socialB This user is from outside of this forum
                  blinry@chaos.socialB This user is from outside of this forum
                  blinry@chaos.social
                  schrieb zuletzt editiert von
                  #21

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

                  foosel@chaos.socialF 1 Antwort Letzte Antwort
                  0
                  • terryhancock@realsocial.lifeT terryhancock@realsocial.life

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

                    https://en.wikipedia.org/wiki/Sugar_(desktop_environment)

                    blinry@chaos.socialB This user is from outside of this forum
                    blinry@chaos.socialB This user is from outside of this forum
                    blinry@chaos.social
                    schrieb zuletzt editiert von
                    #22

                    @TerryHancock Ohh, I didn't know it was still (kind of) maintained! 😮

                    terryhancock@realsocial.lifeT 1 Antwort Letzte Antwort
                    0
                    • snaums@toot.kif.rocksS snaums@toot.kif.rocks

                      @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@chaos.socialB This user is from outside of this forum
                      blinry@chaos.socialB This user is from outside of this forum
                      blinry@chaos.social
                      schrieb zuletzt editiert von
                      #23

                      @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@toot.kif.rocksS 1 Antwort Letzte Antwort
                      0
                      • blinry@chaos.socialB blinry@chaos.social

                        @TerryHancock Ohh, I didn't know it was still (kind of) maintained! 😮

                        terryhancock@realsocial.lifeT This user is from outside of this forum
                        terryhancock@realsocial.lifeT This user is from outside of this forum
                        terryhancock@realsocial.life
                        schrieb zuletzt editiert von
                        #24

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

                        1 Antwort Letzte Antwort
                        0
                        • terryhancock@realsocial.lifeT terryhancock@realsocial.life

                          @blinry
                          Is it possible to find out what shared library is responsible for some windows? I often wonder which project is actually behind the file browser or print dialog that I'm using and whether I can change it. My understanding is that these are usually delegated to an SO?

                          blinry@chaos.socialB This user is from outside of this forum
                          blinry@chaos.socialB This user is from outside of this forum
                          blinry@chaos.social
                          schrieb zuletzt editiert von
                          #25

                          @TerryHancock I've sometimes used `ldd` to show the linked libraries of a binary; but trying that on some examples the list seems to be either under- or overwhelming! 😄

                          1 Antwort Letzte Antwort
                          0
                          • blinry@chaos.socialB blinry@chaos.social

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

                            siguza@infosec.spaceS This user is from outside of this forum
                            siguza@infosec.spaceS This user is from outside of this forum
                            siguza@infosec.space
                            schrieb zuletzt editiert von
                            #26

                            @blinry my immediate thought was: step 1, write an accurate decompiler 😐

                            suiseiseki@freesoftwareextremist.comS 1 Antwort Letzte Antwort
                            0
                            • agowa338@chaos.socialA agowa338@chaos.social

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

                              raymaccarthy@mastodon.ieR This user is from outside of this forum
                              raymaccarthy@mastodon.ieR This user is from outside of this forum
                              raymaccarthy@mastodon.ie
                              schrieb zuletzt editiert von
                              #27

                              @agowa338 @blinry Wasn't C# simply a MS repackage of MS J++, the MS version of Java, because they were sued by Sun?
                              Years ago I used to peer inside Java "jars" on XP and Ubuntu.

                              I found C# far better than VB.net, but both inferior to VB6 for quick GUIs on SQL or simulating keypad and LCD of a microcontroller and prototyping the code.
                              Then I went back to RF design and mostly abandoned programming apart from JAL on PIC18.
                              But view source is very niche. You only want the overhead on a Dev's PC.

                              agowa338@chaos.socialA S 2 Antworten Letzte Antwort
                              0
                              • blinry@chaos.socialB blinry@chaos.social

                                @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@toot.kif.rocksS This user is from outside of this forum
                                snaums@toot.kif.rocksS This user is from outside of this forum
                                snaums@toot.kif.rocks
                                schrieb zuletzt editiert von
                                #28

                                @blinry If you limit it to python, it could be fun. C/C++ code has to be compiled and that can take _a while_. Maybe it would work better on something like Gentoo. Or maybe you'd have a system, where in a special environment, everything is built from package-source once, then can be edited and recompiled in seconds.

                                schaf@netzkms.deS 1 Antwort Letzte Antwort
                                0
                                • raymaccarthy@mastodon.ieR raymaccarthy@mastodon.ie

                                  @agowa338 @blinry Wasn't C# simply a MS repackage of MS J++, the MS version of Java, because they were sued by Sun?
                                  Years ago I used to peer inside Java "jars" on XP and Ubuntu.

                                  I found C# far better than VB.net, but both inferior to VB6 for quick GUIs on SQL or simulating keypad and LCD of a microcontroller and prototyping the code.
                                  Then I went back to RF design and mostly abandoned programming apart from JAL on PIC18.
                                  But view source is very niche. You only want the overhead on a Dev's PC.

                                  agowa338@chaos.socialA This user is from outside of this forum
                                  agowa338@chaos.socialA This user is from outside of this forum
                                  agowa338@chaos.social
                                  schrieb zuletzt editiert von
                                  #29

                                  @raymaccarthy @blinry

                                  don't know. Was before my times.

                                  And btw, there is basically 0 overhead from "view source" in C#, as the JIT will at runtime optimise the code and cache the compiled code until it is invalidated by you changing the source or something. In fact if you're writing powershell and the interpreter hits a loop the first few passes will be interpreted while it is in the background compiling it. And once it is done it'll on-the-fly switch over to the optimised compiled code.

                                  agowa338@chaos.socialA 1 Antwort Letzte Antwort
                                  0
                                  • agowa338@chaos.socialA agowa338@chaos.social

                                    @raymaccarthy @blinry

                                    don't know. Was before my times.

                                    And btw, there is basically 0 overhead from "view source" in C#, as the JIT will at runtime optimise the code and cache the compiled code until it is invalidated by you changing the source or something. In fact if you're writing powershell and the interpreter hits a loop the first few passes will be interpreted while it is in the background compiling it. And once it is done it'll on-the-fly switch over to the optimised compiled code.

                                    agowa338@chaos.socialA This user is from outside of this forum
                                    agowa338@chaos.socialA This user is from outside of this forum
                                    agowa338@chaos.social
                                    schrieb zuletzt editiert von
                                    #30

                                    @raymaccarthy @blinry

                                    (PowerShell may be an even better fit than C# for this usage...)

                                    raymaccarthy@mastodon.ieR 1 Antwort Letzte Antwort
                                    0
                                    • terryhancock@realsocial.lifeT terryhancock@realsocial.life

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

                                      https://en.wikipedia.org/wiki/Sugar_(desktop_environment)

                                      raymaccarthy@mastodon.ieR This user is from outside of this forum
                                      raymaccarthy@mastodon.ieR This user is from outside of this forum
                                      raymaccarthy@mastodon.ie
                                      schrieb zuletzt editiert von
                                      #31

                                      @TerryHancock @blinry The idea of Sugar (apps full screen one at a time) in a sense is like Android. Suited to small screen which OLPC had. It's only good for certain kinds of workflow or browsing. I upgraded from 1 x QHD to 1 x 4K and then 2 x 4K and use the screens like a large desk. I need reference materials.
                                      I used virtual desktops on 1600 x 1200 XP over 20 years ago. I hate full screen applications except watching video / movies.
                                      I have a portable 17" QHD screen extending 11" laptop.

                                      1 Antwort Letzte Antwort
                                      0
                                      • agowa338@chaos.socialA agowa338@chaos.social

                                        @raymaccarthy @blinry

                                        (PowerShell may be an even better fit than C# for this usage...)

                                        raymaccarthy@mastodon.ieR This user is from outside of this forum
                                        raymaccarthy@mastodon.ieR This user is from outside of this forum
                                        raymaccarthy@mastodon.ie
                                        schrieb zuletzt editiert von
                                        #32

                                        @agowa338 @blinry
                                        But MS is determined to make Windows unusable except as a terminal for Edge.
                                        I've not missed C# IDE or Powershell on Linux since abandoning Windows in 2017.

                                        agowa338@chaos.socialA 1 Antwort Letzte Antwort
                                        0
                                        • raymaccarthy@mastodon.ieR raymaccarthy@mastodon.ie

                                          @agowa338 @blinry
                                          But MS is determined to make Windows unusable except as a terminal for Edge.
                                          I've not missed C# IDE or Powershell on Linux since abandoning Windows in 2017.

                                          agowa338@chaos.socialA This user is from outside of this forum
                                          agowa338@chaos.socialA This user is from outside of this forum
                                          agowa338@chaos.social
                                          schrieb zuletzt editiert von
                                          #33

                                          @raymaccarthy @blinry

                                          Good that the Powershell and dotNET teams already kinda split and opensourced themselves to avoid that 😛

                                          agowa338@chaos.socialA S 2 Antworten Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen



                                          Copyright (c) 2025 abSpecktrum (@abspecklog@fedimonster.de)

                                          Erstellt mit Schlaflosigkeit, Kaffee, Brokkoli & ♥

                                          Impressum | Datenschutzerklärung | Nutzungsbedingungen

                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Über dieses Forum