|
Yep! But not in generics...the generic parameter (as far as the compiler is concerned) derives directly from object unless it is constrained so you can't use methods other than those that apply to object .
And you can't constrain to basic types...There's an interesting interview covering this here: http://www.artima.com/intv/generics.html[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
You know, sometimes going backwards it's the only way to go forward.
|
|
|
|
|
I had exactly the same issue a few years ago when I built a ring buffer class to calculate a moving average.
Indeed, it would be nice to be able to have something like an INumeric interface or a way to filter generics which can support arithmetic!
In the end I just used double s, which was more than OK for my specific needs and allowed me to use the same class with int s and such.
In theory, there is no difference between theory and practice, but not in practice. - Anonymous
A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match. - B. Bryson
|
|
|
|
|
Rick York has posted a new comment at "article "Fastest hash function for table lookups in C?!"":
This is a very poor excuse for an article.
What's the problem Mr. York?
For third time you downvote me without pointing out what you don't like or rather hate - your last vote being 1.
Get down get down get down get it on show love and give it up
What are you waiting on?
|
|
|
|
|
Um. I see no comments at all: Fastest hash function for table lookups in C?![^] and you have no "1" votes on that article: just 4 and 5s.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Probably someone with enough rights deleted his vote, but I don't care about votes I should like to know what Rick saw so bad to give 1 - I guess if there were lower vote he would use it.
Get down get down get down get it on show love and give it up
What are you waiting on?
|
|
|
|
|
Probably because it is a dump of stats: remove that and there is nothing left. You have to explain what you are doing - simply showing the results is not what makes an article. You may be getting up votes either in protest at him not telling you what was the actual problem or because the results are so damn clever that nothing needs explaining (doubtful).
It should have been a blog post: not an article.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
>... not telling you what was the actual problem or because the results are so damn clever that nothing needs explaining (doubtful).
I see no problem(s) at all, that's why I am asking.
>It should have been a blog post: not an article.
Are you sure, I am not - something as general and important as hashing for lookups deserves special page.
Get down get down get down get it on show love and give it up
What are you waiting on?
|
|
|
|
|
Sanmayce wrote: I see no problem(s) at all, that's why I am asking.
I've told you what the problem is: this is not an article: it is a blog post, at best.
Sanmayce wrote: Are you sure, I am not
Yes.
Sanmayce wrote: something as general and important as hashing for lookups deserves special page
Perhaps: in that case, write a proper article and don't just dump images on the page. Explain the why's and wherefore's of what you are doing.
If you don't know what a good article should look like go and search for anything written by Marc Clifton or Sasha Barber: they both write well presented and easy to read articles.
Good luck.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
>I've told you what the problem is: this is not an article: it is a blog post, at best.
Okay, I am not arguing, my point was and still is that by sharing some etude it must be useful in first place and hopefully well described where I fail to do so too many times I guess.
>Explain the why's and wherefore's of what you are doing.
See, this is a simple 20 lines C code doing the most well-known task among all general etudes - returning a 32bit value out of smoe key. I didn't want to repeat how to bake bread, just to share the source and stats on different machines in order to give the reader an idea of is it worth downloading?
I just looked at article "Sorting Algorithms In C#" by Mr. Clifton and in my humble (I am not a programmer) opinion it appears to me useless, simply it doesn't cover the most interesting and useful area of sorting - the external ones e.g. I have had some drafts in C that dealt with 1,000,000,000 keys VERY FAST, with mentioning this I just wanted to share how different opinions exist.
>Good luck.
Thank you, obviously my articles are not even articles, sorry, but blame me not - that's me, a C amateur trying to test/share interesting etudes.
Get down get down get down get it on show love and give it up
What are you waiting on?
|
|
|
|
|
It is a blog post, at best. It is not an article.
Sanmayce wrote: Thank you, obviously my articles are not even articles, sorry, but blame me not - that's me, a C amateur trying to test/share interesting etudes.
This one is not an article, plain and simple.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
Mark is correct, it's a very poorly produced article. No explanation of anything and the 'poem' at the end has no place at all.
Veni, vidi, abiit domum
|
|
|
|
|
[^]
Little Lord Snowden
Sat down in NSA's garden,
Downloading files night and day;
With just a little Crawler
To power his data trawler,
He hauled all the secrets away
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
Quote: Among the materials prominent in the Snowden files are the agency’s shared “wikis,” databases to which intelligence analysts, operatives and others contributed their knowledge
No emails, cell phone records??
They want their privacy?...so do we!
|
|
|
|
|
Mike Hankey wrote: They want their privacy?...so do we!
|
|
|
|
|
Hi Mike, Do you use the Atmel AVR chips? If so, what programmer do you use?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Richard,
Until recently I used AVR chips exclusively and if you know how to solder you can get
the USBTiny[^] kit from Adafruit. I got one a few years ago and it has been my programmer when all else failed.
I had an AVR Dragon that I really liked and it was very versatile but every time they upgrade their IDE you have to upgrade the tools and this one refused to upgrade, so it's bricked.
|
|
|
|
|
Thanks! The Dragon looks really cool. Years ago I had used the DIY parallel port programmer, but no computer has a parallel port anymore!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
The thing about the dragon is that it's a cheap In_Circuit Debugger it can also be used to unbrick chips and more. For only $50 it's a good tool to have.
|
|
|
|
|
|
I'll check it out thanks for the link!
|
|
|
|
|
With respect to An autonomous roving vehicle - Part 1 of n[^], it's Robot B-9. The robot on Lost In Space was called Robot B-9, or just Robot. Robbie the robot was from Forbidden Planet and never uttered the phrase "Danger Will Robinson". I know it probably sounds like a small thing to you, but details are important. You kids today...
|
|
|
|
|
Yeah that's been pointed out to me on a couple of occasions. The problem is that I'm so old that all the facts blend together into an indecipherable mess in my head.
|
|
|
|
|
|
There once was a guy from Thailand,
Whose poetry got out of hand,
The rhyming was fine,
Every time!
But unfortunately very few of his poems scanned
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|