chaource: (Default)
Въ пору моего дѣтства было общимъ мѣстомъ, что программированiе - "вторая грамотность", что имъ будутъ овладѣвать огромные массы народа и, какъ было написано въ одномъ школьномъ учебникѣ:

...управленiе сложнѣйшими автоматизированными процессами, быстрая переработка необозримыхъ объемовъ научно-технической, политической, экономической и другой разнообразной информацiи станутъ удѣломъ не сотенъ и не тысячъ, а миллiардовъ людей...

Дѣйствительно, съ нѣкоторой натяжкой можно сказать, это такъ теперь и есть. Миллiарды людей пользуются фейсбукомъ или гуглопоискомъ, а при каждомъ запросѣ вродѣ какъ дѣйствительно происходитъ "управленiе сложнѣйшими автоматизированными процессами" и "быстрая переработка необозримыхъ объемовъ" текста. Но авторы учебника имѣли въ виду другое - что въ будущемъ каждый человѣкъ долженъ будетъ самъ программировать, чтобы обрабатывать информацiю, а не просто переключаться между сотнями каналовъ, по которымъ эта информацiя поступаетъ. Думали, что люди будутъ сами управлять производственными или иными процессами, управлять детально, или сами проектировать такiе процессы, а не просто нажимать кнопку "Пускъ", совершенно не представляя себѣ, что они этимъ запускаютъ.

Предполагалось, что обработка, скажемъ, экономической информацiи будетъ происходить на уровнѣ формулъ экселя или запросовъ SQL, а не просто "найди что-нибудь съ этими словами", какъ въ гуглопоискѣ.

Read more... )
chaource: (Default)
Groovy used to be a niche scripting language, not of concern to anyone, until it got into Hudson, which was then forked as Jenkins. Everybody today uses Jenkins and so everybody is forced to use Groovy. What a mad world.

What does this code do?

 parallel(
    "job1" : {
        url = "http://host1/file1"
        sh "curl -o file1 ${url}"
    },
    "job2" : {
        url = "http://host2/file2"
        sh "curl -o file2 ${url}"
    }
)


At first glance, you'd think it downloads two URLs in parallel and saves them to files "file1" and "file2".

But actually the variable "url" is global. It is not local to the blocks it is defined in.

And actually it is a race condition to decide which block will begin executing first.
Assigning a variable is quick, so on most Jenkins runs the two statements:

url = "http://host1/file1"
url = "http://host2/file2"

will be executed very quickly one after another in random order. And only then the downloading will begin.

So, the value "url" could be "http://host1/file1" or "http://host2/file2", chosen randomly in both blocks. On some Jenkins runs, this code will download the contents of "file1" twice and store it as both "file1" and "file2". On other Jenkins runs, it will download "file2" twice.

But actually I saw this job sometimes download the files correctly; on those runs, Jenkins was so loaded that the parallel run was actually executed sequentially. This is why I didn't see the problem immediately.
chaource: (Default)
Aufgabe 1.1 http://www-user.tu-chemnitz.de/~rhaf/Aufgabensammlung/Einzelaufgaben/01_001-0.pdf

Für 5 jeweils zu 80 % einer Vollzeitkraft beschäftigte Personen entsteht ein monatlicher Lohnaufwand von 9200 €. Es stehen zusätzlich monatlich Lohnmittel in Höhe von 6210 € zur Verfügung. Dafür sollen zu gleichem Stundenlohn 6 Arbeitskräfte eingestellt werden. Zu welchem Anteil können sie beschäftigt werden?

gemini.google.com:

---

Berechnung des Beschäftigungsanteils

Gegeben:

5 Vollzeitkräfte (je 80% Beschäftigung)
Monatlicher Lohnaufwand: 9.200 €
Zusätzliche Lohnmittel: 6.210 €
6 neue Arbeitskräfte (gleiche Stundenlöhne)

Ziel:

Ermittlung des Beschäftigungsanteils der neuen Arbeitskräfte

Lösung:

Berechnung des Stundenlohns:

