Planet Sugar

Planet Sugar is a collection of personal blogs by Sugar Labs contributors. Sugar Labs is a world-wide organization of passionate people working together to solve the same problem: giving everyone an opportunity to learn to learn. Our community members write about what excites them about learning, Sugar, and the Sugar community. In the spirit of free software, we share and criticize—that is how we learn and improve and encourage participation by newcomers. Enjoy and join the conversation.

February 22, 2018

Karma Project

Tutorial & University News

Apply for greater education programmes taught in English in Denmark: University bachelor programmes, skilled bachelor programmes and academy profession programmes. With the proliferation of distance studying suppliers and modalities, the necessity for a new, more nimble regulatory approach that can permit for greater access and choices for students – while maintaining robust student protections and safeguards – has emerged.higher education

It was an incredible launching pad to get the place I need to be,” Massachusetts Maritime Academy student Paul Frost told highschool college students at a recent event, speaking of his experience learning at a group college earlier than he transferred to Mass Maritime.

In step with Goal 4.three of Sustainable Improvement Purpose 4 to by 2030, guarantee equal access for all women and men to reasonably priced and high quality technical, vocational and tertiary training, including university,” UNESCO provides technical assist to Member States to evaluation greater education strategies and …

by jasmine at February 22, 2018 09:32 AM

February 21, 2018

Karma Project

Importance Of Value Schooling

The Department of Schooling, Early Learning and Tradition develops and delivers top quality packages and curriculum in English and French to Island children from birth to Grade 12. The department provides company providers, together with common and financial administration, workers certification, research, planning and analysis, human sources and school athletics. In the Nineteen Fifties schools expanded quickly, straining resources with the postwar “baby increase.” Quite a few prominent academics and journalists criticized progressive training, linking it in the public thoughts with failure in the faculties. The earliest publicly supported urban establishments were known as “charity colleges,” and had been designated for the kids of the poor.about education

Elderhostel emerged in the 1970s to provide short-term (typically weeklong) educational alternatives for people age fifty-five and older. The problem with that is that whereas seeking to help folks learn, the way loads of colleges and teachers operate is just not essentially something we …

by jasmine at February 21, 2018 03:24 PM

February 09, 2018

Mel Chua

Getting the radical realtime transparency ball rolling

Getting radical realtime transparency in a project can be slow and frustrating, especially in the beginning. Most folks don’t know this, but in order to have public conversations, leaders need to send out a ridiculous number of private messages to get things rolling. In fact, looking at my own inbox history for the past half-decade, I’ve sent anywhere between 2-20 private messages – on average  (not maximum, average) – to get a single public message during the early stages of a project’s “open” life.

You really need to keep poking people in private asking them to put their messages public. It’s thankless and invisible work. It takes a while to build a new cultural habit, and for a while it’s going to seem like you’ll be doing this forever… but trust me, it will come. It’s going to take longer than you want it to, it’s going to take an unexpected route, but keep the faith – it will come.

There are three strategies it’s useful to have up your sleeve for times like this.

Start the conversation in private, then say something like “hey, this is really good, could you resend it to the public list and I’ll reply there?” This is good for starters if folks are new to the “default to open” concept and are reacting with great nervousness. This nervousness stems from wariness that they may not want to go public with some hypothetical future thing – in effect, worrying about a problem that hasn’t happened yet. Going this route allows beginners in radical transparency to look at something they’ve already written and assess the risk for only that specific situation – no unknowns here, no future commitments. After a few times of going “oh, I guess that retroactive transparency was okay!” it’s much easier to ask people to give “open by default” a chance.

Publicly announce that you’ll only respond to things sent to the public list. Reply to private emails with a reminder of this. This only works only if the people you’re trying to persuade are unable to route around you. It’s also a bit of a strongarm tactic, not appropriate for all situations and best used in moderation if at all. But if you’re a project manager, or an instructor, or a senior engineer, or something of the sort, you might be able to get away with it – and boy, folks learn fast this way.

Get others to help you with the nudges-to-public. Those 20 private emails to get a single public email? No reason why you’ve got to be the only one doing it. Train others to become Agents of Transparency as soon as you can, especially if they were once on the other side of the conversation. To begin with, ask them to work specific mailing lists, specific people, or specific conversation threads into the public eye – coach them from behind if needed. After a little while, they’ll be able to do it on their own – then just ask them to keep an eye out in general, and hey presto!

The key thing to keep in mind is that this is an investment. You’re putting resources into something that may not see returns for a little while. But the returns will come, and they’ll be worth it – when a project tips over into living, breathing, and practicing true realtime transparency, the results of the culture shift can be stunningly refreshing.

Keep going.

by Mel at February 09, 2018 11:42 PM

February 01, 2018

sam.today

Creating a super simple derivation - Learning Nix pt 3

This guide will build on the previous two guides, and look at creating your first useful derivation (or "package").

