Comments (12)
Good point. It would be nice to have modules like Set
, Observable
, and JSON
. The problem is figuring out where to load them from. Either the files can be distributed in the application bundle and loaded from there, or they can be compiled and linked statically with the project. I believe I'd like to link them statically, since then we can ensure that everything works. Then, the problem is deciding which libraries to include. Any thoughts?
By the way, this brings up a security issue. I thought I had undefined require
along with methods like exit!
, but apparently not all the way. This commit should take care of that.
from decaf.
Taking a quick peek at lib/ from ruby...
- set
- observable
- json
- uri
- ostruct
- securerandom
- base64
- csv
- delegator
- erb
- forwardable
Probably others but that's what jumped out the most in quick look at 'lib/'. Probably okay to miss things as long as a clear way to include stdlib code is introduced so missing bits can be added later, right?
from decaf.
Also, to go off topic on this ticket. Absolutely loving being able to play around with the DOM in Ruby. Match made in heaven.
from decaf.
I'll look into including some or all of these libraries soon. I never knew about OpenStruct, and that might be a nice format to convert JSON to.
Anyway, I'm glad you like it! Making anything cool?
from decaf.
I'm playing with porting concepts I use in a personal js app framework to ruby https://github.com/collin/AlphaSimprini.rb/blob/master/app/assets/javascripts/alpha_simprini/core/view.rb
So far it's a dream.
from decaf.
Nice! I agree that it's kind of a dream to use Ruby in the browser.
Back to the topic, I'm putting out a new binary soon, but it doesn't have the standard libraries. I'll work on adding these libraries for the next major update.
from decaf.
I would love if you could include/load Math library by default, there is no pure ruby version Math library available
from decaf.
@senthilnayagam Do you mean this Math library? If so, it's already in there. Try Math.cos(Math::PI)
.
from decaf.
Thanks you saved my day :)
from decaf.
is there a way to load a local ruby script in the web pages context.
this way I can include my favourite scripts to automate testing, or crawling the pages, there are some javascript based tools like phantomjs which does this with javascript, but a ruby option would be awesome
from decaf.
also some way to remotely connect to decaf instance like how pry-remote does with DRB, this way we can script it from a normal ruby script
from decaf.
I'm not quite sure what you're looking for in the past two comments. Could you elaborate?
from decaf.
Related Issues (18)
- Cross-site monkey-patching security
- Crashes instantly under 10.7.5 HOT 8
- This project seems misguided HOT 2
- ObjectSpace.each_object HOT 1
- DOMClass#dup and related methods crash the app. HOT 5
- Run only one website like Fluid? HOT 2
- Support Linux and Windows HOT 28
- google.com search result HOT 3
- Multiplying 2 large integers in the console results in a crash. HOT 1
- Add a shortcut to open the console in the MiniBrowser. HOT 1
- If JavaScript also has to be used besides Ruby, Is it possible with Decaf? HOT 3
- Add Ruby support in the main WebKit repository HOT 4
- Debugger doesn't always stop on breakpoints
- Future and beyond HOT 3
- Unicode (Chinese) characters went wrong in method `element.text()`
- Ajax?
- How does this compare to OpalRb?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decaf.