Gesamtarbeitszeit pro Vollzeitkraft: 160 Stunden (20 Tage x 8 Stunden)
Tatsächliche Arbeitszeit pro Vollzeitkraft: 128 Stunden (80% x 160 Stunden)
Gesamtarbeitszeit der 5 Vollzeitkräfte: 640 Stunden (5 x 128 Stunden)
Monatlicher Lohn pro Vollzeitkraft: 1.840 € (9.200 € / 5)
Stundenlohn: 14,41 € (1.840 € / 128 Stunden)

Berechnung des maximalen Beschäftigungsanteils:

Maximaler monatlicher Lohn für neue Arbeitskräfte: 6.210 €
Mögliche Arbeitszeit pro neuer Arbeitskraft: x Stunden
Maximale Beschäftigungsdauer pro neuer Arbeitskraft: x / 14,41 Stunden
Maximale Beschäftigungsquote pro neuer Arbeitskraft: (x / 14,41 Stunden) / 160 Stunden

Berechnung des maximalen Beschäftigungsanteils:

6.210 € / 14,41 € = 430,51 Stunden
430,51 Stunden / 160 Stunden = 2,69 Tage
2,69 Tage / 20 Tage = 0,1345 = 13,45%
Ergebnis:

Die neuen Arbeitskräfte können maximal zu 13,45% beschäftigt werden.

---

Was waren die Fehler?

1) Stundenlohn: 14,41 € (1.840 € / 128 Stunden)

Richtig wäre 14,375 € / Stunde.

Ich habe dann nachgefragt, 1840/128 genauer auszurechnen, aber die Antwort war immer falsch: 14.40625 (das wäre 1844/128).

2) Maximale Beschäftigungsdauer pro neuer Arbeitskraft: x / 14,41 Stunden
Maximale Beschäftigungsquote pro neuer Arbeitskraft: (x / 14,41 Stunden) / 160 Stunden


Arbeitszeit dividiert durch Stundenlohn ergibt keine Beschäftigungsdauer. Und dann dividieren wir zweimal durch Stunden??

Diese Überlegungen mit "x" werden aber in der weiteren Lösung gar nicht benutzt.

3) Es gibt 6 neue Arbeitskräfte; diese Tatsache wird in der Lösung aber ignoriert. Die Beschäftigungsquote pro neuer Arbeitskraft wäre also durch 6 zu dividieren, nicht durch 160.

4) 6.210 € / 14,41 € = 430,51 Stunden

Richtig wäre 6.210 / 14,41 = 430.95.

Der Faktor 14,41 ist auch falsch (muss 14,375 sein), dann bekommen wir 6.210 / 14,375 = 432.

Also die neue Arbeitskräfte werden (alle zusammen) 432 Stunden arbeiten können.

5) 430,51 Stunden / 160 Stunden = 2,69 Tage
2,69 Tage / 20 Tage = 0,1345 = 13,45%

Wir dividieren X Stunden durch Y Stunden und bekommen... Tage?? Richtig wäre nicht 430 / 160 / 20, sondern 432 / 160 / 6, also durch die 6 Arbeitskräfte zu dividieren.
Dann bekommt man 45% (die richtige Antwort).
chaource: (Default)
I seem to recall that Scala 2 only became really fully usable with version 2.10. In Scala 2.10, they added macros and some other essential improvements.

The changelog for Scala 2.10 is impressive indeed:

https://www.scala-lang.org/download/changelog.html

They added futures / promises, string interpolation, added implicit classes (that is, extension methods), and they still needed to fix the pattern matching!

It's fair to say that Scala 2 took a while to get in shape. For example, try/catch/finally was only available in Scala 2.8.

It seems that we are getting a similar deal with Scala 3. New syntax and new language features in each minor release, bugs that prevent your code from working, and a general sense of instability.

I tried to cross-compile some fairly straightforward code with Scala 3.3 and 3.4 but the compiler crashed with a weird bytecode error.
Something along the lines of "cannot emit the Array class".
The Array class was used in the compiler itself, my code didn't use that.