This will teach you how to package a shell script.

Packaging a shell script (with no dependencies)

We can use the function pkgs.writeShellScriptBin from NixPkgs, which handles generating a derivation for us.

This function takes 2 arguments; what name you want the script to have in your PATH, and a string being the contents of the script.

So we could have:

pkgs.writeShellScriptBin "helloWorld" "echo Hello World"

That would create a shell script named "helloWorld", that printed "Hello World".

Let's put that in an environment; so we can use it in nix-shell. Write this to test.nix:

with import <nixpkgs> {};

let
  # Use the let-in clause to assign the derivation to a variable
  myScript = pkgs.writeShellScriptBin "helloWorld" "echo Hello World";
in
stdenv.mkDerivation rec {
  name = "test-environment";

  # Add the derivation to the PATH
  buildInputs = [ myScript ];
}

We can then enter the nix-shell and run it:

sam@vcs ~> nix-shell test.nix

[nix-shell:~]$ helloWorld
Hello World

Great! You've successfully made your first package. If you use NixOS, you can modify your system configuration and include it in your environment.systemPackages list. Or you can use it in a nix-shell (like we just did). Or whatever you want! Despite being one line of code, this is a real Nix derivation that we can use.

Referencing other commands in your script

For this example/section; we are going to look at something more complex. Say you want to write a script to find your public IP address. We're basically going to run this command:

curl http://httpbin.org/get | jq --raw-output .origin

But running this requires dependencies; you need curl and jq installed. How do we specify dependencies in Nix?

Well, we could just add them to the build input for the shell:

# DO NOT USE THIS; this is a BAD example
with import <nixpkgs> {};

let
  # This is the WORST way to do dependencies
  # We just specify the derivation the same way as before
  simplePackage = pkgs.writeShellScriptBin "whatIsMyIp" ''
    curl http://httpbin.org/get | jq --raw-output .origin
  '';
in
stdenv.mkDerivation rec {
  name = "test-environment";

  # Then we add curl & jq to the list of buildInputs for the shell
  # So curl and jq will be added to the PATH inside the shell
  buildInputs = [ simplePackage pkgs.jq pkgs.curl ];
}

This would work OK; you could go nix-shell then run whatIsMyIp and get your IP.

But it has a problem. The script would work unpredictably. If you took this package, and used it outside of the nix-shell, it wouldn't work - because you didn't have the dependencies. It also pollutes the environment of the end user; as they need to have a compatible version jq and curl in their path.

The more eloquent way to do this is to reference the exact packages in the shell script:

with import <nixpkgs> {};

let
  # The ${...} is for string interpolation
  # The '' quotes are used for multi-line strings
  simplePackage = pkgs.writeShellScriptBin "whatIsMyIp" ''
    ${pkgs.curl}/bin/curl http://httpbin.org/get \
      | ${pkgs.jq}/bin/jq --raw-output .origin
  '';
in
stdenv.mkDerivation rec {
  name = "test-environment";

  buildInputs = [ simplePackage ];
}

Here we reference the dependency package inside the derivation. To understand what this is doing, we need to see what the script is written to disk as. You can do that by running:

sam@vcs ~> nix-shell test.nix

[nix-shell:~]$ cat $(which whatIsMyIp)

Which gives us:

#!/nix/store/hqi64wjn83nw4mnf9a5z9r4vmpl72j3r-bash-4.4-p12/bin/bash
/nix/store/pkc7g36m95jymw3ga2i7pwrykcfs78il-curl-7.57.0-bin/bin/curl http://httpbin.org/get \
  | /nix/store/znqn0z505i0bm1aiz2jaj1ki7z4ck1sv-jq-1.5/bin/jq --raw-output .origin

As we can see, all the binaries referenced in this script are absolute paths, something like /nix/store/...../bin/name. The /nix/store/... is the path of the derivation's (package's) build output.

Due to the pure and functional of Nix, that path will be the same on every machine that ever runs Nix. Replacing fuzzy references (eg. jq) with definitive and unambiguous ones (/nix/store/...) is a core tenant of Nix; as it means packages come will all their dependencies and don't pollute your environment.

Since it is an absolute path, that script doesn't rely on the PATH environment variable; so the script can be used anywhere.

When you reference the path (like ${pkgs.curl} from above), Nix automatically knows to download the package into the machine whenever your package is downloaded.

Why do we do it like this? Ultimately, the goal of package management is to make consuming software easier. Creating less dependencies on the environment that runs the package makes it easier to use the script.

So the TL;DR is:

# BAD; not very explicit
# - we need to remember to add curl to the environment again later
badPackage = pkgs.writeShellScriptBin "something" ''
  curl ...
'';

# GOOD: Nix will do the magic for us
goodPackage = pkgs.writeShellScriptBin "something" ''
  ${pkgs.curl}/bin/curl ...
