Giter Site home page Giter Site logo

kquick / tour_of_nix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nixcloud/tour_of_nix

0.0 3.0 0.0 8.58 MB

Sourcecode to the https://nixcloud.io/tour/ 'a tour of nix'

License: Other

JavaScript 68.22% CSS 3.44% Shell 0.01% HTML 28.29% Nix 0.03%

tour_of_nix's Introduction

introduction

this repository contains 'a tour of nix', an interactive programming guide dedicated to the nix programming language. there is also a standalone version called 'nix-tour' which is based on 'electron' and can be installed and used offline.

https://nixcloud.io/tour/

happy learning!

HINT: we have a newer version of 'a tour of nix', which is based on 'bootstrap' but it is not released yet.

meerkats FTW

building & running

nix does not build with emscripten on nixos out of the box. making nix-instantiate run in the browser requires many modifications to the nix source base and lots of optimizations so that it is 'fast'.

technical background:

https://lastlog.de/blog/posts/tour_of_nix.html

to see the tour, simply do this:

firefox

firefox index.html

chrome/chromium

nix-shell -p python --command 'python -m SimpleHTTPServer'
chromium localhost:8000

note: chromium won't load xhr requests from file:// but instead requires a webserver to work.

electron

with electron we can create a native executable so that one can use nix-env to install the tour locally.

manually invoking it:

nix-shell
electron electron-main.js

install it:

nix-env -f default.nix -iA nix-tour

afterwards you can start it like this:

nix-tour

collaboration

if you want to contribute questions or fixes to them, there is a file called questions.json. just edit this file and reload the 'tour' in your browser. there is a guide on how to edit questions contained in the last question of the tour.

future work

source code rework

we, the nixcloud devs, are working on a new emscripten based toolchain in nix. once this is final, we will redo the emscripten port cleanly and put the source on our repository.

see:

until that happens you can request the source code via email from us which currently is a 300mb git repository in a very unusable state. this is also the reason why we didn't upload it yet.

license

the bundled nix-instantiate as well as the questions.json file are licensed as:

   GNU LESSER GENERAL PUBLIC LICENSE
       Version 2.1, February 1999

exactly as the original nix codebase.

third party

we bundled many different tools:

see COPYING.md for details on their license.

oh, and there is this font/ - directory. really don't have a clue what license that uses. was from google and is probably licensed 'world domination with no privacy' or something... not sure...

bundled nix-instantiate

we added these files into this repository, which is used to evaluate so called nix-expressions:

  • nix-instantiate.html.mem
  • nix-instantiate.data
  • nix-instantiate.js
  • nix-instantiate.js.mem

note: if you want to use this library for other purposes than this 'tour of nix' you probably want to read the 'building & running' section above. and you really want to read the blog post listed there.

authors

meerkats FTW

tour_of_nix's People

Contributors

kquick avatar qknight avatar seitz avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.