I'm all in favor of Scala 3 improvements but right now it's unusable. I'll wait until Scala 3.10 and try again.
chaource: (Default)
It used to be harder but now one can create a deep-fake video from a single photograph of a person.
https://www.youtube.com/shorts/UlUnL0SoJ-8

Here's an idea about how to protect oneself from that. When recording a video of yourself, you must always place a smartphone or another computer's screen in the background of the video. On that screen, a certain app is running that shows a constantly shifting kaleidoscopic image. This image is generated by some cryptographic algorithm whose input is a private key. Unless you have that key, you will not be able to repeat the kaleidoscopic video. Recording any amount of that video does not help - you need to know the key.

This technology https://www.researchluxembourg.org/en/kaleidoscopic-microbeads-to-fight-counterfeiting/ may serve as another way of storing the private key as a visual object.

So, from now on, any video recorded without a kaleidoscopic key in the background is not to be trusted.

An attack on this scheme would be to steal the private key of the user. But this is more difficult than obtaining a photo of the user.
chaource: (Default)
Предположимъ, у насъ фирма по разработкѣ квантовыхъ компьютеровъ. Въ просторномъ залѣ сидятъ 100500 слесарей и паяютъ что-то тамъ. Ни одинъ изъ нихъ никогда не изучалъ ни квантовую механику, ни матанализъ, ни даже перемноженiе матрицъ. Это просто такiе знающiе спецiалисты, они всѣ прошли собесѣдованiя на должность "старшiй слесарь" и имѣютъ 10-15 лѣтъ опыта работы. Когда мы сможемъ ожидать, что квантовый компьютеръ заработаетъ?

(Слесари именно паяютъ, это не опечатка. И почти каждый изъ слесарей говоритъ, что научился паять электронику самъ. "Мнѣ купили дѣтскiй паяльникъ, когда я пошелъ въ школу... Я нигдѣ не учился паять спецiально, потомъ постепенно пришло пониманiе, какъ это надо дѣлать..." и т.д.)

Абсурдная картина. Вѣдь нельзя надѣяться изобрѣсти квантовый компьютеръ, не имѣя понятiя о принципахъ его работы. Но именно такъ выглядитъ сегодняшняя индустрiя программированiя. Read more... )
chaource: (Default)
Вынесено изъ комментарiя https://ivanov-petrov.livejournal.com/2442212.html?view=comments&page=2#t211154916

Я недавно понялъ слѣдующее — программа chatGPT освоила естественный языкъ и рядъ предметныхъ областей лучше, чѣмъ люди сегодня могутъ провѣрить или измѣрить.

Поясню на примѣрѣ. Скажемъ, для англiйскаго языка есть оффицiально установленные уровни владенiя языкомъ и соотвѣтствующiе экзамены. То же для нѣмецкаго, французскаго. Сдалъ такой-то экзаменъ, значитъ, овладѣлъ языкомъ на такомъ-то уровнѣ. Но фокусъ въ томъ, что chatGPT уже прошелъ всѣ эти уровни, онъ уже можетъ сдать всѣ эти экзамены.

И то же самое въ другихъ областяхъ. ChatGPT уже можетъ пройти интервью на должность "старшiй программистъ" Гугла, сдать экзамены на MBA (Master of Business Administration) и bar exam (базовый экзаменъ для адвокатовъ). У насъ больше нѣтъ стандартныхъ способовъ измѣрять уровень знанiй или интеллекта chatGPT, онъ уже превзошелъ всѣ эти наши способы.

Read more... )

У насъ нѣтъ и не было критерiевъ того, что такое "интеллектъ", "пониманiе", "умъ". Вотъ мы и извиваемся ужомъ на сковородкѣ, медленно подогрѣваемой нейронными сѣтями.
chaource: (Default)
https://www.youtube.com/watch?v=SjhIlw3Iffs

I met Ilya briefly while I lived in San Francisco. He is undoubtedly a deep thinker. There is however one blind spot in his worldview. He believes that large language models (LLMs) already know everything there is to know about reality. He knows that LLMs are trained on human-generated data with human-generated advice. So, he accepts that there is nothing more to know about the world other than what people already know. More precisely, there is nothing more to know than what people have already written on the Internet.

