s6 & webpack %!s(int64=11) %!d(string=hace) años README.md 60f23fa643 rename entry.js to index.js %!s(int64=11) %!d(string=hace) años comments.js 915445b005 fully support server-side rendering %!s(int64=11) %!d(string=hace) años comments.json 8a83c48c5d load comments from json %!s(int64=11) %!d(string=hace) años content.js ee9e35002c hello, es6 & webpack %!s(int64=11) %!d(string=hace) años index.html 8008ab6291 add missing doctype %!s(int64=11) %!d(string=hace) años index.js 72c5a34565 split comment classes into a separate file/module %!s(int64=11) %!d(string=hace) años package.json 52d1b31722 support markdown in comments %!s(int64=11) %!d(string=hace) años static.js 915445b005 fully support server-side rendering %!s(int64=11) %!d(string=hace) años style.css ee9e35002c hello, es6 & webpack %!s(int64=11) %!d(string=hace) años webpack.config.js 60f23fa643 rename entry.js to index.js %!s(int64=11) %!d(string=hace) años

README.md

Playing with React

More opinions/impressions coming later, when I have played with this more.

Impressions

  • ES6 is quite cool, especially if you wrote just plain JS before (using 6to5)

    Some things: import React from "react";, template strings, () => ...,

  • webpack is fun/convenient/surprisingly fast (and has support for all the things we use here, e.g. react/jsx, 6to5, css)

  • JSX works well, even though I'd prefer doing it in Clojure (hiccup syntax, e.g. nested vectors & collections. has someone written a library for that already?)

  • showdown, which was suggested by the tutorial, doesn't work with module loaders and it was a pain to figure out how to fix it. (the fix was using a different library.)

How to run this thing

$ npm install -g webpack
$ npm install
$ webpack --watch

# visit index.html in your browser

$ vi index.js      # change something!

Ideas

  • follow "the way", at least at first, see how it works.
    • e.g. JSX, 6to5, webpack (JSX is a react thing, 6to5 & webpack are for sanity)
  • things to try
    • build a tiny thingy ("profile badge")
    • put it in a list
    • sort the list
    • filter the list
    • make the filter dynamic (optional/difficult)
  • in the future:
    • try out immutable.js & reimplement the above
    • try out css-layout and/or styles in js

Resources

  • React.js Conf 2015 seemed fun & quite interesting. For inspiration, watch HYPE!
  • om, because you actually want to use Clojure ;)

Misc

  • npm config set prefix $HOME/.local --global
lp - git.papill0n.org

Нет описания

Lucas Stadler d84545543b Note that it needs to be built with nightly лет назад: 10
..
src b030f12a8e Merge the two `impl` blocks for PNGImage лет назад: 10
.gitignore 416aa59f35 Initial commit: Hello FFI in Rust! лет назад: 10
Cargo.lock 416aa59f35 Initial commit: Hello FFI in Rust! лет назад: 10
Cargo.toml 416aa59f35 Initial commit: Hello FFI in Rust! лет назад: 10
README.md d84545543b Note that it needs to be built with nightly лет назад: 10

README.md

coffi - Some FFI experiments in Rust

Playing with the FFI in Rust. Surprisingly easy, but there are likely dragons elsewhere.

Quickstart

Display some information about a PNG file, most notably it's width and height.

cargo run <path-to-png>

Should build with Rust 1.6.0-nightly, which is necessary because it uses the feature(libc) flag.

If you use emacs, flycheck-mode can check the code on the fly, which is awesome!

Why "coffi"?

Not sure, only the "ffi" part makes sense now. Ah, no, the "co" comes from cos, which was the first function we wanted to wrap. That turned out so easy that we tried libpng next.

Sign In - git.papill0n.org

Sign In