'';

Functions make creating packages easier

One of the main lessons from this process is that when you use functions (like pkgs.writeShellScriptBin) to create packages, it is pretty simple. Compare this to a traditional RPM or DEB workflow; where you would have needed to write a long spec file, put the script in a separate file, and fight your way through too much boilerplate.

Luckily; NixPkgs (the standard library of packages) includes a whole raft of functions that make packaging easier for specific needs. Most of these are in the build support folder of the NixPkgs repository. These are defined in the Nix expression language; the same language you are learning to write. For example, the pkgs.writeShellScriptBin function is defined as a ~10 line function.

Some of the more complex build support functions are documented in the NixPkgs manual. There is currently documentation for packaging Python, Go, Haskell, Qt, Rust, Perl, Node and many other types of applications.

Some of the more simple build support functions (like pkgs.writeShellScriptBin) are not documented (when I write this). Most of them are self explanatory, and can be found by reading their names in the so called trivial builders file.

Up Next

Derivations 102 - Learning Nix pt 4

Follow the series on GitHub

Hero image from nix-artwork by Eric Sagnes

February 01, 2018 11:50 AM

January 31, 2018

sam.today

So Variables are a Thing - Learning Nix pt 2

So Nix is fundamentally built around the Nix expression language; which is a programming language. Creating variables is a huge part of programming.

If you want to package apps or just simplify repetitive configuration files; you will probably need variables.

The let-in syntax

The let-lets syntax allows you you define a variable that the next expression of code runs in:

A high level example is:

let
  x = 1;
  y = 2;
in
  x + y

This is valid nix code; we can actually run it, if you save it to test.nix:

> nix-instantiate --eval test.nix
3

We can see here that the code still evaluates (aka. returns) the value 3. This means that anywhere in our code, we can replace some expression with something like let ... in expression.

Here is a concrete example of that replacement. We could make our last example more complex by replacing the number 1 with a let-in expression:

let
  x = (let a = 2; in a+3);
  y = 2;
in
  x + y

Which changes the answer:

> nix-instantiate --eval test.nix
7

So we can formalize the let-in syntax as:

let
  name = expression;
  name = expression;
  name = expression;
  ...
in
  expression

Real world examples of the "let-in" expression

Say we have an environment (something we run as nix-shell test.nix); and it uses a lot of python packages:

with import <nixpkgs> {};

stdenv.mkDerivation rec {
  name = "python-environment";

  buildInputs = [
    pkgs.python36
    pkgs.python36.pkgs.flask
    pkgs.python36.pkgs.itsdangerous
    pkgs.python36.pkgs.six
  ];
}

Obviously that looks very repetitive; and we repeat the python version many times.

We can refactor this to store the pkgs.python36 as a variable. This makes the code less repetitive. It also makes it easier to change the python version later. The code would look like:

with import <nixpkgs> {};

stdenv.mkDerivation rec {
  name = "python-environment";

  buildInputs = let
    py = pkgs.python36;
  in [
    py
    py.pkgs.flask
    py.pkgs.itsdangerous
    py.pkgs.six
  ];
}

Yay! Now we've created an identical environment with less words

A digression on scope

Smart cookies reading along would have noticed that we could have put the let-in expression in a different place. For example:

with import <nixpkgs> {};

let
  # Assigning the variable `py` to the python we want to use
  py = pkgs.python36;
  # You could try and change it to python27 to see what happens
in
stdenv.mkDerivation rec {
  name = "python-environment";

  buildInputs = [
    # here we reference `py` rather than `pkgs.python36`
    py
    py.pkgs.flask
    py.pkgs.itsdangerous
    py.pkgs.six
  ];
}

The result of that code would have been identical.

However, putting the let-in expression in a different place changes the scope (or parts of the code) that the py variable is useable for.

So with the larger scope, we could do something like:

with import <nixpkgs> {};

let
  py = pkgs.python36;
in
stdenv.mkDerivation rec {
  name = "python-environment";

  buildInputs = [
    py
    py.pkgs.flask
    py.pkgs.itsdangerous
    py.pkgs.six
  ];

  # The ${...} syntax is string interpolation in Nix
  shellHook = ''
    echo "using python: ${py.name}"
  '';
}

Which could be pretty cool:

sam@vcs ~> nix-shell test.nix
using python: python3-3.6.4

[nix-shell:~]$

However, we couldn't use the py variable in shellHook if the let-in expression only covers the buildInputs list.

# THIS CODE WILL CRASH
with import <nixpkgs> {};

stdenv.mkDerivation rec {
  name = "python-environment";

  buildInputs = let
    py = pkgs.python36;
  in [
    # `py` is now in scope
    py
    py.pkgs.flask
    py.pkgs.itsdangerous
    py.pkgs.six
  ];
  # `py` is now out of scope (a list is one type of "expression")

  shellHook = ''
    echo "using python: ${py.name}"
  '';
}