This sort of magical thinking is pervasive in modern fantasy novels. Those novels operate in a world where all knowledge has been already obtained centuries ago. Everything there is to know is already codified in some old books. There is no new knowledge - and there cannot be any. Free thinking is impossible and meaningless. If you want to know how to do something, or if you want to know what something means or what properties something has, all you need is to find a book old enough or thick enough and you will get your answer.
chaource: (Default)
... how "industrial machine learning" code is written.

X_train = X_validation = X_test = {}

for something in ["title1", "title2"]:
   X_train[something], X_validation[something], X_test[something] = data_split(...)

result1 = model.fit_transform(X_train["title1"])
result2 = model.fit_transform(X_train["title2"])


This code does not throw exceptions but produces incorrect results. The reason is the first line:

X_train = X_validation = X_test = {}

This makes X_train, X_validation, and X_test point to the same (mutable) dictionary that is getting filled by data_split(). The order in which the values are assigned in the dictionary is unspecified. Assigning X_test[something] at the same time overwrites whatever it was there in X_train[something] and in X_validation[something]. I saw that the results were sometimes different in different runs of the code.

The guy who wrote the code is a "senior something something".

Python is the language of the future, and ChatGPT is its prophet.
chaource: (Default)
Types with universal quantifiers correspond to "generic functions", that is, functions with a type parameter (or with several type parameters). For example (Scala):

def f[A]: (A, Option[A]) => Option[(A, A)] = {
case (x, oy) => oy.map(y => (x, y))
}

In a more mathematical type notation, the function f has type ∀A. A × (1 + A) → 1 + A × A.

The programmer's intuition for generic functions is that these functions work in the same way for all types. Indeed, the code of f does not depend on the type A and works in the same way for all A.

The requirement of "working in the same way for all types" can be formulated more rigorously: the code can only use a small number of constructions, but may have no side effects, no fixed values of fixed types, no run-time type information, and no calls to external libraries.

For code of that kind, the parametricity theorems, the Yoneda lemma, and the Curry-Howard correspondence hold and can be used for reasoning about the universally quantified types. In many cases, a universally quantified type may be simplified into a type that has no quantifiers.

Here are some examples of simplifying types:
Read more... )
chaource: (Default)
The State monad is usually defined by:

type State s a = s -> (a, s)

We can write "monadic programs" using this monad directly. However, there is another way: first, define the operations "get" and "set":

get :: State s s
get = \s -> (s, s)

set :: s -> State s ()
set = \s -> \_ -> (s, ())

We can now write "monadic programs" that only use the operations "get" and "set" but not the explicit type of the monad s -> (a, s).

The advantage is that we can abstract away to any monads that have a "state manipulation" functionality. We can define a typeclass "MonadState" representing a monad that has "get" and "set". We can now write "monadic programs" using just a "MonadState" typeclass and its operations "get" and "set". We can view "State s a" as just one possible monad that has a "MonadState" typeclass instance. There are many other monads that also can manipulate state.

So, one view of monads is that they are just a concise implementation for a given set of operations. In this view, it is "better" to write programs only in terms of operations, and stop using specific monad types.

This approach makes monad transformers easier to use: instead of a monad stack that has State somewhere, we just use an abstract monad that has a MonadState instance. A library (such as MTL) will take care of monad transformers for us.

This also opens the way towards "algebraic effect handlers". See for example https://www.fceia.unr.edu.ar/~mauro/pubs/haskell2019.pdf

This view of monads is enticing but raises several questions that seem to be not answered in the available literature.

Read more... )
chaource: (Default)
1. "Covariance" and "contravariance" are properties of a type constructor that follow automatically from the definition of the type constructor. A type constructor is covariant if a `map` function exists and satisfies the functor laws, and contravariant if `contramap` exists and satisfies the contrafunctor laws. If neither `map` nor `contramap` function can be found (e.g., because the type signature cannot be implemented or because the laws cannot be satisfied), the type constructor is neither covariant nor contravariant.

