mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > PrimeNet > GPU to 72

Reply
 
Thread Tools
Old 2015-08-18, 05:45   #199
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

2×3×1,609 Posts
Default

grrrr, use #if 0/#endif, which avoids tricks with multiple line comments. Clever editors will even show this in a different color, and/or you can hide it completely from view. Personally, I never use /*...*/, but stay in the //-line and doxygen.

As a fun story, I also "invented" some tricks like

/* //
code lines or code blocks come here;
// */ optional alternate code line comes here;

this way, by adding/removing a second slash in the front of the first line, I can select if I use the code block or (if present) the code line, this is from laziness, instead of using #ifdef's, I only have to press a single key to add or remove that second slash. Of course, the editor's parser will show the part which is commented out in a different color. And of course, if this is done with an "if" line, or either #ifdef/ifndef lines... hehe.

And many other tricks like that...
In the domain I work, I always fight for few bytes or few microseconds, and that means a lot of "alternating" paths, even for elementary calculus, like for example, going up in a circular menu with 5 positions, should I write "if(x!=0)x--;else x=4", or "x=(x==0?4:x-1)", or "x=(x+4)%5", etc. You would be surprised how different MCU's/compilers/architectures will give better/worse code for one or for the other. But that is a different story...
LaurV is online now   Reply With Quote
Old 2015-08-18, 06:14   #200
bloodIce
 
bloodIce's Avatar
 
Feb 2010
Sweden

173 Posts
Default

Quote:
Originally Posted by chalsall View Post
or you add a hash mark for each line.
Eh, come on, the triple quoted string matching only the first indentation is not that bad, is it? Lets not pretend that comments on multiple lines are not thought about. Indentation means readability and if someone ever looks at your code indentation will make it easy to understand where chunks are. Even for yourself months/years later.

P.S. Frankly speaking, when I am touching C(++), I spend more time counting brackets than writing code, I find that unnecessary unproductive.

Last fiddled with by bloodIce on 2015-08-18 at 06:18
bloodIce is offline   Reply With Quote
Old 2015-08-18, 06:41   #201
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

2×3×1,609 Posts
Default

Quote:
Originally Posted by bloodIce View Post
P.S. Frankly speaking, when I am touching C(++), I spend more time counting brackets than writing code, I find that unnecessary unproductive.
Huh? What have you been smoking?

I never counted brackets in 30++ years of programming, except for Lisp (where the parentheses accumulate at the end, and you have to close 20-30 or so, but even there, a square bracket at the end will close all open lists) in school (after school I never wrote complicated Lisp programs beside of simple "scripts" like for example in AutoLisp/AutoCad).

Every IDE nowadays has pairing (CTRL+E will jump between open/close parenthesis/bracket/begin/end of block, for example, in uVision IDE which I have in front of my eyes in this very moment), and/or highlighting (of all, and/or of the mismatched only), and/or shrinking of the blocks/functions, and/or indentation etc. All help with the "brackets" so you never need to "count" them.

Last fiddled with by LaurV on 2015-08-18 at 06:48
LaurV is online now   Reply With Quote
Old 2015-08-18, 08:45   #202
snme2pm1
 
"Graham uses ISO 8601"
Mar 2014
AU, Sydney

35 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
it would make more sense to just run this off mersenne.org and pull from the real data. Perhaps when Aaron has some free time he can help me figure out the best way to pull that kind of data out, I can assemble a front-end once the data is available.
I want to applaud James for taking up the challenge.
It would be most helpful to readily observe the TF explored depth of ranges of unfactored exponents.
As a secondary consideration, it would also be lovely to have a historic perspective for information presented.
I will not assume that quite the same view of information will be convenient.
But with no disrespect to Chris, the exercise of daily migration of statistics must have been a burden that will be alleviated with some degree of similar facility hosted at PrimeNet.
By the way this thread has ventured way off topic and now inconsistent with the parent forum.
I'm not about to start talking about my source code programming habits here.
I was inclined to suggest that further discussion about this proposed new report be relocated to a more proper location like http://www.mersenneforum.org/showthread.php?t=19716 "PrimeNet web design" some days ago, but I didn't want to inhibit the flow of comment.
Maybe it is time now to do that?
snme2pm1 is offline   Reply With Quote
Old 2015-08-18, 10:01   #203
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