It would result in a crash:

> nix-shell test.nix
error: undefined variable ‘py’ at /home/sam/test.nix:20:27

Extension: the "with" expression

With is another expression (like let-in). It has the syntax:

with expression1; expression2

With actually works very similar to the JavaScript with, and nothing like the python with. Basically, it:

  1. It evaluates expression1; call that ret1. ret1 must be a set (aka. dictionary)
  2. It takes all the attributes of ret1, and makes them variables in the scope of expression2
  3. Overall, it evaluates to expression2 (which run with the extra variables)

So you could replace:

let
  x = 1;
  y = 2;
in
  x + y

With the with equivalent:

with { x = 1; y = 2; }; x + y

This is really useful when dealing with sets that have loads of attributes, like python36.pkgs. So our old code:

buildInputs = [
  pkgs.python36
  pkgs.python36.pkgs.flask
  pkgs.python36.pkgs.itsdangerous
  pkgs.python36.pkgs.six
];

Could become shorter using with:

buildInputs = with pkgs.python36.pkgs [
  pkgs.python36
  flask
  itsdangerous
  six
];

As you can see, all the attributes of pkgs.python36.pkgs (including flask, itsdangerous and six) were added to the scope when evaluating the list.

This can also be chained with the let-in expression:

buildInputs =
  let
    py = pkgs.python36;
  in
    with py.pkgs;
    [
      py
      flask
      itsdangerous
      six
    ];

Up Next

Creating a super simple derivation - Learning Nix pt 3

Follow the series on GitHub

Hero image from nix-artwork by Luca Bruno

January 31, 2018 12:00 AM

January 04, 2018

OLE Nepal

The Mountain Village That Stole Our Hearts

AUTHOR: Yap Mun Ching DECEMBER 23 , 2017 For my last work trip of 2017, I had the rather unusual task of leading a group of 9 Allstars (AirAsia staff) from 5 countries and a 5-member film crew up the Gorkha mountains of Nepal to a village called Olang. The trip was part of a two-and-a-half-year long ‘To Nepal with Love’ campaign that AirAsia Foundation has been running with an excellent organisation called Open Learning…

by admin at January 04, 2018 11:01 AM

November 06, 2017

Tomeu Vizoso

Experiments with crosvm

Last week I played a bit with crosvm, a KVM monitor used within Chromium OS for application isolation. My goal is to learn more about the current limits of virtualization for isolating applications in mainline. Two of crosvm's defining characteristics is that it's written in Rust for increased security, and that uses namespaces extensively to reduce the attack surface of the monitor itself.

It was quite easy to get it running outside Chromium OS (have been testing with Fedora 26), with the only complication being that minijail isn't widely packaged in distros. In the instructions below we hack around the issue with linker environment variables so we don't have to install it properly. Instructions are in form of shell commands for illustrative purposes only.

Build kernel:
$ cd ~/src
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ git checkout v4.12
$ make x86_64_defconfig
$ make bzImage
$ cd ..
Build minijail:
$ git clone https://android.googlesource.com/platform/external/minijail
$ cd minijail
$ make
$ cd ..
Build crosvm:
$ git clone https://chromium.googlesource.com/a/chromiumos/platform/crosvm
$ cd crosvm
$ LIBRARY_PATH=~/src/minijail cargo build
Generate rootfs:
$ cd ~/src/crosvm
$ dd if=/dev/zero of=rootfs.ext4 bs=1K count=1M
$ mkfs.ext4 rootfs.ext4
$ mkdir rootfs/
$ sudo mount rootfs.ext4 rootfs/
$ debootstrap testing rootfs/
$ sudo umount rootfs/
Run crosvm:
$ LD_LIBRARY_PATH=~/src/minijail ./target/debug/crosvm run -r rootfs.ext4 --seccomp-policy-dir=./seccomp/x86_64/ ~/src/linux/arch/x86/boot/compressed/vmlinux.bin
The work ahead includes figuring out the best way for Wayland clients in the guest interact with the compositor in the host, and also for guests to make efficient use of the GPU.

by Tomeu Vizoso (noreply@blogger.com) at November 06, 2017 07:07 AM

August 02, 2017

OLE Nepal

Developing the New E-Pustakalaya

## Introduction ## Since OLE Nepal’s inception in 2007 we have strived to provide open and free access to quality education and innovative learning environments to children all over Nepal.  One of our core missions is to reduce the disparity found within the accessibility of learning tools brought about by geographic location, school type, and population group.  E-Pustakalaya, our free and open digital library, closed the gap by providing a collection of thousands of books,…

by Melech Maglasang at August 02, 2017 11:23 AM

June 09, 2017

One Laptop per Child

OLPC and FZT: Transform Africa Summit

