Jan. 11th, 2012

juan_gandhi: (Default)
src

Рис. 4. Вертикальные линии на самом деле параллельны.


Рис. 1. При внимательном взгляде вместо лица девушки можно увидеть старуху.
juan_gandhi: (Default)
Wells Fargo Bank
Открыл там аккаунт, стоками побаловаться; купил в середине декабря MON, на той неделе продал, сижу радуюсь; сегодня хотел с утра прикупить кое-что на мизере, иду туда - а там у меня 28% налогов отобрано с моих денег. Нехило.
А вы там капиталистов ругаете. Это они какую-то мою бумажку то ли не получили, то ли не обработали, и в результате вот такая интересная практика.

WAZE android app
Это навигатор, такого сорта как я (а также, по-моему, Илья Экштейн) пытался (пытались) впарить деятелям в Теленаве - собирай данные по трафику да выдавай навигацию в соответствии с реалиями, пересчитывая на ходу.
Уже третий день езжу по его советам, фигею - где трафик?! Сегодня он меня погнал на 85-ю не налево, как я всегда ездил, а направо, в противоположную сторону. Оттуда на 101-ю, ну и всё. Только в одном месте пришлось притормозить, а так едешь посвистываешь. Она тебе говорит где свернуть, и не как эта дура Клара в моём Приусе, в последний момент, а вовремя предупреждает.
juan_gandhi: (Default)
link
"Hi Mike,

I hope you had a great holiday and are enjoying the New Year.

We seem to be at an impasse with SF Scala, I've asked repeatedly to be kept in the loop and be part of the decision making. Since you seem either unwilling or unable to do so I will be taking back control of the SF Scala meetup. I wish we could have worked together and I thank you for kicking off SF Scala.

Best of luck with Bay Area Scala Enthusiasts.

Ty

--
Ty Amell
Co-Founder / CEO
415.547.0094
www.stackmob.com
@tyamell"
juan_gandhi: (Default)
Вот тут леденящие подробности про Фобос.
juan_gandhi: (Default)
(а также найдены заповеди Моисея на языке оригинала)
подробности
juan_gandhi: (Default)
Got it eventually. Thanks to [livejournal.com profile] huzhepidarasa and "Applicative programming with effects" by McBride and Paterson.

So, let's see.

In Haskell, in Scala, and I don't know... in PHP? every monad is an applicative functor, with the help of lift2. But I could not figure out where does it come from?

Say we have a category C that has products a × b and power objects, ba; an endofunctor T is called applicative if it is supplied with two natural transformations,
pure: a → T(a) and (*): T(ba) → T(b)T(a) that have obvious properties.

The statement is that every monad is an applicative functor.

Turned out not every monad, but a strong one.

A strong monad is a monad that has a natural transformation ta,b: a × T(b) → T(a×b) with a bunch of good properties that could be found on wikipedia (are they called coherence? something like that - MacLane studied them eons ago).

Anyway, a strong monad is an applicative functor.

We already have pure; have to define (*).

The trick is this.

Given a binary operation f: a×b → c then we will lift this binary operation (since we deal with a function of two parameters, the operation is called lift2) to T(a)×T(b) → T(c)

Namely, we have

tT(a),b: T(a)×T(b) → T(T(a)×b)
T(flipT(a),b): T(T(a)×b) → T(b×T(a))
T(tb,T(a)): T(b×T(a)) → T(T(b×a))
T(T(flipb,a)): T(T(b×a)) → T(T(a×b))
T(T(f)):T(T(a×b)) → T(T(c))
mc: T(T(c)) → T(c)

Composing them, we will have the lift2 we were looking for.

Now take evala,b: a × ba → b, and apply lift2

We will have T(a) × T(ba) → T(b); currying it, we get (*): T(ba) → T(b)T(a)

This may be obvious from the fp point of view, but I am a categorist, not a functional programmer (although you should have seen the rich loops I've been writing lately in Scala), so I needed a sound proof, not just a sound of a proof.

Thank you.

Questions and remarks greatly welcome.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 18th, 2025 10:46 am
Powered by Dreamwidth Studios