juan_gandhi: (Default)

List a = Codensity Endo a = forall r. (a -> r -> r) -> r -> r

nil :: List a
nil = \f z -> z

cons :: a -> List a -> List a
cons x xs = \f z -> f x (xs f z)

append :: List a -> List a -> List a
append xs ys = \f z -> xs f (ys f z)

foldr :: (a -> r -> r) -> r -> List a -> r
foldr f z xs = xs f z

Basically, it's like lambda.

Src: https://golem.ph.utexas.edu/category/2012/09/where_do_monads_come_from.html#c042100
juan_gandhi: (VP)


(10x [livejournal.com profile] _hacid_)

The list of references starts with Penrose.

author's page
juan_gandhi: (VP)
People started assuring me that Haskell streams may be empty. Meaning, not a comonad at all.
So, wtf, are they even monads? They also say a list can be infinite; well, any proof that it's still a monad? Not what you get if you build a free monoid (that's what a list is).

Or? Do they mean we actually need σ-algebras?!
juan_gandhi: (VP)
http://r6.ca/blog/20110808T035622Z.html

"I would like to introduce you to a very general algorithm that I like to call the Gauss-Jordan-Floyd-Warshall-McNaughton-Yamada algorithm. With this simple algorithm (an algorithm whose implementation is not very much longer than its name) you can solve almost half of the problems you might encounter in computer science. For instance, this algorithm will let you:

- compute transitive closures
- compute shortest paths
- compute largest capacity paths
- compute most reliable paths
- compute the regular expression for a finite automaton
- solve linear equations
"
juan_gandhi: (VP)
Find the type error in the following Haskell expression:

if null xs then tail xs else xs
juan_gandhi: (VP)
http://community.haskell.org/~simonmar/papers/haxl-icfp14.pdf

Или у меня синдром Даннинга-Крюгера, или я не нашел ничего, чего бы не было у Патерсона и МакБрайда, а также поразительно похожие куски на слайды моего рассказа на Codecamp в 2012-го году. Хотя, конечно, у дураков и великих умов мысли сходятся; да и у меня там не было ничего такого, что бы не написали уже Патерсон с МакБрайдом.

Или я чего-то не понял.

Но у меня в парсерах нынче подобного кода пруд пруди.

  for {(name, sDob, membernumber, claimnumber) <-
        Result.zip(props @ Name, props @ Dob, props @ MemberId, props @ ClaimNr)
       dob <- parseDob(sDob)
       stuff <- buildStuff(name, dob, membernumber, claimnumber)
      } yield stuff
juan_gandhi: (VP)
do you think it's too much?

https://www.linkedin.com/groupItem?view=&gid=2586642&type=member&item=5916133970751299586&commentID=5916311629305233408&report%2Esuccess=8ULbKyXO6NDvmoK7o030UNOYGZKrvdhBhypZ_w8EpQrrQI-BBjkmxwkEOwBjLE28YyDIxcyEO7_TA_giuRN#commentID_5916311629305233408

FP Complete is excited to share the official launch of the Integrated Analysis Platform (IAP). http://ow.ly/BpTVM. We look forward to feedback on the first product we've developed on FP Haskell

Natalia Muska
Marketing Manager at FP Complete
Center. IAP was designed for quantitative modelers seeking a more timely and efficient process for testing and implementing their algorithms. Visit our FAQ page for more details. http://ow.ly/BpVmE.

FP Complete Officially Launches Integrated Analysis Platform 1.0 - FP Complete ow.ly
FP Complete officially launches integrated analysis platform (IAP).
Comments
1 comment
Vlad Patryshev

Somehow I don't believe Haskell developers are ever actually excited. They are focused, yes. They are right most of the time. But being excited is a totally different culture. OOP people are frequently excited, because of Dunning-Krueger syndrome.
juan_gandhi: (VP)
Как хаскельцы объясняют существование "функции" head?
juan_gandhi: (VP)
Hey crypto-haskellers! I mean those who know Haskell well and can write anything in it, but have to use C++ or Java, because the world around is pretty dumb and not ready for the truth.

How do you feel, did Haskell help you write more reasonable code?

Actually, there are two questions here:
a) you write in C++
b) you write in Java

I'd love to see examples.
juan_gandhi: (VP)
http://pchiusano.github.io/2014-06-12/extensible-dsls.html

P.Chiusano, "A very simple technique for making DSLs extensible"
juan_gandhi: (VP)
After meeting recently a bunch of underground Haskell programmers currently working at Google, I think I understood something. I think I understand now why Google has been fighting so hard against Haskell use. There are several reasons why it breaks the integrity of their religious cult.

1. If Engineers used Haskell, they would definitely look smarter than their managers; this is absolutely unacceptable (quoting a Google manager)
2. If Engineers used Haskell, they would not be interchangeable, like they are now, just lightbulbs. This is absolutely unacceptable.
3. Most Stanford alumni are clueless about Haskell (they know Python, C++, and some Java); and what a Stanford alumnus does not know is not supposed to ever exist (e.g. category theory).
juan_gandhi: (VP)
тут репост, но неважно

Что интересно - выдумают (а точнее, откроют для себя, после ознакомления с HoTT или элементами теории категорий) какую-нибудь хрень в Хаскеле, тут же где-нибудь в Скале или в С# подхватят; потом Бьярне, который не знает, почему функциональное программирование провалилось и не оправдало надежд, прочитает, ну или ему прочитают, и вот в С++ уже появляется новая революционная фича - хотя, казалось бы, С++ был уже само совершенство до того, и вся эта функциональщина ваша не приносит никакой пользы и только ухудшает эффективность.

До тех пор, пока Бьярне не скажет, что вот эта именно фича, это своевременно и давно пора. Конечно, настанет момент, когда они и от первичности материи откажутся, но он ещё за горами.

И все счастливы; и всем даже кажется почему-то, что С++, будучи совершенством, стал ещё бoльшим совершенством, и развиваться дальше некуда, но нет предела совершенствованию.

Тут можно было бы привлечь индукцию Нётер и её связь с аксиомой фундирования (я на днях обнаружил, что эту связь я когда-то давно переоткрыл, типа лет через 50 лет Эмми - и думал, о, как здорово!).

Profile

juan_gandhi: (Default)
juan_gandhi

April 2017

S M T W T F S
       1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 1920 21 22
23 24 25 26 27 2829
30      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 29th, 2017 11:19 am
Powered by Dreamwidth Studios