On May 10th to 12th, 2017, leaders and stakeholders from various industries, countries and continents gathered in the KIGALI CONVENTION CENTER to participate in the Transform Africa Summit. They all had one purpose: to foster constructive conversation towards building a Smart Africa. The Transform Africa Summit facilitated meetings for leaders from the public and private sectors to discuss policies and opportunities to accelerate the continent towards a socio-economic transformation, as the theme for the summit stated:  “Smart Cities Fast Forward.”

OLPC and Foundation Zamora Teran participated in this summit as a wonderful example of how technology combined with commitment is indeed the solution to sustainability and development.

18402127_1500891969961196_5621341336926585954_o

During the summit, Foundation Zamora Teran shared its experience with the One Laptop Per Child projects in Central America. As a part of its educational program, the Foundation Zamora Teran created the first digital island, Ometepe. This served as a relevant case study for the summit. Summit participants had the opportunity to interact with the OLPC and FZT teams to learn about the strategies they employ for success in their educational program. One such strategy for success focuses on actively engaging all relevant stakeholders, including educators, technical teams and operations teams, in the process.  The three sectors work together to bring all stakeholders together in order to positively impact the community

fzt1

During the exhibition, many officials from participating countries visited the OLPC/FZT stand to learn how its ecosystem could be a key to sustaining different development projects in their respective countries. Journalists and TV stations also had the opportunity to learn more about the OLPC/FZT services. FZT and OLPC conducted interviews as well.

The Summit was a wonderful opportunity for OLPC and FZT to build global connections to increase opportunities to provide children around the world with a quality, innovative education.

(Below are several interviews.)

by Diriana Teran at June 09, 2017 06:35 PM

June 07, 2017

One Laptop per Child

FUNDECYT-PCTEX Joins Efforts with Fundación Zamora Terán and OLPC

In 2016, the Fundación Zamora Terán in Nicaragua  entered Phase II of its One Laptop Per Child Educational Program. In an effort to strengthen the program, the Fundación Zamora Terán signed a collaboration agreement with FUNDECYT-PCTEX a non-profit organization based in Spain to continue to support the educational program throughout Central America.

unnamed (2)

The objective of the collaboration is to continue the social transformation process and strengthen the existing educational institutions. Extremadura, an organization based in Spain, is devoting resources to further support innovative education in Nicaragua. The organizations are working together to network, innovate, and scale the OLPC educational program. Estremadura is currently developing new educational applications for the XO Laptop. The organizations opened CEDSL in 2015, a space for educational innovation and training, using open source software and technologies. Teachers, university students, staff of NGOs and other foundations come to receive training on the use of technology in the educational process.

The project also strengthens the role of the private sector in achieving inclusive and sustainable growth in developing countries. The organizations  promote and strengthen public-private partnerships by creating new, multilateral partnerships and alliances between national and local authorities, business and NGOs in order to facilitate the development of local capacity and the delivery of services, particularly in rural areas for women and other marginalized groups.

More than 390 people will benefit from this alliance, including technical staff and educational officers of the Fundación Zamora Terán (15), teachers from primary schools in Nicaragua (52), students of the San Judas Tadeo Educational Center of Managua (188), University students from UNAN, UdM and UNI of Nicaragua (105), university support staff of the Free Software Development Center (10), NGOs, technical personnel and Nicaraguan Educational Foundations (20 participants).

unnamed (1)

The applications developed for the XO Laptops will benefit 224,000 people in the region, including 45,500 children, and more than 1,000 teachers in schools in which the FZT has a presence in Nicaragua and Honduras. Applications developed during phases I and II of the project will be available through the XO Laptops and will be distributed nationwide. All XO Laptops use free software. In addition, the families of participating children will have the ability to access and use such applications.

unnamed (3)

by Diriana Teran at June 07, 2017 04:41 PM

March 09, 2017

OLPC San Francisco blogs

Ethiopia: A New Project

OLPC San Francisco will be hosting our monthly meeting Saturday, March 11th, from 10:30AM - 1PM at the downtown SFSU campus, 835 Market Street, 6th floor, room 609.

Please RSVP:

https://www.eventbrite.com/e/olpc-sf-march-meeting-ethiopia-tickets-8350942895

This month, the **new** OLPC XO-NL3 Laptop is going to Ethiopia. Come and see the new device at work. We'll have a discussion with the project lead Andreas Gros of Facebook and project computer expert Sameer Verma of SFSU. Discussion will be moderated by Alex Kleider.

We will have Ethiopian coffee and light snacks.

Agenda
- Meet and greet
- Ethiopia and the new OLPC XO-NL3 Laptop
- Project updates
- Project working time

Our meetings are held on the second Saturday of every month. Everyone is welcome to join us for our monthly meeting! We'll be discussing the latest in OLPC events and give updates on our local (and global) projects. There will be plenty of XO laptops with the latest builds to play around with, too.

