dennisgorelik: (2009)
[personal profile] dennisgorelik
The act of discovery was not complete for him until he had taught it to someone else.
It is a good way to test that your theories have at least some ground in reality.


Richard Feynman was relentless about testing: "It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."

Date: 2016-08-14 09:09 pm (UTC)
From: [identity profile] juan-gandhi.livejournal.com
Here's the problem: if you have a piece of knowledge, and nobody else does, it hardly exists. You may just have gone crazy. Or made a stupid mistake. Knowledge should be tested on other people.

Date: 2016-08-15 08:07 am (UTC)
From: [identity profile] gineer.livejournal.com
So... you are already double checked your opinion about Levenchuk? ;)

Date: 2016-08-17 04:54 am (UTC)
From: [identity profile] gineer.livejournal.com
Who knows... %))

Date: 2016-08-18 07:24 am (UTC)
From: [identity profile] gineer.livejournal.com
I do not know what disgusts Juan in his writings,
so equally I do not know what can make you interested.
Are you interested in general ingineering?

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-19 05:53 am (UTC) - Expand

Strictly logical, is'nt it?

Date: 2016-08-16 06:21 am (UTC)
From: [identity profile] gineer.livejournal.com
(troll face)
Because there is only two opinions: yours and wrong?

Date: 2016-08-17 05:38 am (UTC)
From: [identity profile] gineer.livejournal.com
Sorry in advance.
I'll use this place to expain some Denis's misunderstandings about FP and same time ask you to check my words.
Killing two birds with one stone, so to say. %)


Difference between ordinary (procedural|OOP) programming and FP is that
first used closely definition of algorithm as step-by-step instrutions.
While FP is more like algebra (though there is things like do-notaition in Haskel).

Its looks like no big deal for FP-people and they do not think about it much.
That algebraic substitution can be algotithmic.
Like (2 + x) and x=2
can be done in step by step maner:
1) (2 + x) and x=2 => (2 + 2)
2) (2 + 2) => (4)
3) (4) => 4 ;)
but in FP languages such details quickly hiding under the hood
and FP-people like to say something "substitute x and simplify an expression" or even "just use functor|monad X" %)
without thinking much about how its made under that hood (and there used quite a bunch of smart tricks, because math do not map well on current PCs architecture).

For us, who accustomed that our code can be
runned in debugger (almost) any time,
and seen in step-by-step manner even down to separate machine instruction,
its obviously looking like they mocking us. %)
Only stupidiest procedural|OOP programmer,
so called "bidlocoders" (like indusi or kitaitsi) do there programs as just a bunch of words, without thinking about what it doing on low level.

And that rises the question -- why FP=people do think that their FP is "much better then ordinary programming" (like "why use ordinary washing powder -- use Tide" comercial %)) ).
Where is real benefit of using?

In "F-program can be written in more dense manner"?
But its like FP-people think that ordinary programmers too stupid and think like "here I must first array element add to second, then to third",
instead of "here will be for-loop" or even "lets use library foreach method", or "let's ise that nitty-gritty map|reduce thing from latest standart".

So they also can use euristic "use some abstraction to substitute long and hard to read code with shortcut".
So what the difference?

Here FP like to say "you don't understand a thing, FP its math and its garanty that our code will work".
And here they have some point.
Because of so detailed ordinary programming are prone to ad-hoc programming.
And its really makes code look messy.

But its all about discipline of programmers...

Date: 2016-08-17 06:20 am (UTC)
From: [identity profile] juan-gandhi.livejournal.com
(sorry, I'lll reread it tomorrow, it's very interesting and takes time)

Date: 2016-08-17 07:28 am (UTC)
From: [identity profile] gineer.livejournal.com
Thank you in advance.

Date: 2016-08-17 01:28 pm (UTC)
From: [identity profile] gineer.livejournal.com
\\FP is much more similar to assembler code than to algebra.

What makes you think so? (may be its the reason of your hardships with FP)

In a way it may be right.
If you think about any PL as a way to communicate with special virtual machine.
But I think Juan will judge us here.


\\Do you mean that difference between OOP and FP is in discipline of programmers?

As far as I seen such opinion on the internet.
That "new sexy" languages and programmers who use them
and start arguing that this new hot PL make them more productive (and smarter ;) how without it).
Like PL with GC.
Its just because they released of stuff which need strict discipline like manual MM.
But not because (as they like to boast) this new PL "more expressive" or something (or just programmers on it are plain smarter then other ;) )

And FP-people support this judgment,
while they say that "FPL is more strict, so if you made your code compile -- its a good sign there is no errors either".
So. Real benefit from FPL is that it SO strict, that even undisciplined programmers cannot ruin code with their ad-hoc hacks. ;)
The same way as programmers in GC PL cannot ruin MM (that simple as in C, at least).

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-18 06:33 am (UTC) - Expand

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-18 07:03 am (UTC) - Expand

