並び順

ブックマーク数

期間指定

  • から
  • まで

201 - 240 件 / 275件

新着順 人気順

Haskellの検索結果201 - 240 件 / 275件

  • VSCodeのHaskell拡張を使って最速開発環境構築 - Qiita

    2020/7/28に新しいHaskell拡張がリリースされました。 https://marketplace.visualstudio.com/items?itemName=haskell.haskell さっそく、こいつを使って最速開発環境構築していくぜ!!! 前提条件 Dockerをインストール VSCodeをインストール Remote - Containers拡張のインストール コンテナ上でHaskell拡張を動作させる 任意のフォルダに.devcontainer.jsonファイルを作成して以下を記載 { "name": "HaskellDevContainer", // DockerhubのHaskell公式イメージ "image": "haskell:8.8", "extensions": [ // HaskellのVSCode拡張をインストール // https://market

      VSCodeのHaskell拡張を使って最速開発環境構築 - Qiita
    • Implementation status of QUIC in Haskell - あどけない話

      After implementing HTTP/2 in Haskell and TLS 1.3 in Haskell, I have been working for IETF QUIC. This article explains what I have done in 2019 fiscal year of Japan to report our sponsor, Internet Initiative Japan (IIJ). I have both titles of IIJ and IIJ-II. I'm wearing an IIJ-II hat in this article. If you wonder why I'm using Haskell to implement network protocols, please give a look at my positi

        Implementation status of QUIC in Haskell - あどけない話
      • Generating small binaries in Haskell

        Last year I wrote the first version of microcosmos, which is a webserver for running simple blogs. Since then I�ve been mulling over the biggest problem that microcosmos has: It�s huge. To be precsise, it�s 113MB once compiled. To be clear, this isn�t just a problem with microcosmos. It�s pervasive among Haskell programs. The venerable Pandoc document translator comes in at 68MB on its own. Cabal

          Generating small binaries in Haskell
        • fallibleというパッケージをリリースしました - Haskell-jp

          タイトルの通り、fallibleというパッケージを紹介します。 matsubara0507/fallible: interface for fallible data type like Maybe and Either. - GitHub ちなみに、fallibleはHaskell-jp Slackで: と質問したところ、該当するようなパッケージは無さそうだったので作ったという経緯があります。 その際に助言をくれた fumieval氏のコードをほとんど引用した形になったので、Haskell-jp Blogに紹介記事を載せることにしました(僕は普段、自分のブログに自作したパッケージを書いています)。 import qualified Data.List as L run :: String -> Token -> Bool -> IO () run targetName token ver

            fallibleというパッケージをリリースしました - Haskell-jp
          • Haskell in Production: Riskbook

            To continue our series on Haskell in production, we have an interview with Jezen Thomas, the CTO of Riskbook. Riskbook is a marketplace that connects reinsurance brokers and underwriters, and Haskell has been working out quite well for them. In the interview, we talk about how Haskell can be a blessing when introducing changes to the codebase, what libraries and extensions they use in their projec

              Haskell in Production: Riskbook
            • Client-side web programming in Haskell: A retrospective

              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,

              • Haskellで正格評価でループを回すには? - hiroki_f’s diary

                Haskellでは再帰的に定義された関数は遅延評価で計算される。 この遅延評価はHaskellの売りの一つであるが、これが時には仇となる。 たとえば、優雅な実装例で知られる次のフィボナッチ数の実装は遅く、メモリの消費量も多い。 fib n = fibs !! n fibs = 1:1:zipWith (+) fib (tail fib) これは、値が評価されるまで計算が待機してメモリが保持されつづけられることが原因だ。 これを解決するには、遅延評価ではなく正格評価で計算すれば良い。 Haskellの神話 - あどけない話 ではzipWithを正格化したzipWith’を定義して、計算を早くする例が提示されていた。 再帰でループを表現するのは、haskellならではの優雅な実装方法だけども、基本は遅延評価なので今あげた問題がついて回る。 例えば、C言語で old=init for (i=1;

                  Haskellで正格評価でループを回すには? - hiroki_f’s diary
                • GitHub - matsumonkie/izuna: Show Haskell type annotations when doing code review on Github

                  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 - matsumonkie/izuna: Show Haskell type annotations when doing code review on Github
                  • Functor Typeclass in Haskell

                    You might already know the map function: map :: (a -> b) -> [a] -> [b] map _ [] = [] map f (x:xs) = f x : map f xs > map (\x -> x + 1) [1, 2, 3] [2, 3, 4] It takes a function of type a -> b and applies it to each element of a list. The elements change, but the data type storing them ([]) remains the same. In this article, we’ll call such a data type with another type inside it a context. Transform

                      Functor Typeclass in Haskell
                    • WSLへのHaskellのインストール並びにVisual Studio Codeの環境設定 - Qiita

                      by Shuichi Ohtsu ビデオ解説(日本語) https://youtu.be/FLqdj87pE9U ビデオ解説(英語) https://youtu.be/aC3-Ur-mNM0 動作環境 WSL(Windows Subsystem for Linux)にインストールされたUbuntuにHaskellをインストールする方法をご紹介いたします。 Haskellは、関数を中心にしてプログラムを組み立てる、プログラミング言語です。 Haskellの概要や文法については、Referenceをご覧ください。 Ubuntuのアップデート まずWSL上のUbuntuを開きます。 まず、sudo apt updateを実行し、更新情報を取得します。 次に、sudo apt upgradeを実行し、システムを更新します。 最初にコマンドラインから cd /mnt/cと打ち込んでWindows C

                        WSLへのHaskellのインストール並びにVisual Studio Codeの環境設定 - Qiita
                      • IDE: Measuring memory usage of Haskell values and patching GHC

                        Posted on August 4, 2020 by Michail Pardalos As part of my Google Summer of Code project to add instrumentation to ghcide, I needed to measure the size of Haskell values in memory. After getting blocked by a bug in a GHC primop I fell down a rabbit hole of learning about GHC’s memory layout, C– and making my first contribution to GHC. In this post I want to describe that journey and hopefully enco

                        • William Yao / haskell-web-stack · GitLab

                          A dead-simple Haskell web application, for learning purposes.

                            William Yao / haskell-web-stack · GitLab
                          • Haskellのzip関数を一般化すると何になるか

                            この記事は Haskell Advent Calendar 2023 の7日目の記事です。 zip関数について Haskellには zip 関数というものがあります。この関数は、2つのリストを受け取って、それぞれから取り出した要素を組にしたリストを返します。

                              Haskellのzip関数を一般化すると何になるか
                            • Writer Monadで気軽にMonad則を破る - Haskell-jp

                              Tweet 🎅この記事は、Haskell Advent Calendar 2020 25日目の記事です。 🎄Happy Christmas!!🎄 今回は先日(といっても元の質問の投稿からもう何ヶ月も経ってしまいましたが…)StackOverflowに上がったこちら👇の質問に対する回答の、続きっぽい話を書こうと思います。長いし、質問の回答からスコープが大きく外れてしまうので記事にしました。 haskell - モナド則を崩してしまう例が知りたい - スタック・オーバーフロー MonadとMonoidにある重要な繋がりを説明した後、それを応用したWriter MonadがどうMonoidを使ってMonad則を満たしているのか証明します。そして、Writerのそうした性質を用いて簡単にMonad則を破る例を紹介することで、読者のみなさんがMonad則のみならずdo記法やMonadそのもの

                                Writer Monadで気軽にMonad則を破る - Haskell-jp
                              • Why Liquid Haskell matters

                                Since the inception of the Haskell language, the community around it has steadily innovated with language extensions and abstractions. To mention a few, we had the IO monad, all flavors of type classes and constraints, Template Haskell, generalized algebraic data types (GADTs), data kinds, etc. Then we had to deal with the programs resulting from all this innovation, which eventually sprang feelin

                                  Why Liquid Haskell matters
                                • GitHub - hmemcpy/haskell-hie-devcontainer: A DevContainer for VSCode, for installing GHC 8.6.5, HIE (Haskell IDE Engine) and the required plugins

                                  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 - hmemcpy/haskell-hie-devcontainer: A DevContainer for VSCode, for installing GHC 8.6.5, HIE (Haskell IDE Engine) and the required plugins
                                  • Sum and Product Types -�The Fruit Salad & Fruit Snack Example - From F# to Haskell, Scala and Java

                                    Sum and Product Types -�The Fruit Salad & Fruit Snack Example - From F# to Haskell, Scala and Java - The document describes how product types (built using AND) and sum types (built using OR) are used to define types for representing fruit salads and fruit snacks in F#, Haskell, Scala, and Java. - Product types combine elements and are used to define the FruitSalad type, while sum types allow alter

                                      Sum and Product Types -�The Fruit Salad & Fruit Snack Example - From F# to Haskell, Scala and Java
                                    • Algebraic Data Types in Haskell

                                      Most programming languages have a way to make compound data types. In Haskell, we can do that via algebraic data types. Even though the name might sound scary at first, it’s simply a way to construct types. This article will introduce you to the concept of algebraic data types and show you how to use them. Read further to learn: how to create your own custom Haskell data types; what product and su

                                        Algebraic Data Types in Haskell
                                      • 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

                                        • So Long Surrogates: How we moved to UTF-8 in Haskell

                                          We released a blazingly fast Aho-Corasick implementation, written in Haskell, in 2019. This implementation was based on UTF-16 strings, since Haskell's text library uses that for its internal string representation. However, the most recent major update of text changed its internal string representation from UTF-16 to UTF-8. This is good news for us, since most of our customer’s data is ASCII, this

                                          • Haskell Stack プロジェクトを Bazel でビルドしてみる

                                            仕事では Bazel を使ってビルドすることが多くなり,自分でも Bazel ルールを自作するようになったので,実験も兼ねて趣味の Haskell Stack プロジェクトを Bazel を使ってビルドしてみることにしました. 本記事はそのメモ書きです. あとこれは Haskell Advent Calendar 2020 の2日目の記事です. Bazel Bazel は Google のエンジニアが中心になって開発している OSS のビルドツールだ. 以下のような特徴がある: 必要なコマンドのインストール・バイナリのビルド・コマンドの実行などを記述できる それらは全て専用のサンドボックス内で実行されるため再現性が高い Starlark という Python 風な独自言語で記述する キャッシュなどが工夫されており二度目以降のビルドが高速になりやすい 依存関係を明確に記述する必要がある また

                                            • Tuning Haskell RTS for Kubernetes, Part 1

                                              We’re running Haskell in production. We’ve told that story before. We are also running Haskell in production on Kubernetes, but we never talked about that. It was a long journey and it wasn’t all roses, so we’re going to share what we went through. TL;DRConfigure Haskell RTS settings: Match -N⟨x⟩ to your limits.cpuMatch -M⟨size⟩ to your limits.memoryYou can set them between +RTS ... -RTS arguments

                                              • Haskell/連想配列のマージとData.Map.Merge.Strict - Qiita

                                                HaskellのData.Mapモジュールにおいて定義されるMap型(連想配列)に関して, 2つのMapのマージを定義するData.Map.Merge.Strict.mergeの使い方が意外と大変だったので共有します. Data.Mapについて こちらの記事に基本的な事項がまとめてあります. Data.Mapの使用にはcontainersパッケージのインストールが必要です. こちらでも言及されている通り非正格なData.Mapは特別な理由がない限り非推奨とのことなので, 本記事でも正格版であるData.Map.Strictを用います. keyの型k, valueの型aの連想配列Map k aは配列[(k,a)]からfromList関数によって生成できます:

                                                  Haskell/連想配列のマージとData.Map.Merge.Strict - Qiita
                                                • 依存型のあるHaskellことIdrisってどんな言語? | κeenのHappy Hacκing Blog

                                                  import Data.String data FizzBuzz = F | B | FB | I Integer Show FizzBuzz where show F = "fizz" show B = "buzz" show FB = "fizzbuzz" show (I n) = show n fizzBuzz : Integer -> FizzBuzz fizzBuzz n = case (n `mod` 3, n `mod` 5) of (0, 0) => FB (_, 0) => B (0, _) => F _ => I n fizzBuzzSeq : Integer -> List FizzBuzz fizzBuzzSeq n = map fizzBuzz [1..n] main : IO () main = do [_, arg] <- getArgs | _ => put

                                                    依存型のあるHaskellことIdrisってどんな言語? | κeenのHappy Hacκing Blog
                                                  • Haskell base proposal: unifying vector-like types

                                                    Haskell base proposal: unifying vector-like types Published March 16, 2021 DISCUSSION I've opened up a Discourse thread to discuss this post. I'll likely respond to comments here and on Twitter, but I'd like to move towards using the more official discussion channels when possible. One of my greatest hopes for the Haskell Foundation is already beginning to be realized: better communication. I'm a

                                                      Haskell base proposal: unifying vector-like types
                                                    • Evaluation of function calls in Haskell

                                                      (This post is discussed in episode 15 of the Haskell Weekly Podcast.) Chapter 27 of Haskell Programming from first principles (by Christopher Allen and Julie Moronuki) is about the evaluation system of Haskell, with a focus on non-strictness. In the section Preventing sharing on purpose, they write you want to prevent sharing the result of a function call when it would mean storing some big data j

                                                      • ML Ada Rust C++ Haskell

                                                        ML Ada Rust C++ Haskell

                                                          ML Ada Rust C++ Haskell
                                                        • GitHub - hamler-lang/hamler: Haskell-style functional programming language running on Erlang VM.

                                                          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 - hamler-lang/hamler: Haskell-style functional programming language running on Erlang VM.
                                                          • EmacsのquickrunでHaskellを実行する時にシステムのghcではなくStackのghcを使ってもらう方法

                                                            ("haskell" . ((:command . "runghc") (:description . "Run Haskell file with runghc(GHC)"))) 私はStackを使ってHaskellコンパイラを入手して実行しているのでこれでは実行できません. またStackのglobalにインストールしたライブラリも使用できません. もちろんalistを編集すれば簡単に切り替えは可能でしょうが, あまり連想リストを直接弄りたくはありません. 設定する関数が多分あるはずだと思って探しました. quickrun-add-commandを使えば良いようです. いや, 完全に追加ならこれで良いですが, 多分Haskell設定を上書きするのでquickrun--override-commandを使うのが正解でしょう. (with-eval-after-load 'quickrun

                                                              EmacsのquickrunでHaskellを実行する時にシステムのghcではなくStackのghcを使ってもらう方法
                                                            • Developing QUIC Loss Detection and Congestion Control in Haskell - あどけない話

                                                              For last two months, I have been trying to implement "QUIC Loss Detection and Congestion Control" in Haskell. This blog article describes a brief summary on what I have done. ACK handling Before loss detection and congestion control were developed, QUIC packets were retransmitted, if necessary, by a simple resender lightweight thread based on timeout. The internal data structure was, of course, Pr

                                                                Developing QUIC Loss Detection and Congestion Control in Haskell - あどけない話
                                                              • 木の数え上げ - Haskell-Misc

                                                                これはHaskell Advent Calendar 2019 24日目の記事として書いたものです. code:Tree.hs {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NPlusKPatterns #-} module Tree where import Data.Bool (bool) import Data.List (genericIndex, genericTake, findIndex, scanl') import Data.List.NonEmpty (NonEmpty(..)) import Numeric.Natural import Control.Comonad.Cofree (Cofree(.

                                                                  木の数え上げ - Haskell-Misc
                                                                • 日本語をshowしてうまく表示されなかったら - Haskell-jp

                                                                  すると、日本語の大半が変な文字列に変わってしまいました😥。 へ… 変な文字列じゃないし!エスケープシーケンスに変換しただけだから! これは、Haskell標準におけるshow関数の残念な仕様です。 show関数に文字列を渡すと、ダブルクォートで囲った上で、ASCII範囲外の文字列や、ASCIIの非表示文字などをエスケープシーケンスに変換して返します。 これは、show関数をデバッグで使用した際、指定した文字列にどんな文字が含まれているか、簡単にわかるようにするための仕様です。 文字の文字コードを表示すれば、NULL文字や制御文字、ゼロ幅文字、特殊なスペースなど、視認しにくいおかしな文字が含まれていても、一目でわかるのです。 しかしこれは日本語話者である我々にとって、少なくとも日本語の文字に関しては「余計なお世話」です。 NULL文字やASCIIの制御文字といった本来画面に表示することがな

                                                                    日本語をshowしてうまく表示されなかったら - Haskell-jp
                                                                  • UnityでHaskellのコードを実行する方法の模索 - Qiita

                                                                    概要 Unityでのゲーム制作には基本的にはC#を使う。しかし、場合によっては他の言語を用いたいことがあり、Unityではネイティブプラグインという方法で、外部で生成されたDLLを利用することが可能である。 筆者は、ダンジョン生成のプログラムをHaskellで作成し、それをUnity内で利用したいという経緯があったので、今回、HaskellのシンプルなコードをCabalとStackを利用してDLLを作成し、それをUnityから利用する効率的な方法を模索した。 環境はWindows 10 64bit 1. 準備 Stackで新しいプロジェクトを作る。 一度ビルドstack buildして、package.yamlからcabalファイル(haskell-foreign-library-test.cabal)を生成する(バックでhpackが動いている)。 後述するが、ライブラリ作成にはCabal

                                                                      UnityでHaskellのコードを実行する方法の模索 - Qiita
                                                                    • Haskell(ghc)の巨大な実行ファイルをコンパクトにしたい

                                                                      Haskellは高い機能性をもった関数型プログラミング言語で、他の手続き型プログラミング言語では難しいとされている関数でも容易に行うことができます。強い静的型付け、遅延評価などに対応しています。 Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

                                                                        Haskell(ghc)の巨大な実行ファイルをコンパクトにしたい
                                                                      • HaskellのFoldableはどこから来たのか? - Qiita

                                                                        lotzさんのData.Foldableの正体に迫るに触発されてこの記事を書きました。 Haskellで、リストなどへの畳み込み操作(ステップごとに結果を累積する計算)を一般化したものがFoldableクラスです。今回はそんなFoldableがどこからHaskellにやってきたのか、について焦点を絞りました。 lotzさんの記事にによると「Crushと呼ばれるものが原型になっているようです」とのことで、論文をいざ読んでみたのですが、記号の意味を理解するのが精いっぱいでした… そこで、この記事では概念というよりは「GHCとFoldableの関係」についてまとめました。 畳み込みとは? 前提知識として、畳み込みとFoldable型クラスについてある程度知っている必要があるので、軽く紹介します。 畳み込みの単純な例として、1~100までの総和を求める問題があります。数式ではこうです。 $$ \s

                                                                          HaskellのFoldableはどこから来たのか? - Qiita
                                                                        • 11 Companies That Use Haskell in Production

                                                                          Among programming languages, Haskell isn’t the most common choice (like JavaScript) or the one that makes a lot of engineers excited (like Rust). At the same time, it has attracted a solid following in certain sub-fields of software development. Large companies like GitHub, Microsoft, Tesla, and Meta reach for the language when the necessity arises. That’s because Haskell is best-in-class for buil

                                                                            11 Companies That Use Haskell in Production
                                                                          • これから Haskell を学ぶ人のための書籍・論文紹介

                                                                            Haskell に関連する書籍について、読んだものについては簡単なレビューを添えています。 書籍のジャンルは主にHaskell, 型システム, 圏論, 言語設計 です。また、書籍名のあとのカッコは出版年/月です。 基本的に古い書籍よりも新しい書籍をオススメします。 BIGMOON でアルバイトする人に推薦している書籍は以下の2冊です。 プログラミングHaskell (2019/08) Practical Haskell (2019/04) 入門者 (☆) 完全に独学で学ぼうと思っている人は以下の書籍から入門すると良いでしょう。 入門Haskellプログラミング (2019/07) すごい Haskell たのしく学ぼう! (2012/05) 内容が古いのであまりオススメできない書籍。 ふつうのHaskellプログラミング (2006/06) 入門者 (☆☆) 専門家に質問できるような環境に

                                                                            • Haskell in Production

                                                                              Haskell in Production During the past year, my team has been building production services using Haskell. It’s been quite a journey. None of us had written production code using Haskell before. We were all familiar with the language and excited to get to assess it in production. Because that’s really what we’ve been doing; seeing if Haskell is a good fit for us in order to deliver quickly and with

                                                                              • Haskellのカレンダー | Advent Calendar 2021 - Qiita

                                                                                プログラミング言語HaskellについてのAdvent Calendar Haskell関連の記事ならなんでも 記事はQiitaでも、自分のブログやgistなどに書いてリンクを貼ってもOKです! Haskell-jp Blog への寄稿も大歓迎です。 (寄稿方法はこちら) 去年のAdvent Calendar: https://qiita.com/advent-calendar/2020/haskell 予定日を過ぎても投稿がない場合、事前の通達なく他の方に代筆して頂きます。あらかじめご了承ください。 hask(_ _)eller edit_calendarHow to join the calendarYou can join the calendar by selecting an available date and registering the URL of the articl

                                                                                  Haskellのカレンダー | Advent Calendar 2021 - Qiita
                                                                                • Haskellを始める時に役立つ資料 - Qiita

                                                                                  Haskellを始める時に役立つ資料 関数型プログラミングが初めてで、読んでもちょっとわからないって方は OCamlをおすすめします。 OCamlで始める関数型プログラミング プログラミングの基礎は名著です。この本でわからないって方は厳しいと思います。 ※追記 haskellをやっていて、副作用云々はいいから.. ってなった方はOCamlベースのF#がおすすめです。 haskellと並行してやるのもおすすめです。 F# を知ってほしい 日本語リンク集 Haskell 超入門 網羅的に説明されており、とりあえず始める人におすすめ ウォークスルー Haskell 網羅的に説明されており、とりあえず始める人におすすめ Haskell 基本構文のまとめ すごいHaskell楽しく学ぼうの1〜5章の内容をまとめ Haskellらしさって?「型」と「関数」の基本を解説!【第二言語としてのHaskell

                                                                                    Haskellを始める時に役立つ資料 - Qiita