Giter Site home page Giter Site logo

bkr's Introduction

bkr

Beaker headless runtime for the hyper:// space network.

WORK IN PROGRESS

Usage

Command overview:

Usage: bkr <command> [opts...]

Commands:

  server - Start the hyper:// server. Most other commands require this to be running.
  run {js-path-or-hyper-url} - Run a script.

  Learn more at https://github.com/beakerbrowser/bkr

bkr's People

Contributors

joehand avatar pfrazee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bkr's Issues

Conversion to native ArrayBuffer and TypedArray types is inefficient

As far as I can tell, the nodejs vm (or vm2) does not use the ArrayBuffer or TypedDataView objects that are native to the VM's realm, causing things like v instanceof ArrayBuffer to "incorrectly" fail when running scripts in the VM.

To solve that, I'm currently converting responses to the correct type. On top of that, some functions return node's Buffer type, which we also have to convert.

To do that, I'm injecting a frontmatter/preload into the VM scripts: https://github.com/beakerbrowser/bkr/blob/master/lib/run/preload.js

I'm opening this issue because my solution sucks and it'd be much nicer if this data types correctly converted over.

(FWIW, I'm generally not pleased with having to run rollup on modules to produce a bundle because it fucks up stack traces. We might be able to solve that with some kind of source-map manipulation on stacks.)

Minor—bkr dev on totally empty directory fails

Operation System: macOS
bkr version: 1.1.0 (per npm)

Attempted to follow screencast with an empty directory: mkdir testing && cd testing && bkr dev produces:

➜  testing bkr dev

  Building '/.../bkr-stuff/testing'...
fs.js:885
  binding.lstat(pathModule._makeLong(path), req);
          ^

TypeError: path must be a string or Buffer
    at Object.fs.lstat (fs.js:885:11)
    at kick (/usr/local/lib/node_modules/bkr/node_modules/folder-walker/index.js:33:8)
    at /usr/local/lib/node_modules/bkr/node_modules/folder-walker/index.js:44:28
    at FSReqWrap.oncomplete (fs.js:112:15)

But if I touch foo && bkr dev, all is well.

Sorry to make my first issue be so pedestrian. Much 💕 for bkr.

Add bkr --version

Unix commands tell their version if you do eg: ls --version
bkr does not.

Block-scoped declarations issue

Trying to run the "bkr" command will always result in this issue:

/usr/local/lib/node_modules/bkr/node_modules/dat-dns/index.js:54
    let key, ttl
    ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/bkr/build/lib/opts.js:74:15)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

EDIT: My OS is Ubuntu 16.04 LTS using Linux 4.4.0-64-generic

Supported beaker version

I'm giving bkr a try, using bkr 2.0.2 and beaker browser 0.7.2.

Launched beaker browser, created a new directory and tried bkr init only to get the error

Error: Could not connect to Beaker. Is it running?

Am I missing something, or is it just a question of incompatible versions?

Better bkr clone

Currently, clone will ditch out if the target site isn't in the current saved-sites library. It'd be much better if it would search the network for sites that aren't cached. Should also support dat-dns, and give the user feedback about the clone progress.

  • Clone archives that aren't yet in the sites library
  • Provide live feedback about what's being downloaded
  • Support dat-dns

Nice to have: clearer P2P workflow example?

As a distributed P2P system in a browser, that allows to share information and files in a distributed network with others that use Beaker, using encryption, and with CLI, clone, fork, etc. capabilities, I think (for non coders) it would be nice to have clearer P2P workflow examples. Ok I got my secret url and I want to share it with you. How do I do it? I am still figuring out how this sharing of url's happen and but I can see this used in specific domains of Journalism. I wonder if it also supports emojis like 🤘

Version out of date with Beaker Browser

When attempting to use the newest version of Beaker (0.6.1) with the bkr CLI, an error appears stating:

Bkr version is 1.1.0 and minimum required is 2.0.0. Please update bkr!

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.