2·3·1,609 Posts
Default

We also salute James picking up the glove.
And we say sorry for divagation from the topic. From our topic (the royal our). Because, see, what James has to do, is written in the very few posts of this topic, 3 years ago. By me (and few others). The issues were never completely solved, and got worse in time, till what we have today. I don't blame anyone, just stating the facts, I am perfectly aware that people have real life too, I also have real life
LaurV is online now   Reply With Quote
Old 2015-08-18, 19:19   #204
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

9,767 Posts
Default

Quote:
Originally Posted by LaurV View Post
We also salute James picking up the glove.
Indeed.

As I said before a few times, mersenne.info was created mostly for myself when I was doing LMH TF'ing several years ago. The spidering code was a bit fragile when it came to correctly dealing with connectivity problems, which was exasperated by the horrible connectivity and power issues we suffer here in Barbados (although things are slowly getting better -- a monkey hasn't caused an island / country wide power failure for a while now for example...).

Quote:
Originally Posted by LaurV View Post
And we say sorry for divagation from the topic.
Again, indeed.

I should have known better; programming language wars can take on the fervor of religious debates. At the end of the day everyone's correct and everyone's wrong!

James: if you want a copy of my code (spidering / summary / rendering) you're welcome to it. But this is likely a situation of "Plan to throw one away; you will, anyhow."

P.S. Just to be clear (as there has been some confusion about this in the past), mersenne.info and GPU72 are /completely/ separate. The latter evolved from the former, but they share no infrastructure.
chalsall is offline   Reply With Quote
Old 2015-08-18, 19:40   #205
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

D5D16 Posts
Default

I decided to try again, and while incomplete, the start is now here:
http://www.mersenne.ca/status/tf

It only goes to 1.0M resolution, not 0.01M resolution as mersenne.info does.
Comparison between dates is planned, but not yet implemented (partly because there's only 1 day of history in the database )

edit: Consider this alpha, I know there's glaring bugs so don't even worry about bug reports yet, please

Last fiddled with by James Heinrich on 2015-08-18 at 19:41
James Heinrich is offline   Reply With Quote
Old 2015-08-18, 21:41   #206
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

65358 Posts
Default

I forgot I hadn't yet updated the live database with the 1M-resolution in a certain table, vs 10M resolution that was previously there...
Code:
Query OK, 182907459 rows affected (2 hours 55 min 23.28 sec)
Rows matched: 203280221  Changed: 182907459  Warnings: 0

Last fiddled with by James Heinrich on 2015-08-18 at 21:43
James Heinrich is offline   Reply With Quote
Old 2015-08-19, 00:03   #207
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

9,767 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
I forgot I hadn't yet updated the live database with the 1M-resolution in a certain table, vs 10M resolution that was previously there...
And we programmers sometimes think we have a difficult time...

I'm about to have a few tonnes of concrete poured, and wanted to know how long I should let it set before I cover it in water.

After much Googling, I was led here.

Didn't actually answer my question, but OMG! (Other research leads me to think I should keep it wet as soon as it is applied, and cover it with water as soon as the men are off the site.)
chalsall is offline   Reply With Quote
Old 2015-08-19, 00:17   #208
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

11×311 Posts
Default

Quote:
Originally Posted by chalsall View Post
After much Googling, I was led here.
You can send him to a warm place, but he's still inexorably drawn back to BC...
Quote:
...This document was prepared by representatives of the ready-mixed concrete suppliers in British Columbia...
James Heinrich is offline   Reply With Quote
Old 2015-08-19, 00:36   #209
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

9,767 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
You can send him to a warm place, but he's still inexorably drawn back to BC...
What can I say? They do chemistry better there.... ()
chalsall is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
AVX? (Other new features?) Dubslow Software 6 2011-10-16 14:03
A little request 10metreh Aliquot Sequences 8 2009-10-07 18:13
Upcoming features Xyzzy Forum Feedback 1 2007-11-26 18:57
New features in Prime95 v22.9 guido72 Software 4 2003-03-02 23:54
Desired Features/Addins Complex33 Software 5 2002-09-05 06:13

All times are UTC. The time now is 07:53.


Mon Aug 2 07:53:00 UTC 2021 up 10 days, 2:21, 0 users, load averages: 1.53, 1.53, 1.44

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.