並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 19 件 / 19件

新着順 人気順

opticsの検索結果1 - 19 件 / 19件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

opticsに関するエントリは19件あります。 HaskellプログラミングLens などが関連タグです。 人気エントリには 『Optics: 「パス」に型を付ければ、データ全体に型を付ける必要はない - Lambdaカクテル』などがあります。
  • Optics: 「パス」に型を付ければ、データ全体に型を付ける必要はない - Lambdaカクテル

    あまり知られていない関数型言語のおもしろ概念として、Opticsというものがある。 Opticsとは、オブジェクト指向言語で言うところのSetter/Getterを一種の関数として捉え、いくつかの便利な特性を付与したものの総称だ。この便利な特性によって、Setter/Getter以上のことをパワフルにこなせる。 最も有名なOpticsはLensであり、色々な解説資料が(主にHaskell向けに)出ている。 blog.recruit.co.jp さて、これまでのOpticsを紹介する資料はSetterとGetterとしての側面に注目しがちだったので、じゃあOpticsの何が良いのか、Scalaでやる意義は何か、という側面をこの記事で紹介しようと思う。 Optics -- vs. copyメソッド地獄 Opticsは合成可能である Opticsはボトムアップのアプローチである Opticsがう

      Optics: 「パス」に型を付ければ、データ全体に型を付ける必要はない - Lambdaカクテル
    • Lensを始めとするOpticsがプログラミングをどう変えるか / 複雑なデータのモデリングをサボるには - Lambdaカクテル

      仕事でLensを使う機会があった。Lensは複雑で入り組んだデータ構造の読み書きに非常に効果的な手法であるにもかかわらず、関数型プログラマ以外にはあまり知られていないように思える。 そこでこの記事では、Lensとは何なのか、なにが良いのか、具体的にどのようなケースでLensが役立ったか、そしてLensの亜種について紹介する。業務でも使ってます! AIくんが考えるLens 前提条件 Lensとは Lensの使いどころ データをモデリングする場合 (とても つらい) Lensを使う場合: Lensはアクセスパスである Lensと愉快な仲間たち Lensの合成 -- andThenでひっつけよう Lens Law Monocleの便利機能 Lensの自動生成でサボる Focusでもっとサボる Lensがもたらしたもの まとめ あわせて読みたい 前提条件 この記事ではLensを紹介する言語としてS

        Lensを始めとするOpticsがプログラミングをどう変えるか / 複雑なデータのモデリングをサボるには - Lambdaカクテル
      • Generalizing 'jq' and Traversal Systems using optics and standard monads

        Hi folks! Today I'll be chatting about Traversal Systems like jq and XPath; we're going to discover which properties make them useful, then see how we can replicate their most useful behaviours in Haskell using (almost entirely) pre-ols!existing standard Haskell tools! Let's go! What's a Traversal System? First off I'll admit that "Traversal System" is a name I just came up with, you probably won'

        • Advent of Optics: Day 3

          Since I'm releasing a book on practical lenses and optics later this month I thought it would be fun to do a few of this year's Advent of Code puzzles using as many obscure optics features as possible! To be clear, the goal is to be obscure, strange and excessive towards the goal of using as many optics as possible in a given solution, even if it's awkward, silly, or just plain overkill. These are

            Advent of Optics: Day 3
          • Advent of Optics: Day 4

            Since I'm releasing a book on practical lenses and optics later this month I thought it would be fun to do a few of this year's Advent of Code puzzles using as many obscure optics features as possible! To be clear, the goal is to be obscure, strange and excessive towards the goal of using as many optics as possible in a given solution, even if it's awkward, silly, or just plain overkill. These are

              Advent of Optics: Day 4
            • Oleg's gists - Case study: migrating from lens to optics

              As you are reading this post, you probably know that there is the lens library by Edward Kmett et al. which is de facto optics library for Haskell. It's famous also for its type errors. the optics library by Adam Gundry, Andres Löh, Andrzej Rybczak and myself uses different representation for optics (note: slanted optics is a concept, monospace optics is a library name). I recommend reading throug

              • Optics and Kleisli arrows

                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

                  Optics and Kleisli arrows
                • Announcing the optics library

                  We are delighted to announce the first Hackage release of optics, a Haskell library for defining and using lenses, traversals, prisms and other optic kinds. The optics library is broadly similar in functionality to the well-established lens library, but uses an abstract interface rather than exposing the underlying implementation of each optic kind. It aims to be easier to understand than lens, wi

                  • Advent of Optics: Day 1

                    Since I'm releasing a book on practical lenses and optics later this month I thought it would be fun to do a few of this year's Advent of Code puzzles using optics as much as possible! I'm not sure how many I'll do, or even if any problems will yield interesting solutions with optics, but there's no harm trying! The goal is to use optics for as much of the solution as possible, even if it's awkwar

                      Advent of Optics: Day 1
                    • Advent of Optics: Day 2

                      Since I'm releasing a book on practical lenses and optics later this month I thought it would be fun to do a few of this year's Advent of Code puzzles using as many obscure optics features as possible! To be clear, the goal is to be obscure, strange and excessive towards the goal of using as many optics as possible in a given solution, even if it's awkward, silly, or just plain overkill. These are

                        Advent of Optics: Day 2
                      • Optics are monoids

                        This post documents my favorite lens trick of all time. Also, this trick works for any optics package based on van Laarhoven lenses, like lens-family-core or microlens. This post assumes some familiarity with lenses, so if you are new to lenses then you might want to first read: Control.Lens.Tutorial The title is slightly misleading and the precise statement is that Folds are Monoids, and all of t

                        • Composable filters using Witherable optics

                          One of my favourite things about Haskell is that its structures and abstractions are very principled, and they have laws dictating correct behaviour. In my experience, this means that when you find a new way to piece together those abstractions it almost always ends up doing something reasonable... or at the very least interesting! As it turns out, optics have a lot of different "slots" where we c

                            Composable filters using Witherable optics
                          • MK Direct:MS-OPTICS、宮崎貞安氏のライカ用オリジナルレンズの個人様用直販サイト。(宮崎光学、宮崎レンズ)

                            当店はMS-OPTICS(宮崎光学)ライカ用オリジナルレンズの日本国内個人様向けの販売店です。当サイトの販売価格につきましては国内販売価格となっております。ご了承ください。 ​ If you are overseas customers who wish to purchase products, please click the button【OVERSEASCUSTOMERS】 in the settings in the upper right. ​

                              MK Direct:MS-OPTICS、宮崎貞安氏のライカ用オリジナルレンズの個人様用直販サイト。(宮崎光学、宮崎レンズ)
                            • Optics + Regex: Greater than the sum of their parts

                              The library presented in this post is one of many steps towards getting everyone interested in the amazing world of Optics! If you're at all interested in learning their ins & outs; check out the comprehensive book I'm writing on the topic: Optics By Example Regardless of the programming language, regular expressions have always been a core tool in the programmer's toolbox. Though some have a dist

                                Optics + Regex: Greater than the sum of their parts
                              • Facebook Says It Has Developed the 'Thinnest VR display to date' With Holographic Folded Optics

                                  Facebook Says It Has Developed the 'Thinnest VR display to date' With Holographic Folded Optics
                                • APOQUALIA 28mm f2 Ⅲ Review作例 MS-OPTICS 宮崎光学の広角レンズ ライカMマウント

                                  宮崎光学(MS-OPTICS)の広角レンズ APOQUALIA 28mm f2 Ⅲ ライカMマウントのReview作例。本レンズのレンズ構成は28mmという広角にしては珍しいダブルガウス型で超小型化を実現した。 Apoqualia ⅲ 28mm f2のスペック製造メーカー:MS-OPTICS(宮崎光学)レンズ構成:4群6枚ダブルガウス型マウント:ライカM最小絞り値:f16最短撮影距離:0.6m重量:実測46g重量は46gで大きさは例えるなら生まれたての赤ん坊の手より小さい(わかるか)。ガウス特有の悩みであり特徴でもあるコマ収差が残っていて、美しい滲みや、控えめで淡いフレアが堪能できる。F5.6~8に絞り距離を2mに合わせれると1m~無限大までピントが合いパンフォーカスで快適なスナップ撮影が楽しめる。 Apoqualia ⅲ 28mm f2の写りの特徴優しく柔らかで味がある描写。ガウス特有の

                                    APOQUALIA 28mm f2 Ⅲ Review作例 MS-OPTICS 宮崎光学の広角レンズ ライカMマウント
                                  • Neural nano-optics for high-quality thin lens imaging - Nature Communications

                                    Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

                                      Neural nano-optics for high-quality thin lens imaging - Nature Communications
                                    • Optics vs Lenses, Operationally

                                      Optics vs Lenses, Operationally (Update: I’ve given a talk about this blog post, which can be found here.) I’ve been thinking a lot about lenses and optics. They’re both abstract gadgets that model various sorts of bidirectional processes. They are found in machine learning, game theory, database systems, and so on. While optics are more general, it’s understood that they’re equivalent to lenses i

                                      • Zip を表すOptics、それが Grate

                                        初めに 最近(主に自分の)TL でにわかに流行を見せている Optics a.k.a. Lens ですが、2015 年に Grate という Optics が登場していたのをご存じでしょうか? PureScript の Optics ライブラリ purescript-profunctor-lenses には Grate Optics が採用されています。 しかし、Grate Optics について触れた日本語記事は相当少なそうなので、自身の整理も兼ねて記事にします。 Optics のヒエラルキーなど、Optics 全体についても軽くまとめているので Optics 分からんという方にも読んでいただけると嬉しいです! Grate Optics Grate の初出はココ?だと思います 曰く、Grate は Closed な p に対する Optics p です。(??) Optics の復習 O

                                          Zip を表すOptics、それが Grate
                                        1

                                        新着記事