並び順

ブックマーク数

期間指定

  • から
  • まで

201 - 240 件 / 421件

新着順 人気順

haskellの検索結果201 - 240 件 / 421件

  • Idris 2の数量的型が解決した問題、導入した問題 | κeenのHappy Hacκing Blog

    # Idris2の数量的型が解決した問題導入した問題 ---------------------- [第一回関数型プログラミング(仮)の会 - connpass](https://opt.connpass.com/event/222709/) === # About Me --------- ![κeenのアイコン](/images/kappa2_vest.png) * κeen * [@blackenedgold](https://twitter.com/blackenedgold) * GitHub: [KeenS](https://github.com/KeenS) * GitLab: [blackenedgold](https://gitlab.com/blackenedgold) * [Idein Inc.](https://idein.jp/)のエンジニア * Lisp, ML

    • Oath: 安全、高速、合成可能な並行処理 - モナドとわたしとコモナド

      TL;DR github.com 並行処理を簡潔かつ安全に記述できるライブラリを作った。ApplicativeDo拡張を使って、以下のようにoathの引数として与えたIOアクションを同時に実行し、結果を集める処理を書ける。いずれかが例外を投げた場合、残りをキャンセルするためリソースを漏らす心配がない。 evalOath $ do a <- oath $ ... b <- oath $ ... f a b 経緯 Haskellは並行処理が得意とされている。事実、軽量スレッド、MVar、STMといった処理系によるサポートが充実しており、HackageのConcurrencyカテゴリには235ものパッケージがあることからもユーザの関心の高さが窺える。 並行処理を実用する上では、単にスレッドをフォークするだけでなく、計算の結果を集める必要がある──Scalaなどで言うFutureに近いものがあると

        Oath: 安全、高速、合成可能な並行処理 - モナドとわたしとコモナド
      • About this book - Learn Haskell by building a blog generator

        About this book Looking for reviews and mentions? Click here. In this book, we will implement a simple static blog generator in Haskell, converting documents written in our own custom markup language to HTML. We will: Implement a tiny HTML printer library Define and parse our own custom markup language Read files and glue things together Add command line arguments parsing Write tests and documenta

          About this book - Learn Haskell by building a blog generator
        • Lisp、Haskell、Rustでマルウェア開発:検出回避に利用されるマイナー言語の脅威 - イノベトピア

          Last Updated on 2025-03-31 12:59 by admin ギリシャのピレウス大学とアテナ研究センター、オランダのデルフト工科大学の研究者らが、マルウェア作成者が検出回避のために一般的でないプログラミング言語を使用する傾向について調査した結果を発表した。 研究者チームはTheodoros Apostolopoulos、Vasilios Koutsokostas、Nikolaos Totosis、Constantinos Patsakis、Georgios Smaragdakisらで構成されている。 彼らの論文「趣味と利益のための奇抜なプログラミング言語によるマルウェアのコーディング」によると、マルウェア作成者は静的解析による検出を回避するために、DelphiやHaskell、Rust、Nimなどの一般的でない言語を使用している。アンチウイルス評価機関AV-TESTに

            Lisp、Haskell、Rustでマルウェア開発:検出回避に利用されるマイナー言語の脅威 - イノベトピア
          • Serverless Haskell - GHCのWASMバックエンドで Haskell を Cloudflare Workers に載せる

            TL;DR GHC 9.10 から WASM バックエンド(クロスコンパイラ)が JavaScript FFI に対応したので、Haskell コードを Cloudflare Workers 上で動かしてみたよ。快適に開発するための環境構築・ハック方法と、GHCの出力をCloudflare Workers 向けに修正する方法を紹介するよ。 2025-02-08 追記 GHC WASM Backend のBindstが大幅に進化し、Earthlyとかは要らなくなりました。 以下の節を御覧ください: はじめに──Asterius から GHC WASM バックエンドへ GHC は 9.6 から WASM バックエンド(クロスコンパイラ)を搭載していますが、GHC 9.10 から WASM バックエンドが遂に JavaScript FFI に対応しました。 従来から C FFI には対応しており

              Serverless Haskell - GHCのWASMバックエンドで Haskell を Cloudflare Workers に載せる
            • オブジェクト指向におけるVisitorパターンは、F代数によるμ再帰を Church encoding したもの

              某所で オブジェクト指向 (OOP) における Visitorパターン について話されていたので、自分の関数型プログラミングのメモ用に整理してみたいと思います。 (Twitterで書くには少し長すぎたので、こちらに整理) 2021/01/10 EDIT: Church (Boehm–Berarducci) エンコーディングとVistorパターンについての具体的な事例は、こちらの記事が分かりやすいので、ご参照ください。 Haskell for all: The visitor pattern is essentially the same thing as Church encoding 概要 OOP における Visitor パターンは、関数型プログラミング的に言えば、(パターンマッチする)F代数によるμ再帰を Church encoding したもの。 つまり、 を関数適用して、結果 a

                オブジェクト指向におけるVisitorパターンは、F代数によるμ再帰を Church encoding したもの
              • Reanimate

                Reanimate is: An animation library: Animations are written as code. Written in Haskell: High-level, purely functional, expressive. Based on SVG: Powerful and introspective. Cross-platform: Windows, MacOS, and Linux. Reanimate aims to be a batteries-included way of creating animations and illustrations. It builds on two core ideas: (1) graphics (both still and animated) should be expressed as code,

                • The visitor pattern is essentially the same thing as Church encoding

                  The visitor pattern is essentially the same thing as Church encoding This post explains how the visitor pattern is essentially the same thing as Church encoding (or Böhm-Berarducci encoding). This post also explains how you can usefully employ the visitor pattern / Church encoding / Böhm-Berarducci encoding to expand your programming toolbox. Background Church encoding is named after Alonzo Church

                  • SML#プロジェクト

                    SML#はオープンソースの関数型プログラミング言語です。Standard MLと互換性を保ちながら、C言語やデータベースとの連携など実用上重要な機能を備えています。詳しくは「SML#について」をご覧ください。 val puts = _import "puts" : string -> int fun f x = ignore (puts (#b x)) val _ = f {a = "Hi", b = "Hello"} val _ = f {b = "World", c = "SML#"} 最近のニュース SML# 4.2.0 リリース 2025年3月24日 SML# 4.2.0 がリリースされました。 もっと読む... SML# 4.1.0 リリース 2024年11月15日 SML# 4.1.0 がリリースされました。 もっと読む... SML#の教科書が出ました 2021年4月15日

                    • Counterexamples in Type Systems - Counterexamples in Type Systems

                      collated by Stephen Dolan, with thanks to Andrej Bauer, Leo White and Jeremy Yallop

                      • 世界のプログラミング言語(36) 純粋関数型言語Haskellは難しいが学ぶ価値がある言語

                        Haskellは純粋関数型プログラミング言語です。本連載では既にLispやOCamlなどの関数型言語を紹介しましたが、Haskellは関数型言語の中でも特に人気の高い言語です。Stack Overflowの人気言語調査でも2020年は15位、2021年は22位と人気言語がひしめくなか健闘しています。Haskellは難しい言語としても有名ですが、その作法を学ぶならプログラマーの基礎体力の向上に役立つことでしょう。今回はHaskellを試してみよう。 HaskellのWebサイト Haskellとは Haskellは関数型プログラミング言語の一つです。 純粋関数型言語に分類されます。金融やセキュリティ、科学解析、プログラミング言語の開発などの分野で使われています。総じて信頼性が求められる分野の開発で採用されています。そのため、十分実用的な言語と言えます。 しかし、Haskellには「遅延評価」

                          世界のプログラミング言語(36) 純粋関数型言語Haskellは難しいが学ぶ価値がある言語
                        • 自動printfデバッグ - モナドとわたしとコモナド

                          関数をデバッグするために、引数と戻り値をそれぞれ表示するというのを誰しもやったことがあると思う。今回はそれを自動化するからくりをHaskellで実装してみる。 目標となるのは、関数が与えられたとき、その引数と結果をターミナルに出力する関数に変換する高階関数、probe :: Traceable a => String -> a -> aである。 testDelay :: Double -> Double -> IO () testDelay dur dur' = threadDelay $ round $ (dur + dur') * 1000000 *Probe> probe "testDelay" testDelay 1 2 testDelay 1.0 2.0: () これは型クラスを活用すればお茶の子さいさいである。以下のように型によって挙動を切り替える関数withTraceData

                            自動printfデバッグ - モナドとわたしとコモナド
                          • Haskell: A Great Procedural Language

                            There are many catchphrases about Haskell. Haskell is useless. Haskell aims to avoid success at all costs. Haskell is the best procedural language in the world. These sound like dismissals or absurdities from the outside, but once you learn what they really mean, they take on a new light. In this article, I want to explain the third. (See the appendix if you are curious about the first two.) This

                            • 麻雀の多面待ちのパターンを全て求めてみた - Qiita

                              Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? (2022/10/12追記) この記事をリメイクしました。そちらでは手牌の画像と待ちの画像も載せています。また、ここで求めたリストよりも多くなっています(洗い出すパターンの定義を変えたため)。 https://zenn.dev/firedial/articles/dce2ad243b3516 (2022/10/15追記) 理論もリメイクしました。用語も一部修正しています(標準形から基本形に変更など)。 https://zenn.dev/firedial/articles/2480e844bf5a44 そのため、当記事は deprecat

                                麻雀の多面待ちのパターンを全て求めてみた - Qiita
                              • Direct-style Effects Explained

                                Direct-style Effects Explained By Noel Welsh on 24 Apr 2024 Direct-style effects, also known as algebraic effects and effect handlers, are the next big thing in programming languages. At the same time I see some confusion about direct-style effects. In this post I want to address this confusion by explaining the what, the why, and the how of direct-style effects using a Scala 3 implementation as a

                                • Go の 構造体定義から Functional Options Pattern のコードを自動生成する CLI ツールを作った

                                  Go でオプション引数を実現したいときによく Functional Options Pattern が使われるかと思います。このデザインパターンは便利な一方、構造体の中でオプション引数を用意したい全てのフィールドに対して、オプション引数用の関数を実装する必要があり、記述すべきコードが多くなりがちです。 この問題を解決すべく、Functional Options Pattern を実現するためのコードを自動生成する CLI ツール 「foggo」を作りました。 Functional Options Pattern とは Go はそのシンプルな言語仕様から、オプション引数を提供していません。 オプション引数はデフォルト引数やオプションパラメータとも呼ばれ、Python だと可変長引数である *args や *kargs のことを指します。 通常の関数であれば特に問題ないのですが、構造体の初期化

                                    Go の 構造体定義から Functional Options Pattern のコードを自動生成する CLI ツールを作った
                                  • 存在した関数型まつりと、存在しなかった関数型まつり - 解釈をするために手を動かす

                                    存在した関数型まつり 2025.fp-matsuri.org 関数型まつりで、『ラムダ計算と抽象機械と非同期ランタイム』という題で発表してきました (Google slide)。 hsjoihs 氏を始めとする複数人の協力もあって(というか全面的にみなさまの協力のおかげです、本当にありがとうございました 1)全体的な構成は非常に良いバランスに仕上がり、発表も良い感じにできたのではないかと思います。資料の作り始め、友人に内容について相談したら「これ全部しっかり話すと学部の8単位ぶんくらいの積み上げがありそうだけどいける?」と言われていて、実際その見積もりは概ね正しそうだと今でも思っているわけですが、そんな内容を(事前に数十時間を構成のプランニングに注ぎ込んでいるとは言え)発表練習無しで45分で話し終えたというのは、我ながらよくやったものです。去年の ScalaMatsuri で 40 分枠で

                                      存在した関数型まつりと、存在しなかった関数型まつり - 解釈をするために手を動かす
                                    • The golden rule of software quality

                                      This post summarizes a rule of thumb that I commonly cite in software quality discussions, so that I can link to my own post to save time. I have taken to calling this the “golden rule of software quality” because the rule is succinct and generalizable. The golden rule is: Prefer to push fixes upstream instead of working around problems downstream … and I’ll explain implications of this rule for a

                                      • Haskellで型レベルパーサー

                                        ghc-9.6.1です。 GHCはChar kindが9.2で入ったので型レベルパーサーが書ける様になってるんですよね。ということで書いてみました。 BNFは以下です: expr ::= term *('+' term) term ::= factor *('*' factor) factor ::= '(' expr ')' | nat nat ::= 0 | 1 | 2 | ... | 9 {-# Language TypeData #-} {-# Language DataKinds #-} {-# Language TypeFamilies #-} {-# Language UndecidableInstances #-} {-# Language TypeApplications #-} {-# Language MagicHash #-} {-# LANGUAGE NoStar

                                          Haskellで型レベルパーサー
                                        • Haskellでちょっとしたスクリプトを書く

                                          Haskellで本格的に開発する際はcabalなりstackなりでプロジェクトを作るわけですが、ファイル一つで済むような(書き捨て)スクリプトをHaskellで書きたい場合があります。 依存関係のないスクリプトであれば、普通にファイルを作ってrunghc/runhaskellすれば良いでしょう。しかし、Haskellには標準ライブラリー(base)以外にも「準標準」と呼べる外部のライブラリーが多数あり(例:bytestring, text, vector)、それらに明示的に依存することはrunghcではできません。 そこで使えるのが、cabal scriptやstack scriptと呼ばれる機能です。歴史的にはstack scriptの方が古く(いつ?)、cabal scriptは2018年ごろに実装された比較的新しい機能です。 RFC: Add support for "#! /usr

                                            Haskellでちょっとしたスクリプトを書く
                                          • #88: A History of Haskell: being lazy with class

                                            Haskell の長い歴史を向井が辿ります。感想などはハッシュタグ #misreading か hello@misreading.chat にお寄せください。iTunes のレビューや星も歓迎です。 A History of Haskell: being lazy with class – Microsoft ResearchHaskell LanguageHome — The Glasgow Haskell Compilerhttps://www.haskell.org/onlinereport/haskell2010/Changes since Haskell ’98

                                              #88: A History of Haskell: being lazy with class
                                            • 【これからiOS頑張りたい方向け】2年半iOSアプリ開発をしてハッとした瞬間まとめ - Qiita

                                              はじめに iOS Advent Calendar 2020 17日目です。 2年半くらいiOSアプリ開発してきてハッとした瞬間をまとめました。(iOSとかswiftに限った話じゃない学びもあるけど。) がんばらなくても読めるけど、なんとなく勉強にもなる記事を目指しました。 タイトルに近い方が初歩的なやつです。 もし時間あればみていただけると嬉しいです。 お品書き 返り値でBoolを返す時はそのBool自身を返せばいい 三項演算子を使うとif else がワンライナーで書ける var +=は計算型プロパティにできる。 ネストは早期returnで減らせる 2重否定はifでいい。 型が明確な時のinitializerは.initに省略できる trailing closureは引数から省略できる enumとswitchを組み合わせて網羅性をチェックする Bool値が複数ある場合の場合分けはswit

                                                【これからiOS頑張りたい方向け】2年半iOSアプリ開発をしてハッとした瞬間まとめ - Qiita
                                              • Hacker News folk wisdom on visual programming

                                                I’m a fairly frequent Hacker News lurker, especially when I have some other important task that I’m avoiding. I normally head to the Active page (lots of comments, good for procrastination) and pick a nice long discussion thread to browse. So over time I’ve ended up with a good sense of what topics come up a lot. “The Bay Area is too expensive.” “There are too many JavaScript frameworks.” “Bootcam

                                                  Hacker News folk wisdom on visual programming
                                                • HaskellのCo/Yoneda型と米田の補題をきちんと繋げる - Qiita

                                                  概要 Haskell には Co/Yonda 型があり、圏論には米田の補題がある。両者の関連についての分かりやすい解説を見つけられなかったため、ここで米田の補題と Co/Yoneda 型をシームレスに繋ぐことを試みる。 圏論の基礎知識は仮定している。また Co/Yoneda 型は kan-extensions で定義されたものを参照している。 記法 圏論の記法は一般的なものを用いるが、Haskell コードとの比較のし易さのために、圏 $\mathcal C$ における対象 $A$ から対象 $B$ への射の集合 $\mathcal C (A,B)$ を $$ A\underset{\mathcal C}{\rightarrow}B $$ とも書くことにする。 米田の補題によると、圏 $\mathcal C$ とその対象 $A$ ならびに関手 $F:\mathcal C\rightarro

                                                    HaskellのCo/Yoneda型と米田の補題をきちんと繋げる - Qiita
                                                  • GitHub - eeue56/derw: An Elm-inspired language that transpiles to TypeScript

                                                    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

                                                      GitHub - eeue56/derw: An Elm-inspired language that transpiles to TypeScript
                                                    • Unification-free ("keyword") type checking

                                                      From my perspective, one of the biggest open problems in implementing programming languages is how to add a type system to the language without significantly complicating the implementation. For example, in my tutorial Fall-from-Grace implementation the type checker logic accounts for over half of the code. In the following lines of code report I’ve highlighted the modules responsible for type-che

                                                        Unification-free ("keyword") type checking
                                                      • Pure destination-passing style in Linear Haskell

                                                        My goal today is to convince you that destination-passing style is neat, actually. And that linear types make destination-passing purely functional. But first, I must answer a question. What is destination-passing style? If you’ve ever programmed in C, C++, or Fortran, you are sure to have encountered the style of programming which sometimes goes by the name destination-passing style. It is the pr

                                                          Pure destination-passing style in Linear Haskell
                                                        • Algebraic Effects に触れてみたくて Koka に入門した - Qiita

                                                          はじめに 最近話題の Algebraic Effects に触れてみたくて、Koka に入門した。 記憶があるうちに、Algebraic Effects について学べるだけの Koka の最低限の文法や所感を記事にしておく。 ちゃんと探していないけれど、たぶん Koka の日本語の資料はない。よって何から何まで、公式の入門記事に頼ることになる。 そしてこの記事が、これから Koka に入門する人の助けになれば幸いだ。 私は以下のバックグラウンドを持ち、この記事にはそのバイアスがかかっている。予めご了承いただきたい。 Koka歴は 2日 Haskell はある程度使った。Extensible Effects にも触れている OCaml, Eff は未経験 タグに Haskell を入れたのは Koka のタグをフォローしている人は皆無だと思ったからだ。 ほんの少しだけ Haskell 成分が

                                                            Algebraic Effects に触れてみたくて Koka に入門した - Qiita
                                                          • 型に関連するよく分からん用語がありすぎる - 技術メモ

                                                            Rustのドキュメントを読んだりTwitterで型について話している人が使う用語でわからないものが結構ある。CSを体系的に学ぶ過程でおそらく共通で皆通ってきているのだろうが自分には抜け落ちている。この分野の用語を最低限自分も理解して使えるようになりたい。

                                                              型に関連するよく分からん用語がありすぎる - 技術メモ
                                                            • Optimizing Ray Tracing in Haskell

                                                              My first Haskell program and how easily I optimized it from 33m to 17s. 1800x1012 scene generated containing 533 objects rendered with 500 samples and 50,000 rays per pixel.BackgroundFew weeks back, my colleague at work, Eyal Kalerdon, shared his implementation of ray-tracing-in-one-weekend in Rust, which inspired me to try this as well. I, however, chose Haskell for this, thinking I’ll not only l

                                                                Optimizing Ray Tracing in Haskell
                                                              • Haskell Foundation

                                                                An independent, non-profit organization dedicated to broadening the adoption of Haskell, by supporting its ecosystem of tools, libraries, education, and research. Haskell Foundation October 2024 Update José Manuel Calderón Trilla posted the October 2024 Foundation update in our community’s Discourse instance. Tom Ellis works at Groq, using Haskell to compile AI models to specialized hardware. In t

                                                                • 多相からプログラミング言語を見る - 趣味はデバッグ……

                                                                  こんにちは。ホビー型システミストの岡本です。 最近 C++ の習得をしていて、なんとなく多相(polymorphism)の視点からいくつかのプログラミング言語をまとめてみようという気になったので書いてみます。 部分型多相(subtype polymorphism) クラスベースオブジェクト指向言語でよく使うのは部分型多相ですかね。 Java や C#・C++ にある、名称的部分型多相(nominal subtype polymorphism)はこんな感じ。次の例は Java です。 class A {} class B extends A {} public class Main { public static void main(string[] args) { A foo = new B(); } } 変数 foo は A 型だけど、型(クラス)B は A の部分型(サブクラス・派生ク

                                                                    多相からプログラミング言語を見る - 趣味はデバッグ……
                                                                  • The Cubix Framework

                                                                    Building a Programming Tool? Build for 5 languages at once -- | Inserts "blocksCovered[n] = true" printouts for test-coverage -- at every basic block -- -- Runs on C, Java, JavaScript, Lua, and Python instrumentTestCoverage :: forall fs l. (CanInstrument fs) => ProgInfo fs -> TermLab fs l -> Annotater (TermLab fs l) instrumentTestCoverage progInfo t = performCfgInsertions @(StatSort fs) progInfo $

                                                                    • GHC 9.2の新機能と、GHCの動向2021

                                                                      Haskell Day 2021で「GHCの動向2021」というタイトルで発表しました、mod_poppoです。この記事では、発表の補足としてGHC 9.2の新機能の紹介と、 Data.List の単相化に関する補足を行います。 Haskell Day 2021の動画と筆者のスライドは、それぞれ次のリンクから参照できます: Haskell Day 2021 - YouTube GHCの動向2021 「GHCの動向」のタイトル的な元ネタ(?)は、筆者が3月にブログに書いた GHCに初めてコントリビュートした/最近のGHC動向 です。時代遅れになった記述もあると思いますが、よかったら読んでみてください。 GHC 9.2の新機能 2021年10月29日に、待望のGHC 9.2.1がリリースされました。公式の変更点は 2.1. Version 9.2.1 — Glasgow Haskell Com

                                                                        GHC 9.2の新機能と、GHCの動向2021
                                                                      • Haskellで、手軽にプロパティベーステスト

                                                                        はじめに Haskell Advent Calender 2023の2日めの記事です。カレンダーの枠が空いていたので、久しぶりに勢いで書いてみました。 さて、ラムダノート社から「実践プロパティベーステスト」が出版されたので、巷ではプロパティベーステストが流行っていることでしょう (紹介宣伝です)。 Haskellでは、プロパティベーステスト用のライブラリとして、例えばQuickCheckがあります。 この記事では、Haskellではソースコードのコメント中に簡単な記述をするだけで、プロパティベーステストを手軽に実行できることを改めて紹介します。 本格的なコードを開発している局面だけではなく、ちょっと頭の中を整理したい時などにも手軽で便利です。 (前準備) テストケースと期待値によるテスト Haskellでは、ソースコードのコメント中に埋め込まれたテストケースを実行できるdoctestという

                                                                          Haskellで、手軽にプロパティベーステスト
                                                                        • A Dictionary of Single-Letter Variable Names | Blog | jackkelly.name

                                                                          Haskell’s expressive type system means that type signatures can carry a lot of information. Haskell’s polymorphism means that you sometimes write functions that work across an enormous range of types, and are left wondering “what do I actually call my variables?”. It is often the case that there’s nothing to say beyond “this variable is a Functor”, or “this variable is a monadic action”, and so a

                                                                          • コーディングについて思うこと垂れ流し

                                                                            ミライトデザイン Advent Calendar 2021 の 11 日の記事です カレンダーの右端は日曜日派の ほげさん ( zenn ) です Qiita のアドカレの右端は土曜日だったんですね、気を付けましょうね 血圧低い感じで、盛り上がりもオチもなく文字数制限のない Twitter のような駄文を晒します 導入 ある Haskell はいいぞおじさんの誕生のはなし 2014 年くらいだったか、大したきっかけもないけど Haskell を触った[1] 根本的な基礎力が足りなかったしダラダラやってたので、ちゃんと H 本の内容を最後の章まで理解できたのは多分 2016 年くらいだった気がする そのあと Haskell の考え方とコードって超クールだなって思ってこんなのを書いたりした 細かい内容は覚えてないけど、記事の内容はニュアンスとしては こんな ↓ 実装をやめて User find

                                                                              コーディングについて思うこと垂れ流し
                                                                            • 依存関係と階層構造の軛 - モナドとわたしとコモナド

                                                                              21世紀現在のプログラミング言語において、モジュールという機能はほぼ必要不可欠である。ソースコードを分割し、明示的な依存関係を指定する仕組みであるモジュールは、以下のような様々な恩恵をもたらす。 インクリメンタルビルド: モジュールごとにコンパイル結果を保存し、変更されていない部分を再コンパイルするのを防ぐ。 内部の隠蔽: 実装の詳細を隠蔽し、モジュール外から触れないようにする。プログラムの見通しをよくしたり、不正な操作をする機会を減らす。 アーキテクチャの整理: モジュールは他のモジュールを参照できるが、原則として相互参照はしない。依存の向きを定めることで、適切な抽象化と、 それに基づいた実装の分離を促す。 さて、いくらモジュールが便利と言えど、数が増えすぎるとさすがに扱いにくい*1。そのため、ディレクトリの構造をモジュールの階層構造として運用する仕組みが備わっていることが多い。 コンパ

                                                                                依存関係と階層構造の軛 - モナドとわたしとコモナド
                                                                              • Functors and Monads For People Who Have Read Too Many "Tutorials" - iRi

                                                                                Celebrating Over 10 Years Of Being Too Lazy To Pick A Tagline Title is literally true. This may not be the best place to learn about these concepts for the first time, because I'm going to focus on knocking down the misconceptions about them. Then again, it may not be the worst place, for the same reason. I had promised myself I would not add to the pile of functor or monad "tutorials", but I've b

                                                                                • 文脈依存 PEG による Haskell パーサ

                                                                                  前に PEG パーサジェネレータライブラリ ptera を作っているという話をしたが,今回はその第二弾.ptera で Haskell2010 の文法パーサを例に追加してみたんだが,その過程で色々あったのでその備忘録. 結論から言うと,ptera に前回から以下の拡張を加えた. 先読みを強化し,もうちょっとちゃんと機能するように 文脈依存でパースができるようにした 後は,Template Haskell で文法書けるようにしたりもしたが,まあそれはいいでしょ. Haskell2010 と ptera ptera でひとまず Template Haskell で文法が書けるフロントエンド部分作った後,Haskell 2010 ぐらいパースできないと使い物にならないなあと言う感じで Haskell の example project 書いてみたんだが,ここで色々つまづいてしまった.主に今回説明

                                                                                    文脈依存 PEG による Haskell パーサ