Literally :)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-18 07:22 am (UTC) - Expand

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-22 02:22 pm (UTC) - Expand

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-23 05:07 am (UTC) - Expand

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-23 05:47 am (UTC) - Expand

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-08-23 06:47 am (UTC) - Expand

Date: 2016-08-17 06:20 pm (UTC)
From: [identity profile] juan-gandhi.livejournal.com
Ну на самом деле там все не так хорошо, как фпшники сообщают.
Просто есть определенный прогресс.

1. Лучше писать групповые операции - со списками, например. Фильтрация, мапинг, зиппинг. Все это есть в R, и тут ничего такого особо функционального нету.
2. Отсутствие мутабельности означает всего лишь отсутствие мутабельности. А вот ее присутствие означает, что вы забываете предыдущие значения, и вместо потока данных берете только хвост, теряя при этом многие полезные данные.
3. Строгие типы позволяют производить гораздо более чистые программы, не надеясь на совесть программиста. Но не всегда.
4. Для обеспечения 1) и 3) нужны типы высшего порядка. И тут выясняется, что операции над типами высшего порядка легко обобщаются еще дальше. Так возникают монады.
5. А монады хороши тем, что их свойства известны, и можно сокращать вычисления, просто расчитывая на свойства.
6. А глубже копнуть - еще возникают и комонады. Но обычно ФПшники до них не доходят.

Date: 2016-08-18 06:55 am (UTC)
From: [identity profile] gineer.livejournal.com
1. Any such things can be done in ordinary PL by means of special libraries.
And such librries can be even more powerfull... in terms of PC performance (like using GPU for computing), not in terms of "conceptual power", of course.
Like that Julia prized by Levenchuck ;)

2. Immutability makes more difficult work with a state in programs.
So, while I totally agree that immutability can be helpfull and in general are sign of good style in programming.
But there is all different kinds of programming that do not benefit from it at all.
Separately it can be confirmed by that fact that immutability aproach are so late comer. Dozens of years people did a lot of staff without it.
So, it means, that someone who propose things like immutability to be widely adopted in all different areas -- must provide stronger PRO arguments and be more prepared to answer CONTRA arguments,
then just "its better programming style per se".

3. Its ordinary antagonism between dynamically and statically typed PL, am I wrong?

4. Mathematical one, not that in PL (I assume it from what I read in your blog.. about problems with realisation of it in different PLs)

5. Same. In math, not in PL.
And here my unheard in your blog question -- is there some method (in OOP we have OOD -- object-oriented Design and decomposition) of how to decompose real life project tasks into this math aproach with monads and etc?

6. No comments.

PS And. Can you look at Dennis's arguments too, please?

(no subject)

From: [identity profile] juan-gandhi.livejournal.com - Date: 2016-08-18 05:33 pm (UTC) - Expand

Date: 2016-08-18 09:14 am (UTC)
From: [identity profile] gineer.livejournal.com
Из интервью, взятого MIT Technology Review (T.R.) у Бьерна Страуструпа (Б.С.):

"...
Б.С. - I think the real problem is that “we” (that is, we software developers) are in a permanent state of emergency, grasping at straws to get our work done. We perform many minor miracles through trial and error, excessive use of brute force, and lots and lots of testing, but–so often–it’s not enough.

Software developers have become adept at the difficult art of building reasonably reliable systems out of unreliable parts. The snag is that often we do not know exactly how we did it: a system just “sort of evolved” into something minimally acceptable. Personally, I prefer to know when a system will work, and why it will.

T.R.: How can we fix the mess we are in?

Б.С.: In theory, the answer is simple: educate our software developers better, use more-appropriate design methods, and design for flexibility and for the long haul. Reward correct, solid, and safe systems. Punish sloppiness.

In reality, that’s impossible. People reward developers who deliver software that is cheap, buggy, and first.
..."

(no subject)

From: [identity profile] juan-gandhi.livejournal.com - Date: 2016-08-18 05:34 pm (UTC) - Expand

(no subject)

From: [identity profile] juan-gandhi.livejournal.com - Date: 2016-08-31 03:09 pm (UTC) - Expand

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-09-04 10:41 am (UTC) - Expand

(no subject)

From: [identity profile] juan-gandhi.livejournal.com - Date: 2016-09-05 03:44 am (UTC) - Expand

(no subject)

From: [identity profile] gineer.livejournal.com - Date: 2016-09-05 05:44 am (UTC) - Expand

Yet one excerpt

