Hi, ... In this case, yes, the question does make sense because all the keys are of the same type. ... And they will be equal as long as you use structural...
13815
Dario Teixeira
darioteixeira
Feb 25, 2013 7:47 pm
Hi, ... Hashtbl does not directly compare the keys. Instead it compares the *hashes* of the keys (see the stdlib docs for more info concerning the hash...
13816
oliver
oliver@...
Feb 25, 2013 8:52 pm
... [...] It seems you are looking for something like typeof( 1 ) == typeof( 2.0 ) Then the result could be true or false. Otherwise it has to be an error. ......
13817
oliver
oliver@...
Feb 25, 2013 9:01 pm
... This is a rather bad idea. Comparing float and int is one of th emost common problems in pogranms with loops. Especially using equality-check. regarding...
13818
oliver
oliver@...
Feb 25, 2013 9:02 pm
... ???...
13819
oliver
oliver@...
Feb 25, 2013 9:25 pm
... [...] And now you want to have OCaml implemented in VHDL? [...] ... [...] Then you should either use Assembler, or read introductional books on OCaml. All...
13820
oliver
oliver@...
Feb 25, 2013 9:37 pm
... Machine-level, aha. So, we are going away from using OCaml to some internal stuff that normally should not be of interest in normal OCaml programming. ... ...
13821
oliver
oliver@...
Feb 25, 2013 9:44 pm
... [...] If there is int_of_string and float_of_int and similar stuff, and when Obj.magic is one step further down, we maybe one das ask for a ...
13822
Dario Teixeira
darioteixeira
Feb 25, 2013 10:53 pm
Hi again, ... Just to clarify one thing which my previous rash response mangled: because there are no magic hash functions that guarantee no collisions, an...
13823
Sergei Steshenko
sergstesh
Feb 26, 2013 4:31 am
... "You throw away OCamls advantages, if you just reimplement that stuff in OCaml." - no, I do not throw away OCaml advantages, as I said, I view OCaml as a...
13824
Sergei Steshenko
sergstesh
Feb 26, 2013 4:49 am
... What is the bad idea ? I have clearly written that I want all values of different types to yield _not_ equal when compared. I.e. in my proposed world 0 is...
13825
Sergei Steshenko
sergstesh
Feb 26, 2013 5:01 am
... "When you listen to music (if you do that at all), do you listen to the music, or do you think about quantumphysics, that explains how it is possible that...
13826
Sergei Steshenko
sergstesh
Feb 26, 2013 5:02 am
... Some worms got out of the can ? ... Regards, Â Sergei....
13827
Sergei Steshenko
sergstesh
Feb 26, 2013 5:11 am
... FWIW, good quality multipliers - I mean HW blocks performing multiplication - implemented as combinational logic, are a hot selling item. Again, they are...
13828
Sergei Steshenko
sergstesh
Feb 26, 2013 5:13 am
... Thanks, noted. Regards, Sergei....
13829
rixed
Feb 26, 2013 7:39 am
If I understood correctly, you are after a comparison operator that returns false when its inputs are not of the same type, while performing normal comparison...
13830
oliver
oliver@...
Feb 26, 2013 7:51 am
... Maybe thats the problem ;-) ... You may want to look on changing the input syntax, instead of the language behaviour. OCaml offers possibilities to change...
13831
Sergei Steshenko
sergstesh
Feb 26, 2013 8:11 am
... I have already mentioned camlp4, was advised against it, and insisted I would use it anyway :). I mean to first implement the needed underlying functions,...
13832
oliver
oliver@...
Feb 26, 2013 8:20 am
... Don't see, what you mean. None is not the same as 0 and it does not even have the same type. So, the exception must be thrown. Anything is fine. Ciao, ...
13833
oliver
oliver@...
Feb 26, 2013 8:22 am
On Tue, Feb 26, 2013 at 12:11:53AM -0800, Sergei Steshenko wrote: [...] ... Did not remember you mentiioned it. Was it this thread or another one? So much...
13834
Sergei Steshenko
sergstesh
Feb 26, 2013 8:37 am
... "Don't see, what you mean" <- "Some worms got out of the can ?" <- "Obj.magic is Voodo" Regards, Â Sergei....
13835
Sergei Steshenko
sergstesh
Feb 26, 2013 8:41 am
... "Why do you compare OCaml with Perl, not with ALGOL, C, C++ or other languages?" - OCaml, as other languages, is a way to convert abstractions introduced...
13836
Oliver Bandel
oliver@...
Feb 26, 2013 8:47 am
... And why do you refer to Perl in your comparisons? If all languages are just "way to convert abstractions introduced by humans into a stream of bits...
13837
Sergei Steshenko
sergstesh
Feb 26, 2013 8:57 am
... At them moment I started "feeling" Perl, I found it damn convenient. Actually, a lot of things are done in Perl in a very smart manner. Also, through Perl...
13838
Oliver Bandel
oliver@...
Feb 26, 2013 11:40 am
... The perlish way of "type safety" is: there will (nearly) always be a coercion for you, that allows to run the code. Of course, this is not, what OCaml...
13839
Sergei Steshenko
sergstesh
Feb 26, 2013 1:11 pm
... The fundamental truth is that it is much easier to loosen types in a strictly typed language than to strictify them in a loosely typed language. And I want...
13840
Sergei Steshenko
sergstesh
Feb 26, 2013 1:15 pm
... I have just recollected that there is a JavaScript runtime optimizer which relies on the fact that in most programs type of variables remains the same. ...
13841
Samuel Hornus
samuhornu
Feb 26, 2013 1:29 pm
... I don't see how you can achieve this without writing a new hash-table customized to your Plds_val type. Indeed, __a=(int_to_pld 1) and __b=(string_to_pld...
13842
Sergei Steshenko
sergstesh
Feb 26, 2013 2:11 pm
... So I'll write the needed custom code :). I know that Perl-like data structures have certain coding cost. Regards, Sergei....
13843
Gabriel Scherer
ga_sche
Feb 26, 2013 3:20 pm
I'm not sure I have fully understood this length and unequally-productive discussion, so let me ask a question: what you are trying to do is to have a static...