Skip to content

Instantly share code, notes, and snippets.

🎯
$mol on atom2

nin-jin nin-jin

🎯
$mol on atom2
Block or report user

Report or block nin-jin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View comments
Содержимое удалено по требованию правообладателя.
View example.jin.atom.js
var userData = $jin.atom({ pull: function( ){
setTimeout( function( ){
userData.put({ name: 'User', time: Date.now() })
}, 1000 )
}})
userData
.then( function( val ){
@nin-jin
nin-jin / gist:13297c8723ecf4516dda
Last active Aug 29, 2015
Инкапсуляция и сокрытие
View gist:13297c8723ecf4516dda
/**
* Инкапсуляция
*
* @class Greeter1
*/
var Greeter1 = function(){}
/**
* Генерирует прикольное имя
*
@nin-jin
nin-jin / gist:111f32935da5c758a1c8
Last active Nov 25, 2015
Dlang non blocking messaging
View gist:111f32935da5c758a1c8
import std.stdio;
import std.concurrency;
import std.conv;
import core.thread;
shared class Msg
{
string value;
Msg next = null;
Tid from;
@nin-jin
nin-jin / coroutine.d
Last active Oct 9, 2015
Sorting comparison
View coroutine.d
import vibe.core.core;
import core.time;
import std.stdio;
int counter;
void say( string name ) {
for ( int i = 0 ; i < 3; i++ ) {
sleep( 100.msecs );
writeln( ++counter , " " , name );
View string-mixin-runtime-error.d
import std.stdio;
T eval( string op , T )( T a , T b ) {
return mixin( q{a} ~ op ~ q{b} );
}
unittest {
writeln( eval!q{/}( 123 , 0 ) );
}
View gist:33f744f60a5da7c10151
// Открываем http://nin-jin.github.io/demo/list/index.html
// Вводим в консоль:
// Включаем все логи
$jin2_log_filter=/./
// Меняем фамилию одного персонажа
$jin2_demo_list_person.item( '55e06d82e14bac808b2bc77f' ).lastName.set( 'Aaron' )
// Получаем следующие обновления состояний:
View todomvc.view2.tree.sass
$mol_app_todomvc : $mol_scroller
#childs /
#pager : $mol_lister
.childs /
#titler : $mol_viewer
.heightMinimal = 142
.childs /
#title @ \todos
#paneler : $mol_lister
.rows <= #panels /
@nin-jin
nin-jin / cycle_hello.js
Last active Jan 26, 2017
CycleJS vs $mol
View cycle_hello.js
import {run} from '@cycle/xstream-run';
import {div, label, input, hr, h1, makeDOMDriver} from '@cycle/dom';
function main(sources) {
const sinks = {
DOM: sources.DOM.select('.field').events('input')
.map(ev => ev.target.value)
.startWith('')
.map(name =>
div([
You can’t perform that action at this time.