You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
この記事では, Haskellに用いられる「遅延評価」の仕組みを, 図に描いて説明します. 更に, 遅延評価版のフィボナッチ数の無限列を, JavaScriptで実装します. 遅延評価とはどのように動くのか, 考えて行きましょう. HaskellのコードとJavaScriptのコードの比較 Haskellでの x = y y = 10 と, JavaScriptの var x = y; var y = 10; というコードを考えてください. Haskellのコードは, これだけでは何も起こりません. print xとすると, x = y = 10 となって 10 が表示されます. 一方, JavaScriptのコードは var x = y; を評価した瞬間, 「ReferenceError: y is not defined」というエラーが出ます. 更に, main = let x = 1
JavaScriptにおいて、Promiseのthenを使った書き方を、async/awaitを使って書き換えられるわけですけども その書き換えって、Haskellのモナドでbind(>>=)を使った書き方を、Do記法に書き換えとそっくりじゃないですか? ということで、どんな感じで対応しているか検証してみます。 コードの全文は最後に載せますね。合わせて60行もないです。 Haskell側のモナドとして、Eitherモナドを使うことにします。 Haskellのコードはimport Data.Eitherしておきます。 記事を通して使う関数 まずは、Promiseやモナドを返す関数ohとyeahを用意します。
At the beginning of this decade (2010), a few of us Haskellers were exploring how best to do client-side web programming. We didn’t want to write JavaScript. There’s a surprising number of techniques we tried to avoid doing so. There was work coming from academia and industry. Here’s a history of my own experience in this problem space. In 2008, Joel Bjornson and Niklas Broberg published HJScript,
So, I've been looking into the situation on the js front, and the last "ghcjs vs haste" type of post on reddit is dated 1.5+ years ago. If you look at repositories code contribution, both haste: https://github.com/valderman/haste-compiler/graphs/code-frequency ghcjs: https://github.com/ghcjs/ghcjs/graphs/code-frequency seem to have last noticeable activity sometime last year. Does it mean that has
これは 友利奈緒 Advent Calendar 2015 の20日目の記事です。必死で未来から書いています。 友利奈緒とコミュニケーションするアプリ のようなものを作りました。たぶんこの辺にソースを置くと思います。バイナリはたぶんもうしばらくしたら配布するかもしれませんが、こんなツール使いたいと思う人があんまりいない気がするので、配布しないかもしれません。 追記:バイナリ配布しました。使ってみたいという奇特な方は、https://github.com/tanakh/tomorinask/releasesこちらからお試しください。 最近困っていたこと:Askリニューアル問題 ところで、Ask.fm という、どこからともなく質問がたくさんやってくる謎のサービスがあるのですが、このサイトが先日デザインをリニューアルしました。それはそれでいいのですが、大幅にリニューアルされてしまったせいで、僕に
あらすじ Web技術が複雑になる中で、JavaScriptのプロファイリングをとる方法とは。 プロファイリングを取るためのコードを手で書いてみましょう。 とてもシンプルで、かつ最高のJavaScriptプロファイラ sjsp を作りました。 本当にあった怖い話 上司 「とにかくJavaScriptのコードを速くしてくれ」 私 「分かりました、速くします」 (次の日) 私 「いいプロファイラがないなら作ればいいじゃない」 同じチームの人 「えっ?」 私 「最高のJavaScriptプロファイラ作ったよ」 同じチームの人 「「えっえっ???」」 私 「早速使ってみたらこことここが遅いって分かったよ」 同じチームの人 「「「この子は一体…」」」 JavaScriptのプロファイリングの難しさ 近年、Webブラウザーの処理速度は著しく向上し、その可用性の高さから、アプリケーションのプラットフォーム
Lisensi resmi dari IDN Poker Pertama, QQALIENPOKER memiliki lisensi resmi dari provider game tersebut yakni idn poker online. Software yang kemudian yang kami sajikan disini adalah software resmi yang diberikan oleh idn poker online. Artinya memang tidak ada modifikasi apapun yang dilakukan sehingga kemudian sistem permainan berjalan dengan benar-benar 100% FAIR dan aman serta nyaman. License oper
The problem The JavaScript problem is two-fold and can be described thus: JavaScript, the language. JavaScript, the language, has some issues that make working with it inconvenient and make developing software harder : lack of module system (only pre-ES6), weak-typing, verbose function syntax1 (pre-ES6), late binding2, which has led to the creation of various static analysis tools to alleviate thi
A strongly-typed functional programming language that compiles to JavaScript Benefits Compile to readable JavaScript and reuse existing JavaScript code easily An extensive collection of libraries for development of web applications, web servers, apps and more Excellent tooling and editor support with instant rebuilds An active community with many learning resources Build real-world applications us
HomeSearch BrowseWhat's newUploadUser accountsAdmind3js: Declarative visualization on a web browser with DSL approach. A library for visualization on a web browser. This works as a DSL that generates JavaScript source code working with D3.js (http:d3js.org/) library. You can compose operations with a typed DSL with Haskell's abstraction power. This is still an alpha version, and the structure may
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く