Date: 2016-08-22 02:30 pm (UTC)
From: [identity profile] gineer.livejournal.com
""Mathematicians, or people who have very mathematical minds, are often led astray when “studying” physics because they lose sight of the physics. They say: “Look, these differential equations—the Maxwell equations—are all there is to electrodynamics; it is admitted by the physicists that there is nothing which is not contained in the equations. The equations are complicated, but after all they are only mathematical equations and if I understand them mathematically inside out, I will understand the physics inside out.” Only it doesn’t work that way. Mathematicians who study physics with that point of view—and there have been many of them—usually make little contribution to physics and, in fact, little to mathematics. They fail because the actual physical situations in the real world are so complicated that it is necessary to have a much broader understanding of the equations.
What it means really to understand an equation—that is, in more than a strictly mathematical sense—was described by Dirac.""

The Feynman Lectures on Physics, Vol.2
Differential Calculus of Vector Fields
2-1

PS Try substitute "physics" with "programming" ;)

Re: Yet one excerpt

Date: 2016-08-22 03:45 pm (UTC)
From: [identity profile] juan-gandhi.livejournal.com
Oh. My typical error. I did not read his physics books. But yes, that's my mistake.

Note though that I have noticed it - that all this theory does not exactly work in programming; and more, that our logic does not exactly work.

Re: Yet one excerpt

From: [identity profile] juan-gandhi.livejournal.com - Date: 2016-08-22 04:18 pm (UTC) - Expand

Re: Yet one excerpt

From: [identity profile] gineer.livejournal.com - Date: 2016-08-23 05:03 am (UTC) - Expand

Re: Yet one excerpt

From: [identity profile] gineer.livejournal.com - Date: 2016-08-23 04:57 am (UTC) - Expand

Re: Yet one excerpt

Date: 2016-08-23 04:51 am (UTC)
From: [identity profile] gineer.livejournal.com
\\Oh. My typical error. I did not read his physics books.

In such cases my answer -- in today world its impossible to read all books.
Even all famous and recomended one.
Though I have my share of his lections... even almost two copies. %)


\\that all this theory does not exactly work in programming;

You mean FP. Yes, I'm kinda saw it.
But you have blinde spot of your own -- related to Levenchuk. ;)
His work is quite related to physics (and programming)
and complicated in a sence mentioned in that excerpt.
But you tend to dismiss his trials.

\\and more, that our logic does not exactly work.

Yeah... we like our logic.
But what if in this Universe its not logic what counts, but casuality only.
I see support for this in my AI studies -- that we, as we is, could not exist in a world of pure logic.

PS One of last posts of schkrobious looks interesting in this sence.

Script

Date: 2016-08-18 08:31 am (UTC)
From: [identity profile] gineer.livejournal.com
Near future (with microbio and nanotech thingies).

People as always swarming in skyscrapers.
So in one of passages of one of skyscreper tall and manly man bumped (just so-so) into little office women.
Apologised, of course.
But She becomes rebelous and stated need of police intervention.
He smugly agreed and they come to closest justice terminal (its future you see, people have no need to appoint meeting at lawers offices and\or come to judges).
There he take initiative in his hands and start asking police robot to take stream from public camera from the place of bumping, make reconstruction of collision and deduse possible harm... (its THAT future, you see ;) geeks rulez here %) )
But suddenly comp stopped nice flow of his self defense and shows picture somewhere from social networks where he showed with the bunch of "scum of society"-antifeminists.

Level of accusations bumped higher.

Our hero noticing that police women at close police desc become interested in situaton.
And start thinking that its some "Women Power" movement ploy.
So, he decides to rise stakes and asks police comp:
"Disclosure my health record. Show that in time when that nusty trick from that bunch of fellows occure, I was at hospital. And was at state of narcosis after operation".
And also, he came in rage.
Start demending from comp to fixate, show and add to the case records of Who? and How? intervened into it (thinking that it might be that police women at hand).
Also, he noticed that time come to change shifts
and instead of a police women come two guys.
And feel more confidently: "Eat it, vagina-americans!".

But then suddenly police comp rises alarm "Fraud! Fraud!".

That polise guys takes out their guns.
While comp diclares the reason -- from somewhere came (sound only) transmission from our hero's name,
that unknown person stealed his belongins and IDs, and spreyed him into face something like acid, so he lost his authentic voice.
And really, voice sounds quite distorted.
Almost like comp-simulated one.

Heat rises.

But our guy is law-abiding one.
So he listen to cops demand and silently go to nearby detention zone (just plain in-building corner, where prisoners separated from outer space with rising bullet-proof glass wall).
But.
Our character are not from small potatoes. ;)
He peeks from his case special device -- omni-view fisheyed camera with connect to justice network,
throws it on the floor to activete
and states that here is some injustice take place,
so he demends attention of higher autorities to this crime...

But... camera-device scriches error message -- network connections from inside this detention box ARE impossible... so it start working in standalone recording mode only.

And... outside of the glass... instead of policemans on guard of this box... comes armed droids.

(and that's (not) all... at all... its just the beginning... folks ;) )

Profile

dennisgorelik: 2020-06-13 in my home office (Default)
Dennis Gorelik

March 2026

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 11th, 2026 04:00 pm
Powered by Dreamwidth Studios