並び順

ブックマーク数

期間指定

  • から
  • まで

41 - 80 件 / 427件

新着順 人気順

haskellの検索結果41 - 80 件 / 427件

  • 【前編】関数型×DDDの設計と実装は、どう進めるべきか。書籍「関数型ドメインモデリング」翻訳者が語る【Open Developers Conference 2024 レポート】 | レバテックラボ(レバテックLAB)

    TOPコラムテック最前線レポート【前編】関数型×DDDの設計と実装は、どう進めるべきか。書籍「関数型ドメインモデリング」翻訳者が語る【Open Developers Conference 2024 レポート】 【前編】関数型×DDDの設計と実装は、どう進めるべきか。書籍「関数型ドメインモデリング」翻訳者が語る【Open Developers Conference 2024 レポート】 2024年11月18日 書籍「関数型ドメインモデリング」翻訳者 猪股 健太郎 システムエンジニア、ソフトウェア開発者。BIPROGY株式会社勤務。各種業務システムに関する開発支援や開発標準策定等に従事後、数年間の米国駐在を経て帰国。近年はアジャイルソフトウェア開発を含む開発スタイル変革に携わる。『速攻入門 C#プログラミング すぐに現場で使える知識』(技術評論社、共著)、『プログラミングXamarin 上・下

      【前編】関数型×DDDの設計と実装は、どう進めるべきか。書籍「関数型ドメインモデリング」翻訳者が語る【Open Developers Conference 2024 レポート】 | レバテックラボ(レバテックLAB)
    • Functors to Monads: A Story of Shapes

      For many years now I’ve been using a mental model and intuition that has guided me well for understanding and teaching and using functors, applicatives, monads, and other related Haskell abstractions, as well as for approaching learning new ones. Sometimes when teaching Haskell I talk about this concept and assume everyone already has heard it, but I realize that it’s something universal yet easy

        Functors to Monads: A Story of Shapes
      • Haskell で Cloudflare Workers 製のフルスタックブログエンジンを作ったら快適すぎた

        TL;DR GHC の WASM バックエンドを使って、フロントエンドからCloudflare Workersで動くバックエンドまで、全部 Haskell で書かれたブログエンジンを実装したよ。 Servant の Workers 向けアダプタを実装したよ いちどAPIを型レベルで定義したら、バックエンドのルーティングやクライアントからのAPIへのアクセス、SPAのビューのルーティングまで全部同じ定義を使い回せてしかもリンク切れがない事が静的に保証されるので、かなり快適だったよ。 フロントノードは Miso を使ったので、同じデータ型と API 定義を共有できて、SSRも out-of-the-box でサポートしているのでかなり体験がよかったよ なぜか Twitter が OGP を表示してくれないけど私は元気です。 2025-02-08 追記 ARM Mac を含め独自の GHCup

          Haskell で Cloudflare Workers 製のフルスタックブログエンジンを作ったら快適すぎた
        • Going REPLing with Haskeline

          October 31, 2024 A twenty-six minute read 10 💬 4 🗣️ ❤️ 14 🔁 Tags: programmingprogramming-languagesinterpretershaskell So you went ahead and created a new programming language, with an AST, a parser, and an interpreter. And now you hate how you have to write the programs in your new language in files to run them? You need a REPL! In this post, we’ll create a shiny REPL with lots of nice features

            Going REPLing with Haskeline
          • GitHub - eslint-functional/eslint-plugin-functional: ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.

            The following rulesets are made available by this plugin. Presets: Strict (configs.strict) Enforce recommended rules designed to strictly enforce functional programming. Recommended (configs.recommended) Has the same goal as the strict preset but a little more lenient, allowing for functional-like coding styles and nicer integration with non-functional 3rd-party libraries. Lite (configs.lite) Good

              GitHub - eslint-functional/eslint-plugin-functional: ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
            • 翻訳: Parse, don’t validate (バリデーションせずパースせよ)

              これまで、型駆動設計を実践することが何を意味するのか、簡潔でシンプルな説明を見つけるのに苦労してきました。誰かに「どうやってこのアプローチを思いついたのですか?」と尋ねられることが多いのですが、満足のいく答えを出せないことがよくあります。そのアイデアが突然のひらめきで浮かんだわけではなく、正しいアプローチを空から引っ張り出す必要がない、反復的な設計プロセスがあると分かってはいるのですが、そのプロセスを他の人にうまく伝えることができていませんでした。 しかし、およそ1ヶ月前、JSON を静的型付け言語で、そして動的型付け言語にパースしたときに経験した違いについてTwitter上で振り返っていた時、ついに私が探していたものを見つけました。そして、そのスローガンはたった3つの英単語で表せます。 Parse, don’t validate (バリデーションせずパースせよ) 型駆動設計のエッセンス

                翻訳: Parse, don’t validate (バリデーションせずパースせよ)
              • 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

                • Deploying a Single-Binary Haskell Web App

                  Since I now write Haskell for paycheck, I wanted to refresh my Yesod knowledge. Yesod is a production-grade web framework, and there’s one web site I’ve long wanted to have: Fisher’s Fountain. Fisher’s Fountain is the ideal project for a toe-dipping three-evening hack because it does not talk to external collaborators, but it is also not entirely static content. This is a significant step. Note th

                  • Tour of Hell

                    This set of slides sketches out the implementation of Hell, in technical detail. I do tend to switch between the slides, old code, and the present code, so bear with me. It's more about the ideas. If you want to see a complete implementation, the complete implementation of Hell is one file, which you can look through easily. There are a few limits on the language; no imports, no polymorphism (poly

                    • 「Haskellで人を集めてPHPを書かせる」という都市伝説について | 雑記帳

                      Haskell界隈の一部で囁かれる都市伝説として、「Haskellで求人を出して集めた優秀な人材にPHPを書かせる」というものがありました。この都市伝説に実体はあるのでしょうか? 伝説 まず、議論の前提として、この伝説に言及している投稿をいくつか挙げておきます。これは「伝説が少なくとも伝説としては存在する」ことを立証するために挙げるのであり、これらの投稿について何らかの価値判断を行う目的ではありません。 GCPで人を集めてAWS書かせるやつ、Haskell と PHP で見た — mizchi (@mizchi) March 16, 2022 Haskellで募集してPHP書かせる事件だ — デジタル競争の敗者 (@Lugendre) June 18, 2021 Haskell プログラマを募集して PHP 書かせるって,ネタ元どこなんだろう? — ささき しげお (@SigSasaki)

                      • GTF :: Why Haskell?

                        “Impractical”, “academic”, “niche”. These are a few of the reactions I get when someone discovers that my favourite programming language is Haskell, and not only my favourite in some sort of intellectually-masturbatory way, but favourite for building things, real things, mostly involving web servers. Hobby projects would be one thing, but it gets worse: I have actual teams at Converge working in H

                        • 関数型プログラミングの設計テクニック

                          書籍『関数型ドメインモデリング』や、原著者のサイト https://fsharpforfunandprofit.com/ に書いてある内容の紹介です。 2024/09/07 Learn Languages 2024 https://event.ospn.jp/odc2024/session/…

                            関数型プログラミングの設計テクニック
                          • Functional TypeScript

                            オープンデベロッパーズカンファレンス(ODC)2024 での発表資料

                              Functional TypeScript
                            • 【エフェクトシステムとは一体なんなのか?】なぜ私はHaskellでエフェクトシステムのライブラリを作るに至ったか

                              はじめに 本記事は、今回筆者が作成したHaskellのエフェクトシステムライブラリの背景を説明するものです。Haskellに触れたことがない読者のために、理解に必要な事柄や文法等は記事中で簡単に説明します。Haskellやライブラリ自体に興味がなくとも、エフェクトシステムの紹介だけでも今後の参考にしていただければ幸いです。 エフェクトシステム エフェクトシステムというプログラミングパラダイムが以前より研究されていました。 これは、プログラムのコード内で起こりうる副作用を分類、タグ付けし、実行時より前に分かるようにするというものです。ここでは、副作用を分類して名前を付けて型として表したものをエフェクト型と呼び、あるコード片が発生させうるすべてのエフェクト型の集合をエフェクト集合と呼ぶことにします。 例えば 1+1 このプログラムのエフェクト集合は空集合{}です。なぜなら、一切の副作用(入出力

                                【エフェクトシステムとは一体なんなのか?】なぜ私はHaskellでエフェクトシステムのライブラリを作るに至ったか
                              • F# を推したい

                                はじめに F# というプログラミング言語があります。世に出てからしばらく経つ[1]のですが、あまり流行っていませんし、流行る兆しも微妙な感じです[2]。F# は他のモダンな言語にも引けを取らないくらい魅力的で痒いところに手が届く言語なのですが、いかんせん知名度が低いのです。本記事では、そんな不遇言語である F# を推したいと思います😌 F# って何? F# はマイクロソフトが開発した .NET 向けのマルチパラダイムプログラミング言語である。 (引用: Wikipedia) 要約すると、スクリプト言語でありコンパイル言語でもある、関数型プログラミングもオブジェクト指向プログラミングもサポートする、クロスプラットフォーム対応のプログラミング言語です。 Python や Ruby のようなスクリプト言語としても、 Java や C++ のようなコンパイル言語としても扱うことができます。関数型

                                  F# を推したい
                                • 12年前の『型システム入門』翻訳の思い出話

                                  @ カワるガワるTAPLカタるヨる https://taplts.connpass.com/event/320294/

                                    12年前の『型システム入門』翻訳の思い出話
                                  • Types as Interfaces

                                    For the past few days, I have been toying with an idea for a board game. To test it out, I wanted to write a simple implementation of it. Here’s an example of a type we might need in a critical phase of the game. In[1]: -- | A quote for a proposal. data Quote = Quote { _proposal :: Proposal , _premium :: Int , _share :: Int } In that phase, values of this type need to be communicated back and fort

                                    • GitHub - mazeppa-dev/mazeppa: A modern supercompiler for call-by-value functional languages

                                      Supercompilation 1 is a program transformation technique that symbolically evaluates a given program, with run-time values as unknowns. In doing so, it discovers execution patterns of the original program and synthesizes them into standalone functions; the result of supercompilation is a more efficient residual program. In terms of transformational power, supercompilation subsumes both deforestati

                                        GitHub - mazeppa-dev/mazeppa: A modern supercompiler for call-by-value functional languages
                                      • The sad state of property-based testing libraries

                                        The sad state of property-based testing libraries Posted on Jul 2, 2024 Property-based testing is a rare example of academic research that has made it to the mainstream in less than 30 years. Under the slogan “don’t write tests, generate them” property-based testing has gained support from a diverse group of programming language communities. In fact, the Wikipedia page of the original property-bas

                                        • Haskell の依存型に入門する

                                          Haskell で依存型を扱う方法について勉強したのでメモを残しておきます。 承前 この記事では要素数つきリスト Vect の実装を例に Haskell で依存型を扱うために必要な知識のごく基礎的な部分についてまとめます。ただし、目指すのは Vect を ある程度 開発できる体制を整えることで、十分に開発できる体制は目指しません。というのは、依存型に関わる知識はそれなりに広大で、全てを収めると記事が非常に長くなってしまい、私の精神衛生上良くないことが起こるためです。 この記事では、Haskell での依存型の開発において必要な知識のうち、証明に関するもの以外を一通り揃えることを目指しますが、個人がひっそりと勉強しながら書き進めたもののため、完全な情報となるかは甚だ疑問です。そのため、誤りや欠落等を発見した場合はご指摘いただけると助かります。 なお、この記事が想定する読者は、Haskell

                                            Haskell の依存型に入門する
                                          • Haskell: The Craft of Functional Programming (PDF)

                                            I’m happy to announce that the PDF of Haskell, The Craft of Functional Programming (3rd edition) is available to view and download for free. Later in the year I’ll revise it and make it available as an online text. But for now, here it is, uncorrected: https://simonjohnthompson.github.io/craft3e/craft3e.pdf

                                              Haskell: The Craft of Functional Programming (PDF)
                                            • 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 に載せる
                                              • エフェクトとジェネレーターと - Object.create(null)

                                                2 年前に作って放置していたライブラリを最近ちょっと整理したのでその話. エフェクト プログラム中に登場する関数のことを考えてみましょう. 関数は引数を与えるとなんらかの計算を行い, 戻り値を返してくれます. もし関数が純粋な (数学的な意味での) 関数であれば, 関数の入出力は引数と戻り値だけです. つまり, 引数以外の入力 (例えば時刻) によって出力が変わることもなければ, 戻り値以外の出力 (例えば光や音) が得られることもありません. 一方で実用的な価値のあるプログラムというのは時刻に応じて光や音を発生させるようなものであり, これらは純粋な関数だけを組み合わせていては作ることができません. ここで登場する純粋でない関数は, 計算の過程でなんらかのエフェクトを発生させて, 引数と戻り値以外の入出力 (副作用) を行います. エフェクトの明示と副作用の分離 関数が発生させるエフェク

                                                  エフェクトとジェネレーターと - Object.create(null)
                                                • 関数型ドメインモデリング ドメイン駆動設計とF#でソフトウェアの複雑さに立ち向かおう

                                                  ドメイン駆動設計と関数型プログラミングを組み合わせることで、顧客満足度の向上、開発サイクルの短縮、無駄な作業の削減を実現できます。本書では、ビジネスドメインの例とF#のコードで、ビジネスに焦点を当てた、柔軟で高品質なソフトウェアを構築する方法を紹介します。たとえば、F#の型システムを使って複雑なドメインをモデル化し、読みやすいドキュメントにもなるコードを作成します。また、ビジネスルールをエンコードして「コンパイル時ユニットテスト」を作成することで、不正な状態を表現できないようにして潜在的なバグを排除します。関数型プログラミングの核となる原則を適用することで、実世界の要求をエレガントかつ簡潔にモデル化したソフトウェア設計を実現できます。 ドメイン駆動設計と関数型プログラミングを組み合わせることで、顧客満足度の向上、開発サイクルの短縮、無駄な作業の削減を実現できます。本書では、ビジネスドメイン

                                                    関数型ドメインモデリング ドメイン駆動設計とF#でソフトウェアの複雑さに立ち向かおう
                                                  • Inside the Cult of the Haskell Programmer

                                                    A regular column about programming. Because if/when the machines take over, we should at least speak their language. Haskell. It sounded like a good name for a weapon—a well-sharpened blade, like scimitar or katana. The strong German-sounding plosive in its name, as in Nietzsche or Kafka, added a menacing edge. All I really knew about the language was that it was challenging and intended for math

                                                      Inside the Cult of the Haskell Programmer
                                                    • The ultimate guide to Haskell Strings · Hasufell's blog

                                                      © 2021. All rights reserved. Site created with Hakyll. Modified theme lanyon-hakyll based on Lanyon. The ultimate guide to Haskell Strings May 7, 2024, Posted by Julian Ospald This guide is aimed at Haskellers who seek to improve their understanding of String types, be it beginners or seasoned developers. It is also meant to be a quick reference/cheat sheet for deciding which string type to use in

                                                      • TypeScript 関数型スタイルでバックエンド開発のリアル

                                                        TSKaigi 2024 のスライドです

                                                          TypeScript 関数型スタイルでバックエンド開発のリアル
                                                        • Compiling higher order functions with GADTs

                                                          Implementing first class functions in a bytecode interpreter is trivial. But how do compilers that generate machine code (or lower to C, or SSA) implement higher order functions? Back in 2021, I found an answer when contributing closures to the Pallene compiler. Today I was researching something loosely related, and found yet another neat trick called defunctionalization in this paper. Defunctiona

                                                          • Development notes from xkcd's "Machine"

                                                            On April 5th, xkcd released Machine, the 15th annual April Fools project I’ve made with them. It’s a game we’d been dreaming of for years: a giant rube goldberg machine builder in the style of the classic Incredible Machine games, made of a patchwork of machines created by individual xkcd readers. For more details, check out Explain xkcd’s wonderful writeup. This is the story of how we built Machi

                                                              Development notes from xkcd's "Machine"
                                                            • Lix

                                                              declarative. reproducible. human-friendly.Lix is a modern, delicious implementation of the Nix package manager, focused on correctness, usability, and growth – and committed to doing right by its community. The Lix EcosystemLike other Nix ecosystems, Lix layers together multiple projects to create a full Lix stack — allowing you to forge your own systems on a base of community work. The Lix Packag

                                                                Lix
                                                              • Getting your Haskell executable statically linked with Nix

                                                                I have been making my products statically linked over the past few days. This post presents why and how to statically link your Haskell executables and collects a mapping from obscure error to unexpected fixes. This work would not have been possible without the many-year-long effort of people like nh2. This issue on GitHub is a good summary of what went into making this possible. Why statically li

                                                                • Bluefin

                                                                  Bluefin is an effect system which allows you to freely mix a variety of effects, including Bluefin.EarlyReturn, for early returnBluefin.Exception, for exceptionsBluefin.IO, for I/OBluefin.State, for mutable stateBluefin.Stream, for streamsand to create your own effects in terms of existing ones (Bluefin.Compound). Bluefin effects are accessed explicitly through value-level handles. Bluefin is a Ha

                                                                  • 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

                                                                    • Choreographing a dance with the GHC specializer (Part 1)

                                                                      Specialization is an optimization technique used by GHC to eliminate the performance overhead of ad-hoc polymorphism and enable other powerful optimizations. However, specialization is not free, since it requires more work by GHC during compilation and leads to larger executables. In fact, excessive specialization can result in significant increases in compilation cost and executable size with min

                                                                        Choreographing a dance with the GHC specializer (Part 1)
                                                                      • Knuth–Morris–Pratt illustrated | Journal of Functional Programming | Cambridge Core

                                                                        We use cookies to distinguish you from other users and to provide you with a better experience on our websites. Close this message to accept cookies or find out how to manage your cookie settings.

                                                                          Knuth–Morris–Pratt illustrated | Journal of Functional Programming | Cambridge Core
                                                                        • Windowsで動くプログラミング言語に脆弱性、引数の扱い方の穴を突いて攻撃

                                                                          CERT Coordination Center (CERT/CC, Carnegie Mellon University)は4月10日(米国時間)、「VU#123335 - Multiple programming languages fail to escape arguments properly in Microsoft Windows」において、Windows上で動作する複数のプログラミング言語から引数を適切にエスケープしない脆弱性を発見したと報じた。この脆弱性はアプリケーションのコマンドインジェクションにつながるとして注意を呼びかけている。 VU#123335 - Multiple programming languages fail to escape arguments properly in Microsoft Windows 脆弱性の詳細 多くのプログラミング言語にはオ

                                                                            Windowsで動くプログラミング言語に脆弱性、引数の扱い方の穴を突いて攻撃
                                                                          • Calling Haskell from Swift

                                                                            struct User { let name: String let age: Int } // birthday(user: User(name: "Anton", age: 33)) = User(name: "Anton", age: 34) func birthday(user: User) -> User { // Calls Haskell function... } To support this workflow, we need a way to convert the User datatype from Haskell to Swift, and vice versa. We are going to serialize (most) inputs and outputs of a function. Even though the serialization as

                                                                            • Flora :: [Package]

                                                                              A package repository for the Haskell ecosystem

                                                                              • ビジネスロジックを「型」で表現するOOPのための関数型DDD / Functional And Type-Safe DDD for OOP

                                                                                Object-Oriented Conference 2024で発表した資料です。 https://fortee.jp/oocon-2024/proposal/b31c9818-3cb8-4350-adfe-cbc839cdf829 ビジネスの専門知識(ドメイン)を中心に据えたドメイン駆動設計に…

                                                                                  ビジネスロジックを「型」で表現するOOPのための関数型DDD / Functional And Type-Safe DDD for OOP
                                                                                • GHC 9.10の新機能

                                                                                  GHC 9.10.1が2024年5月11日にリリースされました。 GHC 9.10.1 is now available! - Announcements - Haskell Community この記事では、GHC 9.10の新機能を確認していきます。過去の類似の記事は GHC 9.2の新機能と、GHCの動向2021 GHC 8.10とGHC 9.0の新機能 GHC 9.4の新機能 GHC 9.6の新機能 GHC 9.8の新機能 です。 この記事は網羅的な紹介記事とはなっていません。是非、公式のリリースノート類も参照してください: 2.1. Version 9.10.1 — Glasgow Haskell Compiler 9.10.1 User's Guide docs/users_guide/9.10.1-notes.rst · ghc-9.10 · Glasgow Haskell

                                                                                    GHC 9.10の新機能