Ludovic 'Archivist'
For a database, the only important thing about time is that 1/ simultaneity doesn't exist 2/ time is steady
Ludovic 'Archivist'
but you cannot rely a lot on time unless you own an atomic clock or a gps clock and networking hardware capable of a PTP synchronization
...
the perfect solution to everything, binary time, "will it happen?" or "did it happen?"
Ludovic 'Archivist'
It may be hard to realize, but the time light takes to go 1km is enough to complete a trading transaction in a financial quotation engine
Ludovic 'Archivist'
Just by having a 2m DVI cable makes it impossible for your computer to display nanosecond accurate time
Ludovic 'Archivist'
it will always be off by at least 6ns, the time needed to go through that cable
Ludovic 'Archivist'
I cannot uphold any time constraints in my database engine except the following: time goes forward
...
Just by having a 2m DVI cable makes it impossible for your computer to display nanosecond accurate time
most display panels are 60hz so youre off (in the worst case) by 1/60s
Ludovic 'Archivist'
most display panels are 60hz so youre off (in the worst case) by 1/60s
I meant even in the case you had a mathematically perfect object as a screen
...
true, but tbh, why would you want such "perfection"
バレンタインがいない柴(食用不可)
...
a human being couldnt tell any accurate time below 100ms
Ludovic 'Archivist'
What i mean to express is that computer science is one of the very few fields where you literally have to deal with relativistic effects, as such, never under estimate time
...
youre right, but at some pont you start overengineering things
...
most of the time you work with some kind of analogy for example you want to measure some kind of distance between some things, where on earth would you need ultra perfect precision to idk the 50st digit
Ludovic 'Archivist'
At some point you may have to say which, of two transactions that came at about the same nanosecond, happened first and who will be able to buy something when it is cheap leaving the other in the dirt
...
practically, it wont matter if you use pi with 50 digit accuracy or 100 digit accuracy
...
if youre doing some kind of manufacturing
Ludovic 'Archivist'
To quote Andrei Alexandrescu: "Write your code like you are going to defend it before court because that may happen some day"
Ludovic 'Archivist'
practically, it wont matter if you use pi with 50 digit accuracy or 100 digit accuracy
Well, floating point calculations are by design very imprecise when you are out of -1 <x < 1
...
thats not what im about
Ludovic 'Archivist'
Sometimes accuracy is important
...
there are for sure ways of actually using some number up to the 50st digit
Ludovic 'Archivist'
Do you know what happens in my database if two transactions happen "at the same time" for example ?
...
nope, but im certain you will tell me 😏
Ludovic 'Archivist'
Nothing
Ludovic 'Archivist'
It is the very only case where the database doesn't make progress on processing
...
so you just reject both?
Ludovic 'Archivist'
so you just reject both?
Can I accept any and remain correct ?
...
id just take whatever i received first
Ludovic 'Archivist'
id just take whatever i received first
How do I know which I received "first" if both have the same time ?
...
how does your networking work?
...
just take whatever comes in first
Ludovic 'Archivist'
just take whatever comes in first
You don't understand the issue, yes, you receive transactions in an "order", but you have to uphold to ACID constraints, and the very idea of simultaneity breaks linearizability. you need to write data in a form of order, and this order have to prove the order of operations. Not dictate it, prove it. if one of the transactions succeeds and someone loses big bucks because he was not "chosen" first, you have not written a fair concensus and linearization
Ludovic 'Archivist'
When I say you may advocate your decisions facing a court, it is quite literal if you work for a multinaional financial institution or if you make software used by them
Ludovic 'Archivist'
as there a nanosecond can mean an empire
...
interesting, but how do you actually get like the time you received something
Ludovic 'Archivist'
In finance it often happens they use network hardware that stamps packets with times synchronized with an atomic clock using PTP with a sub nanosecond accuracy
Ludovic 'Archivist'
because you have to be able to say: "this man was first on the deal"
Ludovic 'Archivist'
And to be able to prove it
Ludovic 'Archivist'
Simultaneity must be, like in nature, an impossibility
Ludovic 'Archivist'
To quote Joe Armstrong (may he rest in peace): "I am a physicist at heart, as such I must write computer systems that respect the laws of physics"
yoav
who do i remove the "\n" that fgets add when input a string(array of char's)
Barack Hussein Obama
Is anybody know how to move my cursor into Line7 automatically after creating a demo.c file in Clion?
Barack Hussein Obama
$END doesn't work.
Anonymous
Hello
Dima
Welcome
Arvind
Cout << pow(2,5) isnot running 😥
Arvind
#include <cmaths > was also used
Terry
'cmath' not 'cmaths'
Arvind
'cmath' not 'cmaths'
Yes I have used <cmath> 😅
Arvind
Already but then also
Anonymous
did you link math libs?
Arvind
No
Anonymous
Then link it
Ilya
Arvind
not running but doing WHAT?
Invalid directive showing
Rostin
Hi Administrator, a friend is trying to join this channel and it says "sorry this chat is no longer accessible"
Arvind
Arvind
<math.h>. Was the right thing to be used and it runs fine now
klimi
Ban lol
Rostin
@danielg_hornik
klimi
Rostin
@K11M1 he remembered... apparently he posted a picture with his laptop sticker
Arvind
Ban lol
Oh wait
klimi
I dont Remember and havent find him in logs
Arvind
what happened
András
pow must be std::pow in this case
There is using namesapce std
András
https://ideone.com/MPWBQM
Anonymous
This is my code for adding two polynomials please tell me why on input of 5x^3 and 6x^2 is giving me only 5x^3
Anonymous
Jesus
Hi guys does anyone know a good place to search for C basic knowledge as I am trying to learn for my University?
klimi
Google
Saurabh