Alexander Tsepkov
Software developer, entrepreneur, and creator of RapydScript language.
For those who prefer Python over JavaScript and think CoffeeScript feels more like Perl
Alex Tsepkov
1 == '1' // true
[1, 2] == [1, 2] // false
{} + 'foo' // NaN
'foo' in ['foo'] // false
typeof [] // object
typeof {} // object
typeof new Date() // object
function test() {
foo = 1;
}
test();
console.log(foo); // 1
class Foo {
bar() {
setTimeout(function() {
console.log(this);
// outputs Timeout
}, 1000);
}
}1 == '1' # False
[1, 2] == [1, 2] # True
{} + 'foo' # TypeError
'foo' in ['foo'] # True
type([]) # Array
type({}) # Object
type(Date()) # Date
def test():
foo = 1
test()
print(foo) # ReferenceError
class Foo:
def bar(self):
setTimeout(def():
console.log(self)
# outputs Foo
, 1000)class Rectangle:
def __init__(self, w=1, h=1):
self.width = w
self.height = h
def getArea(self):
return self.width*self.height
@staticmethod
def isRectangle(object):
return isinstance(object, this)
a = Rectangle(5, 10)
a.getArea() == Rectangle.getArea(a)
print(Rectangle.isRectangle(a))"use strict";
... bootstrap logic omitted ...
(function(){
var __name__ = "__main__";
var ՐՏ_1, ՐՏ_2, ՐՏ_3, a;
var Rectangle = (ՐՏ_1 = function Rectangle() {
Rectangle.prototype.__init__.apply(this, arguments);
}, Object.defineProperties(ՐՏ_1.prototype, {
__init__: {
enumerable: true,
writable: true,
value: function __init__(w, h){
var self = this;
w = w === void 0 ? 1 : w;
h = h === void 0 ? 1 : h;
self.width = w;
self.height = h;
}
},
getArea: {
enumerable: true,
writable: true,
value: function getArea(){
var self = this;
return self.width * self.height;
}
}
}), Object.defineProperties(ՐՏ_1, {
isRectangle: {
enumerable: true,
writable: true,
value: function isRectangle(object){
return object instanceof this;
}
}
}), ՐՏ_1);
a = new Rectangle(5, 10);
((ՐՏ_2 = a.getArea()) === (ՐՏ_3 = Rectangle.prototype.getArea.call(a)) || typeof ՐՏ_2 === "object" && ՐՏ_eq(ՐՏ_2, ՐՏ_3));
ՐՏ_print(Rectangle.isRectangle(a));
})();class ColorSwatch:
"""
Color selection and preview widget
"""
def __init__(self):
fg = $('<div></div>')\
.width(36).height(36)\
.css({'position': 'absolute', 'border': '1px solid black'})
fg.change = def(color):
$(self).css('background', color)
bg = fg.clone()"use strict";
function ՐՏ_extends(child, parent) {
child.prototype = Object.create(parent.prototype);
child.prototype.__base__ = parent;
child.prototype.constructor = child;
}
function ՐՏ_Iterable(iterable) {
var tmp;
if (iterable.constructor === [].constructor || iterable.constructor === "".constructor || (tmp = Array.prototype.slice.call(iterable)).length) {
return tmp || iterable;
}
return Object.keys(iterable);
}
(function(){
var __name__ = "__main__";
var ՐՏ_1;
var ColorSwatch = (ՐՏ_1 = function ColorSwatch() {
ColorSwatch.prototype.__init__.apply(this, arguments);
}, Object.defineProperties(ՐՏ_1.prototype, {
__doc__: {
enumerable: true,
writable: true,
value: "Color selection and preview widget" },
__init__: {
enumerable: true,
writable: true,
value: function __init__(){
var self = this;
var fg, bg;
fg = $("<div></div>").width(36).height(36).css({
"position": "absolute",
"border": "1px solid black"
});
fg.change = function(color) {
$(self).css("background", color);
};
bg = fg.clone();
}
}
}), ՐՏ_1);
})();github.com/atsepkov/vim-rapydscript
github.com/tgienger/language-rapydscript
github.com/charleslaw/RapydScript-Decompiler
github.com/loolmeh/grunt-rapydscript
github.com/vindarel/gulp-rapyd
bitbucket.org/railcar88/flask-rapydscript
github.com/traverseda/django-pipeline-rapydscript
github.com/loolmeh/generator-rui-angular
github.com/ivanflorentin/RapydFlux
github.com/icarito/rapydscriptify
github.com/jfroco/Physer
github.com/tgienger/Atom-rapydscript-auto-compile
rapydscript.com
github.com/atsepkov/RapydScript
groups.google.com/forum/#!forum/rapydscript
atsepkov@gmail.com
@atsepkov
github.com/atsepkov
By Alexander Tsepkov
For those who prefer Python over JavaScript and think CoffeeScript feels more like Perl
Software developer, entrepreneur, and creator of RapydScript language.