並び順

ブックマーク数

期間指定

  • から
  • まで

41 - 80 件 / 136件

新着順 人気順

OCamlの検索結果41 - 80 件 / 136件

  • Functional Programming in TypeScript

    Web apps are a mandatory part of every modern application nowadays, no matter how small or complex it is. From one-click apps that convert pictures to Photoshop, everyone wants fast and easy access to the app, and the web is one of the easiest ways to do that. At Serokell, we use TypeScript for writing web applications. But our main programming language is Haskell. And in this article, we want to

      Functional Programming in TypeScript
    • 関数の再帰的な定義に名前付けは必要か - 貳佰伍拾陸夜日記

      結論から言うと, 名前を付けることなく再帰的な関数を定義することは可能. 特定のプログラミング言語でどうかというよりは抽象概念としての関数の再帰を名前なしに実現可能かどうかという話(名前なしに実現できるプログラミング言語は存在するかという話). 発端 id:naoyaさんがこういうツイートをしていた. 再帰を書くときに何気なく関数に名前つけたり let で束縛したりしてたけど「再帰には三項関係が必要でありその実現には記号が本質的に関わる」とあり、名前づけの行為が必然だったことが分かった。プログラミングするときの視点が変わるな— naoya (@naoya_ito) 2022年8月12日 たとえば以下のように書いたときのlet fact =みたいな話. let fact = n => n <= 1 ? 1 : n * fact(n-1) ちなみに, 話は一見逸れるけど, こう書けると必然的に

        関数の再帰的な定義に名前付けは必要か - 貳佰伍拾陸夜日記
      • GitHub - janestreet/magic-trace: magic-trace collects and displays high-resolution traces of what a process is doing

        magic-trace collects and displays high-resolution traces of what a process is doing. People have used it to: figure out why an application running in production handles some requests slowly while simultaneously handling a sea of uninteresting requests, look at what their code is actually doing instead of what they think it's doing, get a history of what their application was doing before it crashe

          GitHub - janestreet/magic-trace: magic-trace collects and displays high-resolution traces of what a process is doing
        • 型安全で高速な連鎖行列積の計算

          この記事は Haskell Advent Calendar 2021 の22日目の記事です。 次のような3つの行列の積を考えてみましょう。 ABC = \begin{pmatrix} a_{00} & a_{01} & a_{02} \\ a_{10} & a_{11} & a_{12} \\ a_{20} & a_{21} & a_{22} \\ a_{30} & a_{31} & a_{32} \\ \end{pmatrix} \begin{pmatrix} b_{00} & b_{01} \\ b_{10} & b_{11} \\ b_{20} & b_{21} \\ \end{pmatrix} \begin{pmatrix} c_{00} & c_{01} & c_{02} & c_{03} & c_{04} \\ c_{10} & c_{11} & c_{12} & c_{13}

            型安全で高速な連鎖行列積の計算
          • 関数型まつり2025まとめ&感想

            こんにちは、skytomoと申します! この記事は関数型言語に疎い人(著者)の視点から見た関数型まつり2025を書きます。 来年、参加しようか迷っている方に参考になればいいと思っています! 関数型まつり2025について 「関数型まつり2025」は関数型プログラミングのカンファレンスです! 関数型まつりとしては初めての開催ですが、前身としてScalaMatsuriがありました。 ウェブサイト:https://fortee.jp/2025fp-matsuri 参加理由 普段は業務でRubyを書いています(!?)。 Rubyは関数型言語とは程遠く、私自身も関数型言語及びその周辺知識がほとんどありません。 なぜ参加したのか気になると思いますが、今回参加したのには理由がふたつあります。 フォロワーさんが宣伝していた 関数型言語に強い興味があった 「フォロワーさんが宣伝していた」 なんかよくわからない

              関数型まつり2025まとめ&感想
            • GitHub - marpple/FxTS: A functional programming library for TypeScript/JavaScript

              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 - marpple/FxTS: A functional programming library for TypeScript/JavaScript
              • OCaml Programming: Correct + Efficient + Beautiful — OCaml Programming: Correct + Efficient + Beautiful

                Preface About This Book Installing OCaml Introduction 1. Better Programming Through OCaml 1.1. The Past of OCaml 1.2. The Present of OCaml 1.3. Look to Your Future 1.4. A Brief History of CS 3110 1.5. Summary 2. The Basics of OCaml 2.1. The OCaml Toplevel 2.2. Compiling OCaml Programs 2.3. Expressions 2.4. Functions 2.5. Documentation 2.6. Printing 2.7. Debugging 2.8. Summary 2.9. Exercises OCaml

                • パッケージマネージャを自作するときに考えること - gfnweb

                  プログラミング言語を自前で創っていると,パッケージマネージャが欲しくなってくるものだ.既存パッケージマネージャやそのラッパーによる配布で事足りることも多いが,自前言語の要件とうまく合わなかったりして,真に自分で実装せねばならないこともある.そうした場合,パッケージマネージャをどんな設計にすべきだろうか? 言語固有の都合には触れずになるべく一般に考慮すべき事項を洗い出し,簡単な設計例も提示してみたい. なお,本稿はパッケージマネージャの設計に焦点を当てたものであり,効率的に依存制約を解消するアルゴリズムなど実装の詳細については解説しない.実際例えばOCamlでは 0install-solver というOPAMの裏でも使われているパッケージを利用すれば制約解消アルゴリズムそのものに踏み込まずとも制約解消処理を実装でき,(それ自体に興味があるときを除けば)必ずしもアルゴリズムを理解する必要はない

                  • MoonBit

                    Language DesignExpressive multi-paradigm design, combining the best of dynamic and static, functional and practicalData-oriented language with a robust type systemMultiple backend support including WebAssembly, JavaScript and more.Check Docs AI Integrated PlatformAI-friendly language design, featuring safe-guard, easy testing, minimizing LLM hallucinations.Built-in AI assistant, automating testing

                    • なっとく!関数型プログラミング を読んで関数型プログラミングを学んだ - Qiita

                      EDOCODEでエンジニアをしているYutakaです。 こちらは社内勉強会で発表した資料を元にしています。 関数型言語の知識がほとんどないエンジニアがなっとく!関数型プログラミングで学んだ用語を一部まとめました。原著はGrokking Functional Programmingです。本書はScalaとJavaで説明がされていますが、できる限り社内で使われている言語(Go, JavaScript, TypeScript)でサンプルコードを記載しました。 書籍のソースコードはこちらに全て公開されています。 そもそも関数型プログラミングとは? プログラミングのパラダイムには大きく①命令型プログラミング②宣言型プログラミングがあります。 ①命令型プログラミングとは どのよう(HOW)に計算するかに焦点を合わせ、段階的なアルゴリズムを詳細に定義します。これは実際のハードウェアの計算処理の流れに沿っ

                        なっとく!関数型プログラミング を読んで関数型プログラミングを学んだ - Qiita
                      • Functional programming is finally going mainstream

                        Functional programming is finally going mainstream Object-oriented and imperative programming aren’t going away, but functional programming is finding its way into more codebases. Klint Finley // July 12, 2022 Paul Louth had a great development team at Meddbase, the healthcare software company he founded in 2005. But as the company grew, so did their bug count. That’s expected, up to a point. More

                          Functional programming is finally going mainstream
                        • Pragmatic Functional Programming in TypeScript

                          Pragmatic Functional Programming in TypeScript Yuichi Goto | TSKaigi 2025 on May 24, 2025 発表者について Yuichi Goto @yasaichi パーフェクトRuby on Rails共著者 株式会社EARTHBRAIN [PR] EARTHBRAINとプロダクトについて 2021年7月創業のテクノロジースタートアップ 建設生産プロセスの生産性・安全性の向上を実現するデジタル ソリューション「Smart Construction®」を開発・保守 相互連携する複数のソフトウェア・ハードウェアの形で提供 プロダクトの一部は世界20カ国以上で利用 本セッションについて 関数型プログラミング(FP)を学んでも、実務での活用方法に悩む方は少なくありません。純粋関数、イミュータブルな値、モナドなどの概念を、具

                            Pragmatic Functional Programming in TypeScript
                          • GitHub - sodiray/radash: Functional utility library - modern, simple, typed, powerful

                            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 - sodiray/radash: Functional utility library - modern, simple, typed, powerful
                            • 技術書を自作PDFリーダーで読む - Haskellでつくる不思議な読書体験 (1):関数型玩具製作所

                              技術書典で購入した本をちょっと不思議なPDFリーダーで読んでみませんか? Acrobat Readerや、Kindleとはひと味違った読書を可能とします。 【ビルド済みソフト(Windows)】 https://polymony.net/2020/12/19/post-3765/ 【動画など】 https://github.com/polymonyrks/poppyS/blob/master/READMEJP.md 自然言語にもシンタックスハイライト的な何か(着色)を試みるものです。 難しい文書、読む気すら起こらない文書を攻略できます(速読・精読)。 技術書典10に合わせてビルド済みソフトを用意できました。 ぜひ、ご自身で体験してみてください。 (本書を買わなくてもソフトは動かせます、本書には着色戦略が書かれています) 【扱う内容】 * 自然言語への着色による視認性向上の可能性 * 具体的

                                技術書を自作PDFリーダーで読む - Haskellでつくる不思議な読書体験 (1):関数型玩具製作所
                              • OCaml 製 ActivityPub サーバ Waq の紹介 - HackMD

                                今年に入ってからずっと、OCaml で ActivityPub サーバを書いています。名前は Waq(ワク)で、例によって GitHub で大公開しています。SNS に必要な最低限の機能は揃っていて、README に従うと Docker Compose でデモが動かせるので、よければ試してみてください。

                                  OCaml 製 ActivityPub サーバ Waq の紹介 - HackMD
                                • はじめて関数型言語の機能に触れるエンジニア向けの学び方/教え方 / how-to-learn-or-teach-for-fp-beginner

                                  はじめて関数型言語の機能に触れるエンジニア向けの学び方/教え方 / how-to-learn-or-teach-for-fp-beginner

                                    はじめて関数型言語の機能に触れるエンジニア向けの学び方/教え方 / how-to-learn-or-teach-for-fp-beginner
                                  • Walk around functional web frontend programming

                                    https://opt.connpass.com/event/222709/

                                      Walk around functional web frontend programming
                                    • Haskell の Array

                                      Haskellのカレンダー | Advent Calendar 2023 - Qiita 3日目の記事です。 Haskell の Array (配列) について書こうと思います。Haskell の Array は索引が型クラスの Ix で抽象化されているため、特に配列の次元を拡張する際に柔軟性がありとても便利です。 そんな便利な Array ですが、もともと Haskell はリスト操作が強力ということもあってか、既存の参考書をみても Array の解説はほんの少しにとどまっているか、解説がないことがほとんどです。 Array が必要になる場面の多くは「リストだと !! によるインデックスアクセスで O(n) になってしまい間に合わない」という場面が多いと思います。しかし Haskell にはインデックスアクセスが O(1) の Vector (vector: Efficient Arra

                                        Haskell の Array
                                      • Introductory resources to type theory for language implementers

                                        This post briefly tours resources that helped introduce me to type theory, because I’m frequently asked by others for resources on this subject (even though I never had a formal education in type theory). Specifically, these resources will focus more on how to implement a type checker or type inference algorithm. Also, my post will be biased against books, because I don’t tend to learn well from r

                                        • 自作言語の紹介と関数型言語の実装方法の検討

                                          はじめに 私が個人で昨年の 6 月ごろから開発している関数型プログラミング言語を紹介する。言語の名前は「Plato」である。 この言語は昨年の U22 プログラミングコンテスト最終発表会でも発表した。コンテスト後、コンパイラの構成と実装に関して調査し直して、コードを一から書き直した。コンパイラは Haskell で書かれているため、本稿の内容も Haskell の知識をベースとしている。また、型理論の知識もある程度求められる。ただ、大雑把に書いているため、大雑把に読めばよく、このブログの読解に正確さは必要無い。 このブログでは、まず Plato のチュートリアルを示し、実際に何ができるのかを説明する。次に型検査や中間言語の仕様などコンパイラの実装手法を大まかに説明する。最後に今後実現したい機能などについて述べる。理論的に面白いものや有用な機能については、後日それ専用の記事を書く予定。 チュ

                                            自作言語の紹介と関数型言語の実装方法の検討
                                          • 12.2.1. Promises · Functional Programming in OCaml

                                            Promises In Lwt, a promise is a write-once reference: a value that is permitted to mutate at most once. When created, it is like an empty box that contains nothing. We say that the promise is pending. Eventually the promise can be resolved, which is like putting something inside the box. Instead of being resolved, the promise can instead be rejected, in which case the box is filled with an excepti

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

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

                                                【エフェクトシステムとは一体なんなのか?】なぜ私はHaskellでエフェクトシステムのライブラリを作るに至ったか
                                              • ML のサブセットの型推論器を Coq で検証する - fetburner.core

                                                この記事は言語実装 Advent Calendar 2020 の5日目の記事です. 一度でも型推論器を書いたことがあれば,そのあまりの邪悪さ,あるいはその複雑さに恐れ慄いたことでしょう. 参照を用いて単一化を実現しようものなら構文木は参照に汚染され,純粋関数型に実装しようものなら大量の型代入をどのような順序で適用したものか悩まされる. これは Hindley-Milner 型推論器を実装する上での宿命のようなものです. 本記事では,MLのサブセット——型付きλ計算をletと参照で拡張した,let多相をサポートする言語——の型推論器を Coq で実装し,その正当性を証明します. Coq で検証を行うことで我々は型推論器のバグへの恐怖とデバッグの労力から真に解放され,枕を高くして眠ることができることでしょう. もっとも、型付きλ計算を let 多相で拡張した言語の型推論器の正当性は実はすでに証

                                                  ML のサブセットの型推論器を Coq で検証する - fetburner.core
                                                • 限定継続いろいろ | 雑記帳

                                                  このブログでは限定継続について過去に何回か記事を書きました: LunarMLと継続限定継続と例外とモナド 今回、LunarML向けのVMに限定継続を実装してみて理解が深まったので、改めて記事にします。 限定継続:スタックを使ったざっくりとした説明 今回はスタックを使って限定継続をざっくりと説明してみます。 関数という概念を持つプログラミング言語では、スタックを使って関数の呼び出しを管理することが多いです。コールスタックとか、スタックのバックトレースとか言いますよね。ここではネイティブのスタックか仮想マシンのスタックかというのは問いません。 関数を呼び出すと、フレームと呼ばれる領域がスタックに確保されて、関数への引数やローカル変数はそこに確保されたりします。 例えば、以下のプログラムを考えます: void g() { // すごい計算 } void f() { double j; g();

                                                  • 関数型Pythonアンチパターン

                                                    Devin入門と最近のアップデートから見るDevinの進化 / Introduction to Devin and the Evolution of Devin as Seen in Recent Update

                                                      関数型Pythonアンチパターン
                                                    • Release OCaml 5.0.0 · ocaml/ocaml

                                                      OCaml 5.0.0 introduces a completely new runtime environment with support for shared memory parallelism and effect handlers. As a language, OCaml 5 is fully compatible with OCaml 4 down to the performance characteristics of your programs. In other words, any code that works with OCaml 4 should work the same with OCaml 5. The currently known exceptions to this rule are: the removal of many long-depr

                                                        Release OCaml 5.0.0 · ocaml/ocaml
                                                      • 初めてでもこわくない!TypeScriptで関数型プログラミングをしてみよう - Qiita

                                                        Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

                                                          初めてでもこわくない!TypeScriptで関数型プログラミングをしてみよう - Qiita
                                                        • Caramel: massively scalable, type-safe applications

                                                          caramel is a functional language for building type-safe, scalable, and maintainable applications Install Docs Discord Code

                                                            Caramel: massively scalable, type-safe applications
                                                          • GitHub - OCamlPro/owi: WebAssembly Swissknife & cross-language bugfinder

                                                            Owi is a toolchain to work with WebAssembly. It is written in OCaml. It provides a binary with many subcommands: owi c: a bug finding tool for C code that performs symbolic execution by compiling to Wasm and using our symbolic Wasm interpreter; owi conc: a concolic Wasm interpreter; owi fmt: a formatter for Wasm; owi opt: an optimizer for Wasm; owi run: a concrete Wasm interpreter; owi script: an

                                                              GitHub - OCamlPro/owi: WebAssembly Swissknife & cross-language bugfinder
                                                            • GitHub - goblint/cil: C Intermediate Language

                                                              CIL is a front-end for the C programming language that facilitates program analysis and transformation. CIL will parse and typecheck a program, and compile it into a simplified subset of C. goblint-cil is a fork of CIL that supports C99, C11 as well as most of the extensions of the GNU C. It makes many changes to the original CIL in an effort to modernize it and keep up with the latest versions of

                                                                GitHub - goblint/cil: C Intermediate Language
                                                              • 時間を加味したモデリング - DeNA Testing Blog

                                                                こんにちは、SWETの鈴木穂高(@hoddy3190)です。 現在SWETチームにて仕様の欠陥をなるべく早くみつける取り組みにチャレンジしています。 欠陥をみつけるタイミングが早ければ早いほど、開発中の手戻りに伴うコストを抑えられます。 たとえば、仕様作成フェーズ、実装フェーズ、QAフェーズの順で開発が進んでいくときに、仕様の欠陥が実装フェーズやQAフェーズでみつかると実装やQAのやり直しを引き起こしかねません。 そうした大きな手戻りを抑えるために仕様の欠陥をなるべく仕様作成フェーズでみつけることを目指します。 対象領域に出てくる要素をモデリングすることは、仕様に潜む欠陥を開発の早い段階でみつけるための、有効な手段のひとつです。 要素には、開発者がこれから作るシステムや、そのシステムのユーザー、そのシステムと直接的または間接的に相互作用する外部のシステムが含まれます。 単に図を書くというモ

                                                                  時間を加味したモデリング - DeNA Testing Blog
                                                                • Writing a Game Boy Emulator in OCaml

                                                                  IntroductionFor the past few months, I have been working on a project called CAMLBOY, a Game Boy emulator written in OCaml that runs in the browser. You can try it out on the following demo page: Demo Page I included several homebrew ROMs in the demo, so please try them out (I recommend Bouncing ball and Rocket Man Demo). You can also play with it in your mobile browser as it runs at 60 FPS on rec

                                                                    Writing a Game Boy Emulator in OCaml
                                                                  • F# ではじめる関数型プログラミング入門 (上巻)

                                                                    .NET ファミリーの関数型プログラミング言語である F# を利用した、全 3 巻構成の関数型プログラミング入門書籍となります。 上巻では F# の基本的な文法などの学習ができます。 なお、この書籍は本編をすべて無料で利用いただけますが、活動を応援いただける場合には最終チャプターをご購入いただけますと嬉しく思います。

                                                                      F# ではじめる関数型プログラミング入門 (上巻)
                                                                    • OCamlコンパイラのバックエンドを提供するMalfunctionが面白そう - Arantium Maestum

                                                                      OCamlのDiscuss掲示板を眺めていたらこんなプロジェクトについての言及があった: github.com Malfunction is a high-performance, low-level untyped program representation, designed as a target for compilers of functional programming languages. OCamlコンパイラの中間表現であるLambda言語(とほぼ同等のもの)を受け取り、OCamlバイトコードかnativeコードへのコンパイルをしてくれるようだ。 (追記:バイトコードにコンパイルできるというのは間違い。実際にはOCamlコンパイラとは別なLambda言語インタプリタがある) Lambda IRはOCamlコンパイラにフラグを渡すと出力してくれる。以前少し調べていくつか記事

                                                                        OCamlコンパイラのバックエンドを提供するMalfunctionが面白そう - Arantium Maestum
                                                                      • GHC 9.2 で導入されたQuick Look型推論アルゴリズムについて - 朝日ネット 技術者ブログ

                                                                        初めまして、朝日ネット開発部の hogeyama です。 今回は Haskell の中級的なトピックとして、 GHC 9.2 で導入された Quick Look 型推論アルゴリズムを取り上げようと思います。 概要 Haskell のデファクトスタンダードなコンパイラである GHC では通常の多相(ジェネリクス)の一般化である非可述的多相(impredicative polymorphism)を実装していますが、その型推論アルゴリズムは長らく「型推論が弱い」「実装が不安定でコンパイラのバージョンアップでデグレが起きる」といった問題を抱えていました。 しかし昨年10月、Quick Look という新しいアルゴリズムが GHC 9.2 に実装されたことでこの問題が解決しました。 本記事ではこの Quick Look によって何が変わるのか、利用する際に何に気をつければよいのかを非可述的多相の概要

                                                                          GHC 9.2 で導入されたQuick Look型推論アルゴリズムについて - 朝日ネット 技術者ブログ
                                                                        • 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
                                                                          • Dark's new backend will be in F#

                                                                            Welcome HN! Dark is a programming language, structured editor, and infrastructure—all in one—whose goal is to make it 100x easier to build backend services. Check out the website, our What is Dark post, and How Dark deploys in 50ms for more. Thanks for checking us out! Part of a set with Leaving OCaml and Why Dark didn't choose Rust. Nothing in my life so far would have prepared me for the fact th

                                                                              Dark's new backend will be in F#
                                                                            • Dream — Tidy, feature-complete web framework

                                                                              let hello who = <html> <body> <h1>Hello, <%s who %>!</h1> </body> </html> let () = Dream.run @@ Dream.logger @@ Dream.router [ Dream.get "/" (fun _ -> Dream.html (hello "world")); ] Dream is an easy-to-use, boilerplate-free Web framework, whose entire API fits on this page! It supports TLS, WebSockets, and GraphQL. HTTP/2 support is transparent. It also includes: a nice log and OCaml runtime confi

                                                                              • Eio 1.0 Release: Introducing a new Effects-Based I/O Library for OCaml

                                                                                Eio 1.0 Release: Introducing a new Effects-Based I/O Library for OCaml The OCaml 5 update brought much-anticipated support for programming on multiple cores. It also introduced support for concurrency via effect handlers – one of the first mainstream languages to do so. This significant update has had profound performance and UX implications, propelling OCaml into new areas of software development

                                                                                  Eio 1.0 Release: Introducing a new Effects-Based I/O Library for OCaml
                                                                                • 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