Giter Club home page Giter Club logo

stratifiedjs's People

Contributors

afri avatar midgethoen avatar pauan avatar shanteadam avatar timbertson avatar tombyrer avatar tomger 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stratifiedjs's Issues

Error http.script

Im having a problem loading a script:

try {
require('apollo:http').script('/support/vendor/json2.js');
} catch(e) {
console.log("ERROR(0)" + e);
}

(Underlying exception: Could not load script: '[object Arguments]'.)

Apollo is not fully CommonJS comliant

Hi,
just to let you know, that apollo breaks with libraries, that rely on Common JS 1.1 Modules Spec. (most prominently underscore.js)

QUOTE FROM THE SPEC@ http://wiki.commonjs.org/wiki/Modules/1.1#Module_Context Section 1.3

In a module, there must be a free variable "module", that is an Object.
The "module" object must have a read-only, don't delete "id" property that is the top-level "id" of the module. The "id" property must be such that require(module.id) will return the exports object from which the module.id originated. (That is to say module.id can be passed to another module, and requiring that must return the original module).
The "module" object may have a "uri" String that is the fully-qualified URI to the resource from which the module was created. The "uri" property must not exist in a sandbox.

sjs status?

Hello :)

Just checking in on SJS and noticed activity on the website but couldn't find any demo code for stratified JS itself, and some of the old web content appears to be gone - https://web.archive.org/web/20210224042355/http://onilabs.com/stratifiedjs

I was wondering if it now runs on top of native JS (await/async etc.) without needing a custom JS interpreter (ok I'm a decade out of date!), or has some compiled-to-wasm thing of its own.

Are there any simple modern examples, ideally something I can run in ObservableHQ.com?

require-prefix problem with main attr, and or <script type=...sjs></script>

Hi, given below:

<script type="text/javascript" src="assets/vendor/onilabs/stratified.js" main="assets/frontend/bootstrap" require-prefix="oni"></script>

shows an error: Uncaught ReferenceError: require is not defined

I think the script should not error since the actual user script hasn't been loaded yet?

-- removing the main attr does not throw an exception though.

Can we get a non minified version?

I've enjoyed experimenting with Apollo, but only having a minified version certainly makes it difficult to dive into the code. Could we get a non minified version please?

labeled statements in __js blocks

The following code gives an error:

__js {

X: for(var i=0; i<foo;++i) { ... continue X; }

}

The problem is that our compiler translates this to:

X: i=0; for(;i<foo;++i) { ... continue X; }

I.e. the variable initialization gets pulled out of the 'for' statement.

exception annotation broken for some cases on IE and Chrome

Under some circumstances when calling SJS code from JS, exceptions thrown by SJS will not get annotated with the correct filename:linenumber under IE and Chrome.
E.g. the following code:

<script type="text/sjs"> throw new Error('foo'); </script>

will give an exception in the Chrome or IE consoles that is not annotated. In Firefox it works ok.

cannot launch apollo repl under windows

First thanks for your great work on apollo.

While launching apollo under windows with command "node.exe apollo", the following error appears:

Uncaught: Error: Cannot load module 'apollo:nodejs/repl'. (Underlying exception: Error: ENOENT, open 'K:\apollo\apollo\modules\nodejs\repl.sjs'
and then
Error: ENOENT, open 'K:\apollo\apollo\modules\nodejs\repl' (in apollo-sys-nodejs.sjs:310)) (in apollo-sys-common.sjs:702)

The root directory of apollo is k:\apollo, so the correct path of repl.sjs should be k:\apollo\modules\nodejs\repl.sjs, but it resolves to K:\apollo\apollo\modules\nodejs\repl.sjs'

I have tried node 0.6.18 and 0.7.9 and get the same error.

option to treat `.js` files as StratifiedJS sources

This would allow the users of languages that compile to Javascript to use StratifiedJS’s features more easily.

In my particular case, I’m trying to run JS‐compiled Ceylon as StratifiedJS, to be able to use StratfiedJS’s features and functions from Ceylon. Currently, everything works beautifully, but I have to manually change the compiled JS files’ extensions, and therefore have to serve them myself (I can’t use Ceylon modules directly from Ceylon’s repository, the Herd).

I propose to have a treatjs attribute on required.

It’d accept three values:

  1. js
  2. sjs-sjs
  3. sjs-js

js would act as it currently does today.

sjs-sjs would treat .js files as if they were .sjs files.

sjs-js would treat .js files as if they were .sjs files, but still resolve required resources as if they were .js files (i.e. resolve them absolutey, as opposed to relatively).

Then, we could use a module from Herd:

<!doctype html>
<html>
	<head>
		<script src="[foo]/stratified.js"></script>
		<script type="text/sjs">
			require.treatjs = "sjs-js";
			require.hubs.unshift(["herd:", "https://modules.ceylon-lang.org/repo/1/"]);
			require("herd:my/mod/0/my.mod-0.js").run();
		</script>
	</head>
</html>

add to Addy's ES6-tools & sjs: » #language/ reorg?

Thought you guys would want to review before I sent in the PR.
tomByrer/es6-tools@20a8ecd

However, when prepping this, I found the linked doc hard to read. Perhaps it could use spliting it &/or restructuring. So I'd like to hold off & fix that page so I don't have to re-submit the PR to Addy's Tools page.

It seems you have 3 sections that can be separate pages or better separated visually. Either way, I'd like Concurrency primitives & Syntax enhancements over JavaScript to get their own left-hand menu links. Not sure how to proceed...

A way to compile sjs codes?

Hi, Is there a way I can obfuscate / compile SJS scripts? I am embedding this to a node-webkit application and when the application runs, it extracts the .nw files to temp and all sources are available.

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.