by sverma at March 09, 2017 04:03 AM

December 22, 2016

Tomeu Vizoso

Slides on the Chamelium board

Yesterday I gave a short talk about the Chamelium board from the ChromeOS team, and thought that the slides could be useful for others as this board gets used more and more outside of Google.

https://people.collabora.com/~tomeu/Chamelium_Overview.odp


If you are interested in how this board can help you automate the testing of your display (and not only!) code and hardware, a new mailing list has been created to discuss its uses. We at Collabora will be happy to help you integrate this board in your CI lab as well.

Thanks go to Intel for sponsoring the preparation of these slides and for allowing me to share them under an open license.

And of course, thanks to Google's ChromeOS team for releasing the hardware design with an open hardware license along with the code they are running on it and with it.

by Tomeu Vizoso (noreply@blogger.com) at December 22, 2016 08:58 AM

November 04, 2016

OLPC San Francisco blogs

San Francisco Mayor Ed Lee proclaims Nov 5 2016 as OLPC Day in San Francisco!

We are once again pleased to share that San Francisco Mayor Edwin M. Lee has declared November 5, 2016 as One Laptop per Child Day in San Francisco! The Proclamation was presented to Sameer Verma, Professor at San Francisco State University, and Founder OLPC SF by Carol Ruth Silver, a long time city official, social activist and author.

 

by Anonymous at November 04, 2016 10:46 AM

July 30, 2016

Edit Fonts Activity

Welcome Page UX Concept

This is just an idea I had last night for improving the welcome screen UX, if it’s too much work or Dave and Yash don’t like it I understand. However, I may try to code it myself for fun if Yash doesn’t have time. :-)

My fear is that when users start the Edit Fonts activity for the first time they will be be lost and not understand what to do. Some users might not even have a basic understand of what vector drawing is or how a font is made. This welcome screen will at least give the users a basic idea about how to use the activity. Most importantly, this makes the first screen visualy interesting, interactive and fun. Many users may not continue with the activity if the first page is dull and boring.

I’m proposing that the welcome screen have 4 options, represented by icons and text, plus an editable .glyph that reads “Edit Fonts” in the Geo typeface. The Edit-Fonts logotype will be one .glyph file that is only loaded and never saved. see below:

UX concept 01

UX concept 02

I have added a Geo-Regular.ufo file to the gh-pages repo with a special “editfonts.glyph” logotype:

https://github.com/sugarlabs/edit-fonts-activity/tree/gh-pages/files/fonts/Geo-Regular.ufo

editfonts.glyph

There are two neat things about this approach. First, it uses components we already have, the only work will be laying out the page, which Dave or I can attempt if Yash is too busy. Second, if the user never realizes that the edit fonts logotype is editable, it still functions as a logotype. A similar UX design pattern was used for the start screen of the game Super Mario 64, see below:

Mario 64 easter-egg

by Eli Heuer at July 30, 2016 06:30 PM

July 12, 2016

Edit Fonts Activity

Continuous Integration With Travis and flake8

Last Saturday (July 9th) Eli and I met up to review the codebase, and the main issue I identified was that Travis was not set up with flake8 to test the codebase was conforming to the pep8 guidelines.

I’d filed Issue #17 for this, back at the start of the project on May 19. Yash had started to develop the [.travis.yml](https://github.com/sugarlabs/edit-fonts-activity/blob/gh-pages/.travis.yml) file to build a .xo bundle but hadn’t complete this just yet, so I commended out most of the code and what remained is very simple:

# this makes travis run a fast Docker container system
sudo: false
# we use python 2.7
language: python
python:
  - "2.7"
# we need to install flake8 to use it
before_install:
  - "pip install flake8"
# we check the codebase
script: 
  - "flake8 --statistics --ignore=E402 --exclude=defcon,extractor,fontTools,fontmake,robofab,ufo2ft,ufoLib,snippets ."

You can see there’s a few arguments passed that are pretty simple.

Stastics prints the number of occurences of each error, so you can fix the most common issues across the codebase first.

E402 is about the order of imports, but since we need to import gi to version later imports, we can’t adhere to that rule, so we ignore it.

We also exclude all the third party libraries, and our snippets.

Eli and I worked together on this and I finished it up on Sunday in Pull Request #65

Yash had already set up Travis configuration, at https://travis-ci.org/sugarlabs/edit-fonts-activity, so once this was merged, our button went green:

travis button is green

Finally I added a CONTRIBUTING.md file that explains how to use it.

I’ll get a similar travis set up for the gh-pages branch too.

Perhaps we could also set up a git hook that runs the flake8 command on each commit…

by Dave Crossland at July 12, 2016 06:30 PM

September 11, 2015

Kartik Perisetla's Sugar Hacks

WikipediaHI: Offline Wikipedia in Hindi !!





