Better HN
topnewbestaskshowjobs
Log inSign up

Theyeard

197 karma · joined Feb 1, 2014 (12y ago) · 32 submissions

Submissions

1.

Reactive WebRTC conference(curiosity-driven.org ↗)

2 points · by Theyeard · 11y ago · discuss

comment 11y ago · link · parent

Very nice! It reminds me of these two loader experiments: https://curiosity-driven.org/amd-loader-with-promises https://curiosity-driven.org/minimal-loader

But for production builds I highly recommend Almond: https://github.com/jrburke/almond

3.

Your language sucks because(wiki.theory.org ↗)

3 points · by Theyeard · 11y ago · discuss

4.

Continuations(curiosity-driven.org ↗)

14 points · by Theyeard · 11y ago · 1 comment

5.

Jamoscript(stackoverflow.com ↗)

2 points · by Theyeard · 11y ago · discuss

comment 11y ago · link · parent

One interesting use-case is having an Atom feed and HTML page at the same time. See source code here: https://curiosity-driven.org/

7.

HTML6 Concept(html6spec.com ↗)

85 points · by Theyeard · 11y ago · 86 comments

comment 12y ago · link · parent

I'd rather see technical details too plus maybe a comparison between require.js/almond and define.js. Currently it's not clear what are the advantages of define.js.

N.b. another AMD loader (30 lines of JS): https://curiosity-driven.org/amd-loader-with-promises

comment 12y ago · link · parent

Wow, great idea. I wish this was available as a npm package.

A couple of things, sometimes the service doesn't work and returns "YUI Compressor : 0bytes (100%)" or "JSMin : 886bytes (0%)". A typo: succees.

The references section could be expanded with resources about writing JS code in a way that enables optimizations:

http://toddmotto.com/what-function-window-document-undefined...

https://curiosity-driven.org/minimal-loader

comment 12y ago · link · parent

Kaleidoscope - LLVM Tutorial [0] is an excellent resource with code samples in C++ and OCaml.

[0] http://llvm.org/docs/tutorial/index.html

comment 12y ago · link · parent

Parsing, evaluating, continuations and CPS... it seems similar to this language: https://curiosity-driven.org/continuations#interpreter but the syntax is clearly different. Also, that interpreter is implemented in ~320 lines of JS.

comment 12y ago · link · parent

Yes, exactly. And there are a lot of tricky corner cases like SIGHASH_SINGLE when number of inputs != number of outputs with hash 0x01 [0]. Actually the entire implementation (Bitcoin Core) is the specification :) It's interesting from the software design point of view - an extreme case of backwards compatibility. It's hard even within Bitcoin Core as some changes already caused forks [1].

The article is just a demonstration but it won't hurt if it was as accurate as possible (while still being readable) :)

[0] https://en.bitcoin.it/wiki/OP_CHECKSIG#Procedure_for_Hashtyp...

[1] http://bitcoinmagazine.com/3668/bitcoin-network-shaken-by-bl...

comment 12y ago · link · parent

> By that logic you could make anything illegal, legal.

I'm not a lawyer but from a technical point of view it's almost impossible to remove any kind of data from a truly distributed network. Be it Bitcoin's Blockchain, BitTorrent or the internet itself. That's just a fact, no judge order will change it, sorry.

And as M4v3R said it'd be very expensive to add a big file like a picture to Blockchain anyway.

comment 12y ago · link · parent

Pi is a number. A picture is also a number (a very long one, just like any other file), including CP.

comment 12y ago · link · parent

The same thing that happens to every other data put in transactions - if they're included in blocks every node (full verifying node [0]) downloads it and stores it locally forever.

[0]: https://code.google.com/p/bitcoinj/wiki/FullVerification

comment 12y ago · link · parent

Excellent point, added as annotation, thanks!

comment 12y ago · link · parent

Yes, you're right, numbers treatment is not exactly the same as in Bitcoin Core. The script interpreter supports only basics and it was implemented to show how Bitcoin Script works in general for another article [0].

But it was not clear from this text whether it's a complete implementation or not so it looks like a bug. I've added the annotation [1] and will update the interpreter in the future.

Of course if one wanted to use Bitcoin in real projects I'd rather recommend Bitcoin.js [2] but that's another topic.

Thanks for comment!

[0]: https://curiosity-driven.org/bitcoin-contracts

[1]: https://curiosity-driven.org/low-level-bitcoin#operators

[2]: http://bitcoinjs.org/

comment 12y ago · link · parent

They already do that: http://www.righto.com/2014/02/ascii-bernanke-wikileaks-photo...

Also related: http://en.wikipedia.org/wiki/Illegal_number

comment 12y ago · link · parent

Exactly - scripts are pure functions. Reasoning behind this is explained by Satoshi himself at Bitcoin Talk [0]. Contracts page at Bitcoin wiki has an example of defining a will using Bitcoin and an oracle [1].

[0] https://bitcointalk.org/index.php?topic=195.msg1611#msg1611

[1] https://en.bitcoin.it/wiki/Contracts#Example_4:_Using_extern...

20.

Bitcoin contracts(curiosity-driven.org ↗)

119 points · by Theyeard · 12y ago · 31 comments

21.

Minimal AMD loader in 850 characters(curiosity-driven.org ↗)

1 points · by Theyeard · 12y ago · discuss

comment 12y ago · link · parent

A different version of this riddle in Prolog/JavaScript: https://curiosity-driven.org/prolog-interpreter#puzzle

23.

code-block Web Component(curiosity-driven.org ↗)

2 points · by Theyeard · 12y ago · discuss

24.

First class AngularJS modules(higher-order-programming.ghost.io ↗)

2 points · by Theyeard · 12y ago · discuss

25.

Pi approximation using Monte Carlo method(curiosity-driven.org ↗)

1 points · by Theyeard · 12y ago · discuss

26.

Solving riddles with Prolog and ES6 generators(curiosity-driven.org ↗)

2 points · by Theyeard · 12y ago · discuss

27.

Angular.js-like data binding with 100 lines of JavaScript (ES7 Object.observe)(curiosity-driven.org ↗)

1 points · by Theyeard · 12y ago · discuss

28.

Built-in ES6/JavaScript constructs as monads(curiosity-driven.org ↗)

2 points · by Theyeard · 12y ago · discuss

29.

Sudoku solver using JavaScript/ES6 generators and backtracking(curiosity-driven.org ↗)

1 points · by Theyeard · 12y ago · discuss

30.

Private fields in JavaScript using ES6 Symbols(curiosity-driven.org ↗)

1 points · by Theyeard · 12y ago · discuss

12