terminology

Why is there a distinction between co and contravariant functors in Haskell but not Category Theory?

拥有回忆 提交于 2019-12-21 11:03:13
问题 This answer from a Category Theory perspective includes the following statement: ...the truth is that there's no real distinction between co and contravariant functor, because every functor is just a covariant functor. ... More in details a contravariant functor F from a category C to a category D is nothing more than a (covariant) functor of type F : C op →D, from the opposite category of C to the category D. On the other hand, Haskell's Functor and Contravariant merely require fmap and

Why is there a distinction between co and contravariant functors in Haskell but not Category Theory?

有些话、适合烂在心里 提交于 2019-12-21 11:02:23
问题 This answer from a Category Theory perspective includes the following statement: ...the truth is that there's no real distinction between co and contravariant functor, because every functor is just a covariant functor. ... More in details a contravariant functor F from a category C to a category D is nothing more than a (covariant) functor of type F : C op →D, from the opposite category of C to the category D. On the other hand, Haskell's Functor and Contravariant merely require fmap and

What does “CL” mean in commit message? What does it stand for?

一世执手 提交于 2019-12-21 07:07:09
问题 From Angular.js change log: ... After this CL, ng-trim no longer affects input[type=password], and will never trim the password value. This is from one of the commit messages, so presumably it means the patch. What does it stand for? Change log? 回答1: It means Change List . Create a change list (CL) Creating a change in git is really just creating a branch. http://www.chromium.org/developers/contributing-code And the code review system there are using: https://code.google.com/p/rietveld/ 回答2:

CSS terminology: what are these called?

风格不统一 提交于 2019-12-21 03:59:32
问题 Consider: p { ... } .foo { ... } #bar { ... } What is the correct name for these statements in CSS? I've seen them called selectors, rules or rulesets, but which is correct? 回答1: A rule would be considered: p {…} A selector in this case is: p A rule is made up of selectors and declarations. A declaration is property:value so the entire rule would be: selector { property:value } A rule can have multiple declarations and multiple selectors so we can actually have: selector, selector2 { property

Haskell terminology: meaning of type vs. data type, are they synonyms?

↘锁芯ラ 提交于 2019-12-21 01:08:12
问题 I'm reading the book: Haskell School of Expression and on page 56, at the beginning of chapter 5, I read the terms "polymorphic data types" and "polymorphic types". Are these two terms refer to the same concept? Are they synonyms ? Or is there any difference between the two? If yes, what? 回答1: A type (in Haskell) is a piece of syntax which can meaningfully be put right of :: to classify an expression left of :: . Each syntactic component of a type is itself classified by a kind , where the

What is the correct term for the following functional programming pattern?

余生长醉 提交于 2019-12-20 19:42:09
问题 I've heard it referred to as a stream, as an infinite list, and sometimes even as a lazy sequence. What is the correct term for the following pattern? (Clojure code shown) (def first$ first) (defn second$ [str] (cond (empty? str) () true ((first (rest str))))) (defn stream-builder [next_ n] (cons n (cons (fn [] (stream-builder next_ (next_ n))) ()))) (defn stream [str n] (cond (= 0 n) () true (cons (first$ str) (stream (second$ str) (- n 1))))) (def odd (stream-builder (fn [n] (+ 2 n))1))

Wanted: good definition of the term “lowering” in the context of compilers

隐身守侯 提交于 2019-12-20 17:31:21
问题 Can anyone point me to a good definition of the term "lowering" in the context of compilers? From what I can tell, it is the translation of a higher-level operation into an equivalent combination of lower-level operations, but I'm not really sure, and I can't find one after a few minutes of searching on Google. (There are a few usages of "lowering" e.g. in GCC or LLVM but no references to a definition.) 回答1: Dr. Dobbs just published an article by Walter Bright (of dlang fame), where he

what do the words platform and api exactly mean?

落花浮王杯 提交于 2019-12-20 15:23:07
问题 i've bought a book "learning the java SE 6 platform". i wonder what the word platform really means. cause isn't it just a bunch of classes that i can use. the JDK 1.6 node in Netbeans under Libraries. And what is API? isn´t it the same thing as platform. But doesnt library mean the same thing..a bunch of classes with some superclasses and so on? 回答1: The term "platform" is used to denote any collection of software, services and resources that, within a specific context, are considered a given

“Work stealing” vs. “Work shrugging”?

谁说我不能喝 提交于 2019-12-20 12:02:57
问题 Why is it that I can find lots of information on "work stealing" and nothing on "work shrugging" as a dynamic load-balancing strategy? By "work-shrugging" I mean pushing surplus work away from busy processors onto less loaded neighbours, rather than have idle processors pulling work from busy neighbours ("work-stealing"). I think the general scalability should be the same for both strategies. However I believe that it is much more efficient, in terms of latency & power consumption, to wake an

“Work stealing” vs. “Work shrugging”?

☆樱花仙子☆ 提交于 2019-12-20 12:00:31
问题 Why is it that I can find lots of information on "work stealing" and nothing on "work shrugging" as a dynamic load-balancing strategy? By "work-shrugging" I mean pushing surplus work away from busy processors onto less loaded neighbours, rather than have idle processors pulling work from busy neighbours ("work-stealing"). I think the general scalability should be the same for both strategies. However I believe that it is much more efficient, in terms of latency & power consumption, to wake an