I've heard that Scala has path-dependent types. It's something to do with inner-classes but what does this actually mean and why do I care?
How to implement dependent type theory I 08 November 2012 Andrej Bauer Type theory, Programming, Software, Tutorial I am spending a semester at the Institute for Advanced Study where we have a special year on Univalent foundations. We are doing all sorts of things, among others experimenting with type theories. We have got some real experts here who know type theory and Coq inside out, and much mo
The script adds basic Media Query-Support (min-width and max-width in px units ) to all browsers (http://www.w3.org/TR/css3-mediaqueries/). It helps you to create a dynamic resolution dependent layout with webstandards in mind. Downloads
CSS 3 Media Queries for all Browser (jQuery Plugin) The script adds basic Media-Query-Support (min-width and max-width in px units ) to the browsers. It helps you to create a dynamic resolution dependent layout with webstandards in mind. How to use: Add your stylesheets You should add a default stylesheet without a Media Query, wich always will be interpreted by the browser. Then you can add one o
2005年12月03日15:52 カテゴリEcosystem 独立2.0 - In(ter)?dependent あえて以下の意見に反論を試みる。 いや、反論というより「拡張」だろうか。 貞子ちゃんの連れ連れ日記 大人になるということは自分のことは自分で決めて その結果については自分で責任を取る気概を持つこと。 池内ひろ美の考察の日々: 子育ての「進化論」子育てとは、子どもに将来一人で生きていく力をつけさせることだ。我々が「一人で生きて行く」場合に使う「独立」というのは、植物の「独立栄養生物」というのとは違う。後者は Independent であるが、前者は Interdependent だ。訳すならやはり「共立」だろうか。 思えばどんな組織体--システムも、他の体との関係において以下のような進化の過程を経るようである。 孤生 寄生 共生 生物を例にとると、0.の孤生段階では、生物は他の生
Table 1: Perplexity of 355 million parameter models trained for 10 billion tokens on the Pile. Yet, some subquadratic gated-convolutions match attention on the non AR slice! Can we capture the strengths of both gated convolutions and attention in one purely sub-quadratic architecture? We find the AR gap is because gated convolution models (e.g. Hyena, H3, RWKV, RetNet) need model dimension that sc
Haskell is not a dependently-typed language -- at least it was not designed that way. Nevertheless, even Haskell98 admits some form of dependent types, enough to statically prevent the annoying ``head of empty list'' error. After multi-parameter type classes with functional dependencies were introduced, it was quickly (Hallgren, 2001) realized that we can compute with types. HList (2004) has lifte
In this series, we will see how to write dependently-typed programs and prove their correctness within haskell. At first, let's start with the standard example of Vector to understand how to write the dependently-typed programs in Haskell. The topic of this series is already implemented in type-natural and sized-vector. Feel free to use and read these packages. Vectors - Avoiding Boundary Error us
The concept of dependent types General Wikipedia Dependent Types in Programming abstract in APPSEM'2000 Do we need dependent types? by Daniel Fridlender and Mia Indrika, 2001. Type theory Simon Thompson: Type Theory and Functional Programming. Section 6.3 deals with dependent types, but because of the strong emphasis on Curry-Howard isomorphism and the connections between logic and programming, th
Adam Gundry This thesis studies questions of type inference, unification and elaboration for languages that combine dependent type theory and functional programming. Languages such as modern Haskell have very expressive type systems, allowing the programmer a great deal of freedom. These require advanced type inference and unification algorithms to reconstruct details that were left implicit, and
I don’t know about you, but quite frankly I’m tired of seeing the same tired vector example being used to demonstrate why dependent types are useful. Recently, I had the opportunity to use current Haskell’s dependently-typed facilities to solve a somewhat contrived, yet real-world problem. Below I will go through the steps I took in moving from an untyped free-for-all to having GHC reject more bad
This is a demonstration of a dynamic resolution dependent layout in action. Change your browser window size to see the layout respond to your changes. To preserve the separation of the presentation and behavior layers, this implementation delegates all the presentation details to external CSS stylesheets instead of changing each style property through JavaScript. Download Files · Return to Tutoria
Sustainable Security Requirements with the ASVS Josh Grossman provides a brief overview of what the ASVS is, but takes a closer look at balancing trade-offs and prioritizing different security requirements. Josh shares how to make the process repeatable and how to implement it as part of your own organization's requirements process.
In this work, we propose and address a new computer vision task, which we call fashion item detection, where the aim is to detect various fashion items a person in the image is wearing or carrying. The types of fashion items we consider in this work include hat, glasses, bag, pants, shoes and so on. The detection of fashion items can be an important first step of various e-commerce applications fo
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="ja" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-eq
February, 04 2013 00:00 — March, 14 2013 01:22 tags: fpagdadependent typeslogic Introduction to introduction Agda doesn’t lack tutorials and introductions, there is a whole page of them on the Agda wiki [1] (for a general documentation list see [2]). Personally, I recommend: Anton Setzer’s introduction (works especially very well for those with a logical background, but is easy enough to follow fo
Dependent types are a hot topic in the Haskell community. Many voices advocate for adding dependent types to Haskell, and a lot of effort is being invested towards that end. At the same time, the sceptics raise various concerns, one being that dependent types are more of a research project than a tool applicable in industrial software development. That is, however, a false dichotomy. While depende
Unifying Programming and Math – The Dependent Type Revolution The way that programmers and mathematicians work seems to be very different. Programming is about making computers do something, whereas math is about describing things. Programming involves state that changes over time, whereas math deals with Platonic theorems that are always true, even if not proven yet. But, in fact, the Curry-Howar
Convolutional Neural Networks spread through computer vision like a wildfire, impacting almost all visual tasks imaginable. Despite this, few researchers dare to train their models from scratch. Most work builds on one of a handful of ImageNet pre-trained models, and fine-tunes or adapts these for specific tasks. This is in large part due to the difficulty of properly initializing these networks f
Haskell Srbija Grupa posvećena ucenju i popularizaciji Haskell programskog jezika "Pure mathematics is, in its way, the poetry of logical ideas." Albert Einstein "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." Linus Torvalds This topic is considered as advanced and some prior knowledge of Haskell is assume
ワクチンと言うのは 体の外から異物が入ってきた時に、異物だと識別・判定する。 それを異物だと認識して攻撃する。 攻撃には2種類あって、弱いけれど最低限の防御として全部を攻撃するタイプと、この異物のみに対応して攻撃をするタイプがある。 変異株が怖いイメージがあるけど、インフルエンザは毎年変異株なので真新しい現象でない。 毎年新しいタイプのワクチンが開発され、体内に入ったものが一生保つことが出来ないから、毎年任意でインフルエンザ予防接種を受けれる事になっている。 新型コロナウイルスの変異株の変化速度は一般に2週間程度と言われている。 遺伝子学の権威でマローン博士は、mRNAワクチン(およびDNAワクチン)の発明者です ADE has not been confirmed in my opinion. The better term is vaccine enhanced replication
Functional Programming in Scala の Wiki を翻訳している中で path-dependent types という単語が出てきてよくわからなかったので調べました。 調べたら hishidama さんのページが出てきてくれたので良かった(?)です。 詳細はそちらを参照していただければという感じなんですが、以下一応自分なりに噛み砕いてまとめてみました。 経路依存型(path-dependent types) 普通に Java で内部クラスを定義したとすると、以下のような感じになると思います。Scala でも同様に書けると思います。 さてここから先、内部クラスのインスタンスを生成したときの挙動が Java と Scala で変わるそうです。 まずは Java の例を見てみましょう。 Java では class A の異なるインスタンス a1, a2 を用いて、それ
Webサイトの住所の登録フォームとかで、parent-childで依存しているプルダウンとかありますよね。それをjqueryでさくっと実装できるプラグインがjquery.dependent.jsなんです。 参考:http://www.skuare.net/2009/12/selectjavascriptdependent_sele.html jsやjqueryがさっぱりな自分にも使いこなせるくらい簡単なんですが、 サポートが終わってしまったのかjquery-1.3.2以降辺りから動かない。 他の方法もあるんだけれども、templateの事情もあり、出来ればこいつで実装したいなってことで、分からないながらもソースを見ることにした。 問題がありそうだったのは、child要素を作る際の部分だったのでそのあたりをちょこちょこ変えながら動かすとtextがとれていない。 というわけで以下を変更。 -
trait DepValue{ type V val value: V } def magic(that: DepValue): that.V = that.value The return type of "magic" depends on the argument passed in. Toy Example def mk[T](x: T) = new DepValue{ type V = T val value = x } val depInt = mk(1) val depString = mk("two") val itWorks: Int = magic(depInt) val again: String = magic(depString) Other Forms trait Foo{ class Bar def doNothing(b: Bar){} } val f1 =
Practical Dependent Types: Type-Safe Neural Networks Justin Le https://blog.jle.im (justin@jle.im) Lambdaconf 2017, May 27, 2017 Preface Slide available at https://talks.jle.im/lambdaconf-2017/dependent-types/dependent-types.html. All code available at https://github.com/mstksg/talks/tree/master/lambdaconf-2017/dependent-types. Libraries required: (available on Hackage) hmatrix, singletons, MonadR
•2023/1/27、2/24、3/24、「エレメントを読み直す」(全3回)を朝日カルチャーセンター新宿校にて開催します。 (中略) •2019/6/7、「2019年下半期を占う」(全1回)を朝日カルチャーセンター新宿校にて開催します。 •2019/4/26、5/24、6/28、「トランスサタニアン占星術入門」(全3回)を朝日カルチャーセンター新宿校にて開催します。 •2018/6/1、「2018年下半期を占う」(全1回)を朝日カルチャーセンター新宿校にて開催します。 •2018/4/27、5/25、6/22、「基礎から始める西洋占星術再入門」(全3回)を朝日カルチャーセンター新宿校にて開催します。 •2018/3/24(土)14~17時、東京ウィメンズズプラザにて「星占いの秘密 ~運勢を読み解くための視座について」という講演をさせて頂きます。 •2017/11/22(火)19時~、「星の
RailsのActive Recordで多対多の関連を使う時の話。ここではClubとStudentの関係を例とする。 普通に書くと、こうなると思う。 class Club < ApplicationRecord has_many :club_students, dependent: :destroy has_many :students, through: :club_students end class Student < ApplicationRecord has_many :club_students, dependent: :destroy has_many :clubs, through: :club_students end ただ、このようにも書ける。 class Club < ApplicationRecord has_many :club_students has_many
J. P. Burkett1,2,3,*, E. Andari1,2,3, Z. V. Johnson1,2,3, D. C. Curry2,3, F. B. M. de Waal2,3,4, L. J. Young1,2,3,5,*1Silvio O. Conte Center for Oxytocin and Social Cognition, Emory University, Atlanta, GA, USA.2Center for Translational Social Neuroscience, Emory University, Atlanta, GA, USA.3Yerkes National Primate Research Center, Emory University, Atlanta, GA, USA.4Utrecht University, Utrecht,
Unity includes a feature named "Platform Dependent Compilation". This consists of some preprocessor directives that let you divide your scripts to compile and execute a section of code exclusively for one of the supported platforms. Furthermore, you can run this code within the Editor, so you can compile the code specifically for your mobile/console and test it in the Editor!
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く