kidkarolis / polychrome Goto Github PK
View Code? Open in Web Editor NEWPolyChrome is a Firefox extension that can run Standard ML programs embedded in HTML documents
Home Page: http://kidkarolis.github.com/PolyChrome/
License: MIT License
PolyChrome is a Firefox extension that can run Standard ML programs embedded in HTML documents
Home Page: http://kidkarolis.github.com/PolyChrome/
License: MIT License
Only for snippets of code. For included files it reports the line correctly.
It should only display single alert.
Multiple clicks on the polychrome icon (at the bottom-right), to start a polyml console, opens up multiple-pop-up windows asking if you want to open the console. We should only open up one however many times that icon is clicked.
<script type="application/x-polyml" src="no_such_ml_file.sml"></script>
Gives lots of spurious errors if the file "no_such_ml_file.sml" does not exist. We should detect if the file doesn't exist (404 messages), and give a sensible error.
https://github.com/caolan/kanso/issues/39 ;)
one possibility is using a git hook
the extension has been reviewed. And remove the scary looking Warning header
For example, currently, all values sent to Poly as part of a foreign function call are strings. Every function using jsffi.exec_js... has to convert those strings into appropriate types. Which is also not that nice, because currently there is no guarantee that for example a string received from JavaScript can always be parsed into an Integer etc.
Additional dirty bit is a similar function Memory.convertArgsToPoly, which is used in Poly callbacks, where strings like "some_function arg1 arg2 arg3" are formed from javascript variables. Similarly to before, there is currently no guarantee that the number of arguments to the functions is going to be the same all the time or that those times are always gonna be the same. For example, if function "some_function" is of type int -> int -> string -> unit, we can't guarantee that the first argument in javascript function call will be smth that can be parsed into int.
different elements, like htmlelement, formelement.... fptrs.. libraries.. shapes.. etc..., datatypes, signatures, structures...
Setting the custom ML path does not work (in settings)
try entering
2+2
it produces an output
try entering
2+
now whatever you enter won't have any effect :(
when included like this: <script type="application/x-polyml" src="empty.sml"></script>
This way all of the output produced by PolyML (like compilation information of the extension) will be printed to console.
Currently, you can't see extension compilation errors if you don't open firefox from the terminal
Won't be needed if #4 solved
The way JavaScript functions are executed in JSFFI.js allows only for certain types of functions to be called. I think, because of the way "this" is handled when doing obj[field].apply(obj, args);
Resize browser so that a horizontal scrollbar appears. When scrolling, the navigation goes on top of the content.
The simplest fix would be setting navigation's background:white.
Currently, to enable callback handlers, one has to define a table to store the handlers and then define special handling functions that can call functions from that table. Try to implement this in jsffi in a more universal way, to allow for adding callbacks like this:
exec_js ojb "drag" [args.callback f, args.callback b]
This would be a more direct way of executing PolyML script tags. Firefox would ask our XPCOM component to execute the code every time it finds a script tag. This way you wouldn't need to reread the page after it has loaded.
On the other hand, this is also too Firefox specific and it might actually slow down the rendering of the page.
Now the same code is used in Socket1 and Socket2 prototypes. Should have done this in the very beginning, but I can't seem to get this prototype inheritance right.
a workaround is to create a wrapper function in the html doc like
fun newSomething() {
return new Someting();
}
and calling this wrapper function from sml
exec_js_call "newSomething"
Would be nice to have a complete JSON library. Could be reused in many other projects. It's not that big so it shouldn't be hard to fully implement it.
It could then be used in parsing messages from Firefox and event data. Also for example for jQuery function parameters (e.g. jQuery.ajax({type:GET, url:www});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.