Last week I spent some time working on WikipediaHI activity for Sugar Desktop Environment. I must say it is one of the awesome activities I have come across. The best part is that it can serve you with data in offline mode. That is even if don't have internet connection which is otherwise required to access Wikipedia online, then also your WikipediaHI activity will serve your purpose.

There are lot many developers and contributors who are working in collaborative form on such awesome stuff who continuously inspire you to take up new things and create something that can be used by others in the world. Sugar developers and contributors are epitome of such group.

I came across few of such developers, Anish Mangal and Gonzalo Odiard, two of them whose contributions are significant for Sugar. I took up the task of creating WikipediaHI using Wikipedia dump for Hindi available for free. I followed the steps specified on this page[ hosted by Gonzalo] for creating Wikipedia activity in your own language.

I will quickly explain the steps I took to create WikipediaHI:

1) Downloaded the Wikipedia dump file for Hindi:
http://dumps.wikimedia.org/hiwiki/20121225/hiwiki-20121225-pages-articles.xml.bz2
NOTE: [ Make sure you pick the valid latest file from here : http://dumps.wikimedia.org/hiwiki/   this location will show you listing as per dates. Pick the latest dump and proceed further.]

and downloaded WikipediaBase from this link

2) Created "hi" directory for HINDI under WikipediaBase directory and moved the downloaded dump to this folder.

3) Extracted contents of this file using:
bzip2 -d hiwiki-20121225-pages-articles.xml.bz2

4) Processed the dump using page parser:
../tools2/pages_parser.py

The result of this operation will generate these files:
hiwiki-20121225-pages-articles.xml.links
hiwiki-20121225-pages-articles.xml.page_templates
hiwiki-20121225-pages-articles.redirects
hiwiki-20121225-pages-articles.templates

5) Then you can include selective articles or all articles from this dump to your activity by using this command:
../tools2/make_selection.py
* Make sure you have favorites.txt and blacklist.txt filled with appropriate keywords.

Now if you want to include all articles use this command:
../tools2/make_selection.py --all

6) Then proceed to create the index for these articles:
../tools2/create_index.py

7) In order to test the index created in previous step you can use this command:
../tools2/test_index.py

8) Next step is to expand the templates of articles :
cd ..
./tools2/expandtemplates.py hi

9) Go back to hi directory and re-create the index :
cd hi
mv hiwiki-20121225-pages-articles.xml.processed_expanded hiwiki-20121225-pages-articles.xml.processed
../tools2/create_index.py --delete_all

10) Download the images for the articles you selected:
cd hi
../tools2/download_images.py

if you want to download the images for pages you selected in previous step:
../tools2/download_images.py --all

11) Create files specific to language:
(a)activity/activity.info.lang : activity info file for you language activity
(b)activity/activity-wikipedia-lang.svg : activity icon for your language
(c)activity_lang.py : activity file for your language
(d)static/about_lang.html : about page for wikipedia in your language.
(e)static/index_lang.html : index page for wikipedia in your language. This is the page displayed when activity is launched. So its important for you to know the articles included in the search.db ( generated when index is created) for you to create the index page.


12) Create the XO file for wikipedia in your language:
./setup_new_wiki.py hi/hiwiki-20121225-pages-articles.xml

I went through the search.db file to identify the articles present in it and create the index page accordingly.
This gave me an idea to write some script that can generate index page(part or whole) to be used as home page for activity using search.db[ Stay tuned for next blog on this idea]

Here you go.. you can see WikipediaHI

On launching this, you can see the index page listing the articles you can view offline using WikipediaHI

If you want to play with WikipediaHI, you can download it : WikipediaHI-35.xo

I must thank Gonzalo for his amazing help and guidance in getting this done. I have to mention here that Wikipedia
changed its XML format in their dumps which resulted in error when I was creating the index. I took Gonzalo's help to get it resolved.
Thanks to Anish, who motivated me to pick this up and guided me to complete it.

Thanks guys !! :D

by Kartik Perisetla (noreply@blogger.com) at September 11, 2015 05:39 AM

August 25, 2015

Walter Bender

Sugar Digest 2015-08-25

Sugar Digest

