Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  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?

Scheduled Pinned Locked Moved Uncategorized
88 Posts 34 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 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:

    Link Preview Image
    view-source-button

    view-source-button - A script that allows you to start tinkering with software

    favicon

    Codeberg.org (codeberg.org)

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

    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
    wrote last edited by
    #6

    @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 S 2 Replies Last reply
    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:

      Link Preview Image
      view-source-button

      view-source-button - A script that allows you to start tinkering with software

      favicon

      Codeberg.org (codeberg.org)

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

      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
      wrote last edited by
      #7

      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". 😛

      blinry@chaos.socialB 1 Reply Last reply
      0
      • agowa338@chaos.socialA agowa338@chaos.social

        @blinry

        The python IDE. Basically you'd have to make the entire system in an interpreted language. Whatever that may be.

        lanodan@queer.hacktivis.meL This user is from outside of this forum
        lanodan@queer.hacktivis.meL This user is from outside of this forum
        lanodan@queer.hacktivis.me
        wrote last edited by
        #8
        @agowa338 @blinry DWARF also includes information on where the source file is, so most binaries can also point to where the source code is.
        agowa338@chaos.socialA 1 Reply Last reply
        0
        • lanodan@queer.hacktivis.meL lanodan@queer.hacktivis.me
          @agowa338 @blinry DWARF also includes information on where the source file is, so most binaries can also point to where the source code is.
          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
          wrote last edited by
          #9

          @lanodan @blinry

          Not familiar with DWARF, however a JIT language has the added benefit of being able to change it in real time.

          1 Reply Last reply
          0
          • blinry@chaos.socialB blinry@chaos.social

            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". 😛

            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
            wrote last edited by
            #10

            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

            dwardoric@chaos.socialD blinry@chaos.socialB benrutter@mastodon.greenB 3 Replies Last reply
            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:

              Link Preview Image
              view-source-button

              view-source-button - A script that allows you to start tinkering with software

              favicon

              Codeberg.org (codeberg.org)

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

              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
              wrote last edited by
              #11

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

              blinry@chaos.socialB 1 Reply Last reply
              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.)

                simulo@hci.socialS This user is from outside of this forum
                simulo@hci.socialS This user is from outside of this forum
                simulo@hci.social
                wrote last edited by
                #12

                @blinry I guess that this idea was inspired by smalltalk, which usually comes with a combined desktop/IDE.

                1 Reply Last reply
                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

                  dwardoric@chaos.socialD This user is from outside of this forum
                  dwardoric@chaos.socialD This user is from outside of this forum
                  dwardoric@chaos.social
                  wrote last edited by
                  #13

                  @blinry Everything in me currently screams "Smalltalk" 😉

                  korenchkin@chaos.socialK 1 Reply Last reply
                  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:

                    Link Preview Image
                    view-source-button

                    view-source-button - A script that allows you to start tinkering with software

                    favicon

                    Codeberg.org (codeberg.org)

                    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
                    wrote last edited by
                    #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 Replies Last reply
                    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
                      wrote last edited by
                      #15

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

                      technomancy@hey.hagelb.orgT 1 Reply Last reply
                      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
                        wrote last edited by
                        #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 Replies Last reply
                        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
                          wrote last edited by
                          #17

                          @blinry this looks extremely useful / promising!

                          1 Reply Last reply
                          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
                            wrote last edited by
                            #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 Reply Last reply
                            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
                              wrote last edited by
                              #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 Reply Last reply
                              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:

                                Link Preview Image
                                view-source-button

                                view-source-button - A script that allows you to start tinkering with software

                                favicon

                                Codeberg.org (codeberg.org)

                                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
                                wrote last edited by
                                #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 Replies Last reply
                                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
                                  wrote last edited by
                                  #21

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

                                  foosel@chaos.socialF 1 Reply Last reply
                                  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.

                                    Link Preview Image
                                    Sugar (desktop environment) - Wikipedia

                                    favicon

                                    (en.wikipedia.org)

                                    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
                                    wrote last edited by
                                    #22

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

                                    terryhancock@realsocial.lifeT 1 Reply Last reply
                                    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
                                      wrote last edited by
                                      #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 Reply Last reply
                                      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
                                        wrote last edited by
                                        #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 Reply Last reply
                                        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
                                          wrote last edited by
                                          #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 Reply Last reply
                                          0
                                          • R relay@relay.an.exchange shared this topic
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups