並置による関数適用の善し悪しについて盛り上っているので、自分の意見を表明しておく。以下の2本立て。
- 純粋に構文論的な議論 (構文拡張の余地を残す)
- 意味論との関係での議論 (副作用の表示)
先に結論だけ書くと、私はどちらかといえば括弧による関数適用のほうが好みです。
| module C : sig | |
| type t | |
| val empty : t | |
| val one : char -> t | |
| val union : t -> t -> t | |
| val inter : t -> t -> t | |
| val top : t | |
| val mem : char -> t -> bool | |
| val make : (char -> bool) -> t | |
| val equal : t -> t -> bool |
| {-# LANGUAGE StrictData, DerivingVia, OverloadedRecordDot #-} | |
| {- | |
| (compiled with GHC 9.4.2) | |
| -} | |
| {- | |
| HEADS UP | |
| this is an example implementation of a non-trivial type system using bidirectional type checking. | |
| it is... |
2018 年 6 月の JSConf EU で Deno が初めて発表されてから 1 年が経ちました.
日本では 2018 年 12 月ごろから Deno の周辺で作業をする人が増え, 2019 年 1 月頃から定期的に Deno もくもく会 #deno_ja が開催されるようになりました.
#deno_ja では毎回, 冒頭で簡単な自己紹介をするのですが, よくよく聞いていると早く Deno を始めた人でも 12 月ぐらいの人が多いことに気づきました. 自分だけが Deno 公開直後の 5 月からコントリビュートしています. そして, なぜその時期から Deno にコントリビュートしているのか, #deno_ja の中でも自分からあまり説明できていないことに気がつきました.
この記事は, なぜ自分がそこまで Deno にコントリビュートするのかの理由を出来る限り言語化してみる試みです.
Coroutines or async/await is not a new concept as it was named in 1958 by Melvin Conway. Coroutines had support in languages such as Simula(1962), Smalltalk(1972) and Modula-2(1978) but I think one can argue that coroutines came into mainstream with C# 5(2012) when Microsoft added async/await to C#.
A thread can only execute a single subroutine at a time as a subroutine starts and then runs to completion. In a server environment subroutines can be problematic as in order to service connections concurrently we would usually would start a thread per connection, this was the idiom a few years ago. A thread depending on the operating system and settings needs about 1 MiB of user stack space meaning 1,024 threads needs 1 GiB of for just user stack space. In addition there's the cost of kernel stack space, book-keeping and scheduling of threads. This drives cost of VM/hardwa
Visual Studio Community Edition 2017 has F# project template, but it hasn't forms desigler for it, designer exists only in C# WinForms project template. To get round this inconvenience, we can create two projects: C# WinForms (only to use VS forms designer) and F#, where we put all logic. See below for more detailed instructions and animated gif.
Output type property to Class library, for F# - to Windows Application.| function patdj(target, update, preserve = true) { | |
| if (update.nodeType != 1 && update.nodeType == target.nodeType) | |
| target.nodeValue = update.nodeValue | |
| else if (update.nodeType != target.nodeType || update.tagName !== target.tagName || update.type !== target.type){ | |
| const { nextSibling, parentNode } = target; | |
| const replacement = preserve ? update.cloneNode(true) : update; | |
| parentNode.removeChild(target); |
| || ∨ 記号 (代替表記) | |
| && ∧ 記号 (代替表記) | |
| ! ¬ 記号 (代替表記) | |
| |ー ├ 記号 (略記) | |
| |= ⊨ 記号 (略記) | |
| <: ⊂ 記号 (一般的でない代替表記) | |
| <:= ⊆ 記号 (一般的でない代替表記) | |
| :> ⊃ 記号 (一般的でない代替表記) | |
| :>= ⊇ 記号 (一般的でない代替表記) | |
| :: ∈ 記号 (一般的でない代替表記) |
| module Elmz.Layout where | |
| import List | |
| import Array (Array) | |
| import Either(..) | |
| import Graphics.Element as E | |
| import Graphics.Element (Direction, Element, Position) | |
| type Pt = { x : Int, y: Int } |
| 原文: | Async in C# and F#: Asynchronous gotchas in C# |
|---|---|
| 原文著者: | Tomas Petricek (@tomaspetricek) |
| 翻訳者: | @pocketberserker |
2月に、私は毎年恒例のMVPサミット ── Microsoft が MVP のために主催するイベント ── に出席しました。私はボストンとニューヨークを訪問する機会を利用して、二つの F# に関する講演と Channel9 lecture about type providers の収録を行いました。他のすべての活動(しばしばパブで他の F#er を議論に巻き込んだり、朝まで長い睡眠)にもかかわらず、私はいくつかの講演に参加し果せました。