1. Google Summer of Code 2015 is wrapping up. The students have been writing their final blog reports, submitting last-minute patches, and uploading their code to Google. I want to take this opportunity to thank all of our students and their mentors for all their hard work this summer. (Also, thanks once more to Google for supporting this program.) Great strides along many fronts were made. Specifically,

  • Michaël Ohayon worked on Web versions of some core activities for the Sugarizer project: Calculate, Paint (with collaboration, Record, and Memorize. He also submitted patches to Turtle Blocks to make it compatible with Sugarizer. Michaël’s blog and git repo are worth visiting. (Mentor: Lionel Laske)
  • Yash Khandelwal worked on Music Blocks AKA Mouse Music. This is a powerful, playful model for music in a block language. Yash’s blog and git repo are also worth visiting. (Mentors: Devin Ulibarri and Marnen Laibow-Koser)
  • Ishan Sharma revisited the Turtle 3D concept, rewriting it in Javascript. His results (blog, demo and git repo) are robust, scalable, and extensible. (Mentor: Walter)
  • Amit Kumar Jha worked on extensions to Turtle programming this summer. He added argument passing and return values to procedures, passing arguments to and returning values from Turtle programs so that Turtle Blocks can be used for in-line programming by all Javascript activities, and he developed a unit-test framework for Turtle Blocks JS that can be extended to all of our Javascript activities. See his blog and the master Turtle Blocks JS repo for more details. (Mentor: Walter)
  • Richa Sehgal worked on a framework to support off-line Web programming, an interactive Javascript shell. She’s submitted patches to the upstream Browse activity. Meanwhile, checkout her git repository. (Mentor: Tony Anderson)
  • Vibhor Sehgal and Utkarsh Dhawan, although not officially GSoC students, worked with Tony and Richa on a parallel project, Web Confusion, a series of programming challenges in the spirit of Turtle Confusion to encourage students. (Mentor: Tony Anderson)
  • Abhinav Anurag made some progress on a Web collaboration framework for our Javascript activities. See his blog and code. (Mentors: Martin Abente and Lionel Laske)

In the Community

2. We will be holding an election for the Sugar Labs oversight board (SLOB) at the end of the calendar year. If you are interested (or know someone who is interested) in running for a board seat (all seven seats will be open), please add an entry in the wiki. Also, whereas ballots are only available to “members”, please officially join Sugar Labs.

3. Mariah Noelle Villarreal has submitted a panel proposal, “Building Free and Open Education Communities”, to the South by Southwest Conference (SXSW). The panelpicker voting period is now open until September 4th. If you have time, please vote and share with any appropriate channels as well as a video that was created for the proposal [16].

4. Sweet: Sugar contributors Mariah Noelle Villarreal and Ruben Rodriguez got married this summer!!!

5. There were three RED (Revista de Educación a Distancia) submissions from Sugar community members:

  • Going from Bits to Atoms: Programming in Turtle Blocks JS and Personal Fabrication in Youth Maker Projects, Josh Burker
  • Visualizing Learning in Open-Ended Problem Solving in the Arts, Walter Bender and Claudia Urrea
  • Sensores Tortuga 2.0: Cómo el hardware y software abiertos pueden empoderar a las comunidades de aprendizaje (Turtle Sensors 2.0: How open hardware and software empower learning communities) by Guzmán Trinidad, Andrés Aguirre, Alan Aguiar, Tony Forster, Walter Bender, Facundo Benavides, and Federico Andrade

6. The Sugar/OLPC program in Caacupe is expanding!!!

Tech Talk

7. Peter Robinson announce quite some time ago that the Sugar on a Stick 21 Beta is now out as part of Fedora 21 Beta (Details), but I think I neglected to ever pass on the information to the Sugar community.

8. Also worth mentioning again: Ruben Rodriguez released Trisquel 7.0 released. TOAST (Trisquel with Sugar) is an official edition.

Sugar Labs

9. Please visit our planet.

 

by Walter Bender at August 25, 2015 03:46 PM

July 30, 2015

Fargo XO / Sugar Labs NDSU

PODS Game Design | Inspiring children in the Fargo-Moorhead-West Fargo area to enhance their creativity by designing video games.

PODS Game Design | Inspiring children in the Fargo-Moorhead-West Fargo area to enhance their creativity by designing video games..

PODS picking up where Sugar Labs @ NDSU left off, except:
a. they seem to be charging for classes
b. they want to reach as many kids as possible but probably aren’t focusing on under-represented populations
c. they want to “enhance creativity;” we were trying to focus on computational thinking. Ironic.


by kab13 at July 30, 2015 04:09 AM

July 24, 2015

Sugarizing Paris 2015

Collaborative Painting

Hi everyone !

Since last blog post, I've been working on the Paint activity.
The Paint activity is quite simple to understand : it's a drawing area with many options.

At first we were only able to draw simple things


There are many tools :

- Color picker
Some predefined colors are available.
You can get any color by using the sliders



- Undo / Redo
To be able to recover after a mistake :)


- Eraser
A simple eraser to remove things


- Stamps
You can add stamps. They will use the colors you've defined and can be scaled !


- Text
You can add text with specific color and font !


- Drawings
Some drawings are bundled inside the application


- Bucket
This tool will fill an area with the color you've picked


- Effects
You can apply effects to your painting


- Copy / paste
This tool will simply copy / paste an area

- Collaboration 
The application can be launched from two platforms and communicate.
The two windows are sharing the same painting area.



This will soon be available inside sugarizer. Stay tuned !


by Michaël Ohayon (noreply@blogger.com) at July 24, 2015 06:57 PM