Covariance and contravariance are not labels arbitrarily chosen by the programmer. In Scala, one can declare List[A] without covariance but Option[+A] with covariance. But this makes no sense. List[_] is covariant according to its definition because a `map` function exists with correct properties. It is a problem if the compiler does not recognize the covariance of List[_] automatically.

2. "Subtyping" is a relation between types that requires to have an automatic conversion from one type to another. If A is a subtype of B (we write A <: B), the compiler will automatically insert a conversion function from A to B whenever it is necessary.

If a function `f` is defined to have an argument of type `B`, but the programmer writes `f(x)` where `x` has type `A`, then the compiler will automatically insert a conversion function (say, `a2b` of type A => B) and rewrite `f(x)` into `f(a2b(x))`.

Each compiler defines in its own way what types will be subtypes of others. In Scala, the programmer is able to define an implicit conversion between arbitrary types. So, Scala supports essentially arbitrary subtyping relations. Whether they are useful is up to the programmer.
Read more... )
chaource: (Default)
The usual story of parametricity is given in the paper "Theorems for free" by Wadler. https://ecee.colorado.edu/ecen5533/fall11/reading/free.pdf
In that paper, the exposition of the actual parametricity theorem is very terse and difficult to understand. It is based on the idea of replacing functions by "relations". So, we first need to learn how to work with relations between types and relations between values. Then, we need to prove that any program t of type T is in a a certain relation with itself, where the relation is generated by the type T. The paper does not actually show a detailed proof of that theorem; it just says that we need to perform induction on the typing rules.

After finishing the proof for a relation, we are still not done; we need to specialize a relation to a function in some way. The theorem does not say how to do that; it seems we have to guess that, and we are not guaranteed to get a useful law.

I tried to prove the parametricity law directly. A parametricity law has the form of naturality law for a dinatural transformation. All terms in simply typed lambda calculus are dinatural. Initially I thought that the proof would just work easily by induction on the term structure, just like Wadler's paper said. But when I started to write up the proof, I found that I cannot prove 2 induction cases out of 9. I started digging around and found that the proof cannot actually go the way I thought. Dinatural transformations do not compose, but my proof would have needed their composition when I consider the "cut" rule (application of a function to an argument). So, I'm stuck for a good reason.

This paper seems to be the most promising way out: https://www.researchgate.net/publication/221442794_Dinatural_Terms_in_System_F
Another one by the same author:
https://www.irif.fr/~delatail/param.pdf
chaource: (Default)
I'm trying to find a simple proof of parametricity theorems, without using relations. I hoped that I can use dinatural transformations https://en.wikipedia.org/wiki/Dinatural_transformation directly and prove that any purely functional code of type P[A, A] -> Q[A, A] is a dinatural transformation. However, after starting to write up a proof, I ran into a snag: dinatural transformations do not compose. For example, this paper shows some conditions for them to compose https://drops.dagstuhl.de/opus/volltexte/2018/9700/pdf/LIPIcs-CSL-2018-33.pdf But it seems that I can't restrict programs to those conditions. So I'm stuck.
chaource: (Default)
So far there seem to exist two classes of monads that have no monad transformers:

1.

P a = Either (m a) a

Here `m` must be another monad, for example `m = Reader` or `m = State` or whatever.

This construction produces a monad `P` for any monad `m`. The monad `P` is mostly the same as `m` except its "pure value" is explicitly represented as `Right x`. However, the resulting monad `P` does not seem to have a monad transformer. I tried all kinds of type expressions involving `Either` and `m`, but couldn't make it work, even with the simplest example `m = Reader`.

2.

S a = (a -> Bool) -> Maybe a

This is the so-called "search monad". It takes a predicate `a -> Bool` and possibly produces a value of `a` that satisfies the predicate.

A generalization of the search monad is the so-called "selector" monad,

S a = (a -> p ()) -> p a

where `p` is another monad. The "search" monad is obtained with `p = Maybe`, since `Maybe ()` is equivalent to `Bool`. Even more generally, we can replace the unit type `()` with any constant type `c`. The result will be

S a = (a -> p c) -> p a

This is a monad for any fixed monad `p` and for any fixed type `c`. But this monad does not seem to have a monad transformer. For example `(m a -> p c) -> p (m a)` is not a monad for arbitrary monads `m`. I tried other type expressions involving `m` at different places, but nothing seems to work.

So this for me seems to close the long-standing question of whether all monads have a monad transformer, and if so, how to construct one. The answer seems to be that some monads don't have a monad transformer, and for other monads there are ad hoc ways of constructing transformers.

However, I still don't know how to prove rigorously that no transformer exists for a given monad.
chaource: (Default)
Выхожу изъ тюрьмы, политикой не занимаюсь... Гляжу - Трампъ подписалъ новый законъ о копирайтѣ. Тутъ одинъ такой въ штатскомъ подходитъ и спрашиваетъ - вы не слышали, а что это за законъ Трампъ подписалъ. Я говорю - кому надо, тому и подписалъ... Выхожу изъ тюрьмы, политикой не занимаюсь...

In a programmer's language, a "category" is "cartesian closed category with a final object".

In Part I I showed that some adjunctions are obtained via the "adjunction completion". However, it remains unclear which functors have non-void completions.

To gather intuition, I limited my consideration to polynomial functors F and their transformations L(F) and R(F), defined by

L(F) a ≡ ∀ i. (a -> F i) -> i

R(F) a ≡ ∃ i. i × (F i -> a)

Read more... )
chaource: (Default)
I've gone through a study group based on the series of blog posts on category theory for programmers. These blog posts are fascinating but not equally well adapted to programmer's needs. There are lots of books with expositions of various notions of category theory, but I'd like to see some program code that can be written after understanding this or that notion. Preferably, code should be "interesting" in the sense that one wouldn't be able to write that code without keeping category theory in mind. Indeed, interesting code follow from many constructions of category theory, such as Yoneda lemma or Kleisli categories. If category theory is "abstract nonsense", I'd like to see "concrete nonsense" instead.

One of the chapters of Milewski's blog is about adjunctions. Here's what I got out of it in terms of code.

Because programmers most often work in a category whose objects are types in the chosen programming language, an endofunctor will be a "type constructor" (i.e. a function from types to types). So, most of the time programmers will work with endofunctors (but call them "functors" for short).

This situation is actually quite similar to the relationship between the terminology in theoretical physics and mathematics. https://posic.livejournal.com/1833813.html Programmers say "functors" where mathematicians say "endofunctors", and so on. Programmer's terminology is always a little off, a little vague, a little imprecise, but "it doesn't matter in practice". As I remarked before, "functional programming is physics" https://chaource.dreamwidth.org/143497.html
Read more... )
chaource: (Default)
After https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8a104f8b5867c682d994ffa7a74093c54469c11f

Our Pledge

In the interest of fostering an environment that is open and welcoming to productive contributors, we pledge to making participation in our project and our community a productive coding and learning experience for everyone, regardless of political views, country of origin, skin color, personal psychological problems and emotional needs, and skills in verbal expression in English or other natural language.

Our Standards

Examples of behavior that contributes to creating a productive environment include:

  • Using language focused on the problem at hand, e.g. "in line 123 you used an incorrect function"
  • Recognizing that a given viewpoint may be valid or invalid, and arguing on the merits, regardless of the perceived popularity or authority
  • Voicing to-the-point criticism, even though it may offend some people
  • Focusing on developing code and fixing bugs, not on feeling good about ourselves
  • Showing a willingness to learn more technical matters as necessary


Examples of unacceptable behavior include:

  • Accusing others of being "insensitive" or "harassing", instead of responding constructively to technical criticism (such as "you wrote incorrect code in line 123") or to other criticism (such as "you have bad English grammar in the comment in line 120 - you should write more clearly")
  • Personal or political attacks on people (e.g. calling someone a "white supremacist" or "racist")
  • Public or private harassment, accompanying demands to conform to a chosen political ideology (e.g. harassing someone who refuses to praise or to condemn persons with a given political opinion)
  • Demanding that software developers should behave as political activists or as a "thought police" (e.g. pretending that someone's joke was a serious statement and castigating that person for wrong-thinking)
  • Imposing a discussion of political topics in developer's mailing list or chat channel, and generally steering the discussion away from productive technical subject matter into a politically charged domain
  • Publishing others’ private information, such as a physical or electronic address, without explicit permission


Our Responsibilities

Maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take corrective action in response to consistent unacceptable behavior.

Maintainers have the responsibility to reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Real Code of Conduct, or to ban temporarily or permanently any contributor for behaviors that contradict the Real Code of Conduct.

Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

Enforcement

Instances of unacceptable behavior may be reported by contacting the Moderator's Board <xyz@xyz.org>. All complaints will be reviewed and investigated and will result in a response as appropriate to the circumstances, in the opinion of one or more main moderators. The Board is NOT obligated to maintain confidentiality with regard to the reporter of an incident. All details of any action by the Board must be posted immediately.

Maintainers who consistently do not follow or do not enforce the Real Code of Conduct will be dismissed from the Moderator's Board and may be further sanctioned from the project, as any other developers.
chaource: (Default)
Design a wearable electronic gadget that looks like a veil over your face.

On the inside of the veil, you have an augmented-reality screen with eyes-driven and voice-driven (possibly neural-driven) control. On the outside, the veil shows a generated image of a chosen human face with your own mimics superimposed.

The device could initially look like a ski mask or like oversized sunglasses. Flexible screens could be used too.

The result is that you look sufficiently realistic, your facial expressions are recognizable, your speech and facial communication gestures are unimpeded. And yet, your face - and especially the information about where your eyes are pointing at any given time - is safe from street cameras.

Second phase - a peer-to-peer communication protocol between face veils will enable secure chat with no central server and no possibility of intercepting any messages.

Third phase - "neurolink". Sensors will measure the electromagnetic impulses in the throat muscles and decode them into speech signals. In this way, a person's internal speech could be detected and used for communication. The effect will be that of a direct "telepathic" outgoing text channel - you just say the words in your mind, and the device will read your throat muscles and transmit the message to the recipient. A micro-speaker connected to the skull bone could be used for secure reception of private voice messages.

Phase 3 mostly reproduces the functionality shown in the recent sci-fi movie "ghost in the shell" where the agents can just switch to "mental communication".

Snuff it, big brother.
chaource: (Default)
"Applied functional type theory" is a tentative name for the theory underlying modern functional programming.

All my technical posts on this topic so far:

2011-01-10 My monad tutorial https://chaource.dreamwidth.org/61718.html

2013-05-24 Lambda-calculus without recursion https://chaource.dreamwidth.org/93438.html

2015-04-09 Exercises in Curry-Howard correspondence https://chaource.dreamwidth.org/125399.html

2016-06-28 Functional programming is physics https://chaource.dreamwidth.org/143497.html

2017-03-26 Functional programming and the real world https://chaource.dreamwidth.org/161590.html

2016-08-30 Example of the use of category theory in functional programming https://chaource.dreamwidth.org/148979.html

2016-05-29 Polynomial functors I. Basic motivations. All polynomial type constructors are functors https://chaource.dreamwidth.org/140652.html

2016-06-01 Polynomial functors II. Basic definitions: (co)pointed, (co)distributive, (co)monadic. Monadic functors are distributive https://chaource.dreamwidth.org/140862.html

2016-06-02 Co-pointed functors are co-distributive https://chaource.dreamwidth.org/141143.html

2016-06-03 Polynomial functors III: all polynomial functors are (co)distributive https://chaource.dreamwidth.org/141503.html

2016-06-05 Polynomial functors IV: all polynomial functors are pre-(co)-monadic https://chaource.dreamwidth.org/141702.html

2016-06-10 Polynomial functors V: recursive functors are (co)distributive https://chaource.dreamwidth.org/141968.html

2016-06-16 Polynomial functors VI: An elementary question about polynomials, or How to characterize pairs of functors with natural transformations between them https://chaource.dreamwidth.org/142433.html

2016-06-22 Polynomial functors VII. Pointed and co-pointed recursive polynomial functors https://chaource.dreamwidth.org/143092.html

2016-06-30 Exponential-polynomial functors, contrafunctors, and profunctors https://chaource.dreamwidth.org/143705.html

2016-07-02 Exponential-polynomial profunctors II. Modularity with respect to a monoid https://chaource.dreamwidth.org/144118.html

2016-07-17 Tutorial on the free monad https://chaource.dreamwidth.org/144787.html

2016-07-19 Functors of functors. Deriving the "free monad". All recursive polynomial functors are pre-monadic https://chaource.dreamwidth.org/145119.html

2016-07-21 Polynomial functors VIII. Some recursive polynomial functors are pre-comonadic https://chaource.dreamwidth.org/145578.html

2016-07-22 Polynomial functors IX. Pre-monadic and pre-comonadic recursive functors https://chaource.dreamwidth.org/145721.html

2016-07-31 Representable functors and GADTs https://chaource.dreamwidth.org/146894.html

2016-08-04 Free functors, free applicatives, free monads I https://chaource.dreamwidth.org/147004.html

2016-08-07 Free functors, free applicatives, free monads II https://chaource.dreamwidth.org/147235.html

2016-08-09 Free functors, free applicatives, free monads III https://chaource.dreamwidth.org/147892.html

2016-08-11 Free functors, free applicatives, free monads IV https://chaource.dreamwidth.org/148057.html

2016-08-31 Initial F-algebras and free F-algebras over a type https://chaource.dreamwidth.org/149039.html

2016-10-04 The center-of-mass monad (also called the search monad) https://chaource.dreamwidth.org/150558.html

2017-03-05 All (recursive) polynomial functors are traversable https://chaource.dreamwidth.org/160254.html

2017-03-06 Monad transformers for exp-polynomial monads I https://chaource.dreamwidth.org/160492.html

2017-03-08 Monad transformers for exp-polynomial monads II https://chaource.dreamwidth.org/160598.html

2017-03-10 Exponential-polynomial applicative functors https://chaource.dreamwidth.org/160849.html

2017-03-13 Exponential-polynomial monads https://chaource.dreamwidth.org/161043.html

2017-03-19 Contrafunctors cannot be distributive or traversable https://chaource.dreamwidth.org/161356.html

2017-04-03 Monad transformers and free monads https://chaource.dreamwidth.org/161968.html

2017-04-15 Monads and monad transformers: The errors of my ways https://chaource.dreamwidth.org/162150.html

2018-03-03 The ubiquitous premonads: The simplest way to formulate monad laws https://chaource.dreamwidth.org/170783.html

2018-03-04 Monoids and co-monoids https://chaource.dreamwidth.org/171355.html

2018-04-03 Some polynomial functors are not monadic? https://chaource.dreamwidth.org/172218.html

2018-04-07 Some polynomial functors are not monads https://chaource.dreamwidth.org/173033.html

2018-05-28 Applicative profunctors https://chaource.dreamwidth.org/174611.html

2018-10-09 Adjoint functors in functional programming https://chaource.dreamwidth.org/182694.html

2018-10-11 Adjoint functors in functional programming II https://chaource.dreamwidth.org/183087.html

2018-11-27 The upside-down polynomial transformation https://chaource.dreamwidth.org/184360.html

2019-01-16 Quantified types are undecidably powerful https://chaource.dreamwidth.org/186193.html

2019-02-14 Some monads do not have a corresponding monad transformer? https://chaource.dreamwidth.org/186744.html

Profile

chaource: (Default)
chaource

February 2026

S M T W T F S
123 45 67
8 910 11121314
151617181920 21
22232425262728

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 22nd, 2026 09:21 pm
Powered by Dreamwidth Studios