Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

program to compute gears, with table

98 views
Skip to first unread message

Emanuel Berg

unread,
Sep 8, 2017, 1:33:18 AM9/8/17
to
Hey guys, does this look right to you?

;; (print-gears '(34 50) '(12 13 15 17 19 21 23 25) 622)
;;
;; =>
;;
;; 622 wheel
;;
;; chainring sprocket gear
;;
;; 34 25 2657.5360544880004
;; 34 23 2888.626146182609
;; 34 21 3163.7333982000005
;; 34 19 3496.7579664315795
;; 50 25 3908.1412566000004
;; 34 17 3908.1412566000004
;; 50 23 4247.97962673913
;; 34 15 4429.226757480001
;; 50 21 4652.549115000001
;; 34 13 5110.64625863077
;; 50 19 5142.291127105264
;; 34 12 5536.5334468500005
;; 50 17 5747.266553823531
;; 50 15 6513.568761
;; 50 13 7515.656262692309
;; 50 12 8141.960951250001

(require 'cl-lib)

(defun compute-gear (chainring sprocket wheel)
(let*((pi 3.14159265)
(radius (/ wheel 2.0))
(circum (* 2 radius pi))
(gear (* (/ chainring sprocket 1.0) circum)))
(list chainring sprocket gear)))

(defun gear (chainrings sprockets wheel)
(let*((gears
(cl-loop for c in chainrings
append (cl-loop for s in sprockets
collect (compute-gear c s wheel) )
)))
(cl-sort gears #'<= :key #'cl-caddr)))

(defun print-gears (chainrings sprockets wheel)
(let ((out-buffer (get-buffer-create "*Gears*")))
(with-current-buffer out-buffer
(erase-buffer)
(insert (format "%s wheel\n\n" wheel))
(insert "chainring sprocket gear\n\n")
(let ((gears (gear chainrings sprockets wheel)))
(cl-loop for g in gears
do (let ((c ( car g))
(s ( cadr g))
(d (cl-caddr g)))
(insert (format " %s %s %s\n" c s d)) ))))
(pop-to-buffer out-buffer) ))

--
underground experts united
http://user.it.uu.se/~embe8573

Graham

unread,
Sep 8, 2017, 4:46:05 AM9/8/17
to

"Emanuel Berg" <moa...@zoho.com> wrote in message news:86bmmlu...@zoho.com...
Not sure about your code as I do not speak that language but a quick check gives:

622*3.142*50/25=3908.648mm

So if your definition of gear is roll out in mm then it looks close. Do not forget to include the tyre. See:

https://www.cateye.com/data/resources/Tire_size_chart_ENG.pdf

for approximate circumferences. Taking a 23mm tyre the above example would be:
2096*50/25=4192mm

Graham.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Frank Krygowski

unread,
Sep 8, 2017, 11:50:36 AM9/8/17
to
Right, don't forget to include the tire. 622 is bead seat diameter, but
you want (effective) outside diameter instead.

I first did such a thing in the 1970s, using Fortran. But I formatted it
as a compact table in rows and columns. You could have one row for each
chainring, one column for each rear cog. A matrix, 2x8.

Another useful trick is to plot the gear development on a logarithmic
scale, so the change from one gear to the next is scaled as the
percentage change. Plotting using a separate row or a separate symbol
for each chainring makes clear which gear is "next" in your gear
progression.

These days, it's probably easiest to do all the above using a
spreadsheet, such as LibreOffice Calc. Or Micros**t Excel.

BTW, back when there were only five rear cogs and a person wanted a wide
range with uniform or other logical spacing, plotting gear development
(or "gear inches," in "inch" countries) was a useful tool for the art of
bike design. These days, with up to 11 cogs in back, the entire exercise
isn't as valuable as it once was.

--
- Frank Krygowski

David Scheidt

unread,
Sep 8, 2017, 1:09:46 PM9/8/17
to
In rec.bicycles.tech Emanuel Berg <moa...@zoho.com> wrote:
:Hey guys, does this look right to you?

As noted, you need to consider the diameter of the wheel including its tire.

The style is awful. In straight common lisp:

(defun compute-gear (chainring sprocket wheel)
(list chainring sprocket (* (/ chainring sprocket) (* 3.14 wheel))))

(defun gear (chainring sprocket w)
(let ((g))
(dolist (c chainring)
(dolist (s sprocket)
(push (compute-gear c s w) g)))
(sort g #'< :key #'third)))

(defun print-gears (chainring sprocket wheel)
(format nil "~:{ ~d ~d ~f ~%~}" (gear chainring sprocket wheel)))





--
sig 46

Emanuel Berg

unread,
Sep 8, 2017, 1:45:07 PM9/8/17
to
Graham wrote:

> So if your definition of gear is roll out in
> mm then it looks close. Do not forget to
> include the tyre.

Right, perhaps I should change "gear" into
"roll out" if that's the agreed-upon term.
Perhaps I should even make it print the
formulae first thing.

And I'll include the tyre. Excellent :)

Emanuel Berg

unread,
Sep 8, 2017, 1:52:22 PM9/8/17
to
Skip Montanaro wrote:

> * Why the 1.0 divisor when computing gear?

As explained, otherwise it'll be integer
division. But I think that qualifies as a hack
(not an ugly hack tho) so there is no shame in
spotting it an "error" :)

> * You can skip the radius and use wheel
> (diameter) directly in computing
> the circumference.

Right!

> * It never occurred to me to do this in Lisp.
> I always just use an online calculator, like:
>
> http://www.gear-calculator.com/?GR=DERS&KB=34,50&RZ=12,13,15,17,19,21,23,25&UF=2150&TF=90&SL=2.6&UN=KMH

Let's agree there is no need to do it in Lisp.
Only a desire :)

Joerg

unread,
Sep 8, 2017, 3:56:14 PM9/8/17
to
Why make things complicated? I do such stuff with spreadsheets. That's
what they were invented for. Part of every office software including
free ones.

--
Regards, Joerg

http://www.analogconsultants.com/

David Scheidt

unread,
Sep 8, 2017, 3:59:18 PM9/8/17
to
In rec.bicycles.tech Joerg <ne...@analogconsultants.com> wrote:
I rewrote his code in common lisp in less time than it takes excel to
start.


--
sig 106

Doug Landau

unread,
Sep 8, 2017, 4:21:42 PM9/8/17
to
A+

cycl...@gmail.com

unread,
Sep 8, 2017, 5:17:51 PM9/8/17
to
Almost the entire automobile industry is being programmed with languages like Python. Like Fortran these higher level languages are easy and fast to correct errors but everything is on the net now - Tesla updates all of their software off of the Internet.

Higher level languages have millions of holes in them for hackers to gain control of your system. How would you like all of the traffic lights in your area to turn red at once and stay that way? How would you like pressing the accelerator on your car to act as a brake or visa versa? Being interviewed by electric car manufacturers for development jobs I can't seem to get it through their heads that they are placing their company's in grave danger by using languages that are not certifiable.

Even the people that write in Assembly language don't do it as I do. They write utility groups and then simply make calls to these utilities. This is so clumsy that I write smaller, more compact and faster code in C. Though in general these assembly code groups are relatively safe compared to the higher level languages.

cycl...@gmail.com

unread,
Sep 8, 2017, 5:23:35 PM9/8/17
to
On Friday, September 8, 2017 at 10:45:07 AM UTC-7, Emanuel Berg wrote:
> Graham wrote:
>
> > So if your definition of gear is roll out in
> > mm then it looks close. Do not forget to
> > include the tyre.
>
> Right, perhaps I should change "gear" into
> "roll out" if that's the agreed-upon term.
> Perhaps I should even make it print the
> formulae first thing.
>
> And I'll include the tyre. Excellent :)

There's always a slight error this way. The radius of a tire and hence it's circumference changes slightly with pressure and/or weight of the rider.

cycl...@gmail.com

unread,
Sep 8, 2017, 5:32:56 PM9/8/17
to
That's an eight speed setup. For the most part you can REALLY set an 8 speed up nicely to have only two clumsy steps - the two highest gears. And you in general only use these while riding downhills so it is not worth making these ratios closer.

So exactly why are they changing to 10, 11 and now 12 speeds. These have weaker chains, much faster wearing drive components and less sure shifting.

Emanuel Berg

unread,
Sep 8, 2017, 5:57:06 PM9/8/17
to
Frank Krygowski wrote:

> I first did such a thing in the 1970s, using
> Fortran.

Cool! Fortran (Formula Translation, 1957)
sounds like the perfect idea. Perhaps the
formating (output report) should be left to
COBOL tho :) (Common business-oriented
language, 1959).

Today I think the hipsters at the universities
would use Haskell (1990).

> But I formatted it as a compact table in rows
> and columns. You could have one row for each
> chainring, one column for each rear cog.
> A matrix, 2x8.

The idea with having it 8x3 was that the third
column would be the "roll out" and that would
be sorted vertically.

But perhaps I'll add a feature to flip
it later.

> Another useful trick is to plot the gear
> development on a logarithmic scale, so the
> change from one gear to the next is scaled as
> the percentage change. Plotting using
> a separate row or a separate symbol for each
> chainring makes clear which gear is "next" in
> your gear progression.

Yes, I thought about doing that. Perhaps with
ASCII art or using gnuplot which I did some
cool plots with. Here is one:

http://user.it.uu.se/~embe8573/figures/gnuplot/science-inverted.png

Emanuel Berg

unread,
Sep 8, 2017, 7:45:57 PM9/8/17
to
David Scheidt wrote:

> The style is awful. In straight
> common lisp [...]

Ha! I've heard about the bicycle style police
but I always thought that refered to shaved
legs and keeping the helmet straps to the
inside of the sunglasses scalps! Or wait...
should it be the other way around?

Well, styles make fights, and "pushing" is
never part of my game plan. But it does look
neater with `dolist' and `push' and it might be
more efficient as well as I don't know the
intricacies of append and collect. Not that it
will ever matter in this case, of course.

Emanuel Berg

unread,
Sep 8, 2017, 7:51:17 PM9/8/17
to
Joerg wrote:

> Why make things complicated?

It isn't - it's fun :)

> I do such stuff with spreadsheets.

When done, feeding a CLI tool with data from
the shell is faster and more pleasant (cooler)
than using a spreadsheet. It can then also be
combined with other such tools, tho I admit
that probably won't happen in this case (?).

A spreadsheet is of course a fine way to do it
as well.

> That's what they were invented for.

Programming languages were also invented for
this kind of... computing :)

Emanuel Berg

unread,
Sep 8, 2017, 7:55:26 PM9/8/17
to
David Scheidt wrote:

> I rewrote his code in common lisp in less
> time than it takes excel to start.

It really doesn't get any faster than these
lovely small shell tools :)


you gotta give me more and more
cuz you're the one that I adore
(Zodiac 1996)

John B.

unread,
Sep 9, 2017, 12:29:18 AM9/9/17
to
But they do allowed the sales person to say such things as "Of course
it has the new x speed" system. The last time I was at my local bike
shop the sales person said something about, "well, we do still have a
few 9 speed chains left".

I might add that in Bangkok, which is essentially flat, I might use
two gears on a normal ride.
--
Cheers,

John B.

Emanuel Berg

unread,
Sep 9, 2017, 12:47:02 AM9/9/17
to
John B. wrote:

> "well, we do still have a few 9 speed chains
> left".

Anyone feel free to elaborate on this. How and
why should the chain be different with
different cassette/chainring configurations?

And is there a "notation" do describe this?
Usually makes it easier to understand...

John B.

unread,
Sep 9, 2017, 3:00:27 AM9/9/17
to
On Sat, 09 Sep 2017 06:46:59 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>John B. wrote:
>
>> "well, we do still have a few 9 speed chains
>> left".
>
>Anyone feel free to elaborate on this. How and
>why should the chain be different with
>different cassette/chainring configurations?
>
>And is there a "notation" do describe this?
>Usually makes it easier to understand...

The rear sprocket spacing is closer as the number of cassette cogs
goes up, so narrower chains.

The over all length of the cassette is limited by the distance between
the rear drop outs as the wider the cassette the more the hub flange
on that side must be offset and thus the angle of the spokes
decreases.
--
Cheers,

John B.

Emanuel Berg

unread,
Sep 9, 2017, 6:37:12 AM9/9/17
to
John B. wrote:

> The rear sprocket spacing is closer as the
> number of cassette cogs goes up, so
> narrower chains.
>
> The over all length of the cassette is
> limited by the distance between the rear drop
> outs as the wider the cassette the more the
> hub flange on that side must be offset and
> thus the angle of the spokes decreases.

Okay? Is that the reason you simply cannot make
the back fork wider? At some point the spoke
angle will make for a wheel that isn't
strong enough?

AMuzi

unread,
Sep 9, 2017, 9:58:43 AM9/9/17
to
The ancient and traditional method from race-rules gear
limits to computer input is a rollout.
Ride over a spot of paint and measure between marks. In
theory it's 2R*3.14159. In practice it is not. As you note,
rider weight, inflation etc have some bearing on this

--
Andrew Muzi
<www.yellowjersey.org/>
Open every day since 1 April, 1971


AMuzi

unread,
Sep 9, 2017, 10:18:45 AM9/9/17
to
On 9/8/2017 11:46 PM, Emanuel Berg wrote:
> John B. wrote:
>
>> "well, we do still have a few 9 speed chains
>> left".
>
> Anyone feel free to elaborate on this. How and
> why should the chain be different with
> different cassette/chainring configurations?
>
> And is there a "notation" do describe this?
> Usually makes it easier to understand...
>

Overall width.
4/5 speed systems used very wide chain as you may recall.
To get 8, 9, 10, 11 sprockets inside the 130mm road format
(originally seven speeds) the sprockets are closer and so
the chain is smaller.

http://www.yellowjersey.org/photosfromthepast/MANYCHAN.JPG

AMuzi

unread,
Sep 9, 2017, 11:05:33 AM9/9/17
to
On 9/9/2017 5:37 AM, Emanuel Berg wrote:
> John B. wrote:
>
>> The rear sprocket spacing is closer as the
>> number of cassette cogs goes up, so
>> narrower chains.
>>
>> The over all length of the cassette is
>> limited by the distance between the rear drop
>> outs as the wider the cassette the more the
>> hub flange on that side must be offset and
>> thus the angle of the spokes decreases.
>
> Okay? Is that the reason you simply cannot make
> the back fork wider? At some point the spoke
> angle will make for a wheel that isn't
> strong enough?
>

People have been predicting doom in that regard for a very
long while. In theory maybe but in practice not yet.

Emanuel Berg

unread,
Sep 9, 2017, 12:34:31 PM9/9/17
to
AMuzi wrote:

> Overall width. 4/5 speed systems used very
> wide chain as you may recall. To get 8, 9,
> 10, 11 sprockets inside the 130mm road format
> (originally seven speeds) the sprockets are
> closer and so the chain is smaller.

So could one have like a 3 sprocket casette
with old chainring quality and then use a fat
chain to not have to replace anything save for
perhaps the chain, but even that much
less often?

Or does moving the chain wear down even
wide sprockets?

Emanuel Berg

unread,
Sep 9, 2017, 12:36:19 PM9/9/17
to
AMuzi wrote:

>> Okay? Is that the reason you simply cannot
>> make the back fork wider? At some point the
>> spoke angle will make for a wheel that isn't
>> strong enough?
>>
> People have been predicting doom in that
> regard for a very long while. In theory maybe
> but in practice not yet.

I see, yet another "DANGER!" so the
manufacturer can produce even more incompatible
equipment. Show must go on!

Emanuel Berg

unread,
Sep 9, 2017, 12:40:29 PM9/9/17
to
AMuzi wrote:

> Overall width. 4/5 speed systems used very
> wide chain as you may recall. To get 8, 9,
> 10, 11 sprockets inside the 130mm road format
> (originally seven speeds) the sprockets are
> closer and so the chain is smaller.

Is it enough to count the sprockets,
e.g. does an 8 sprocket casette always have the
same width? Or does that vary
between manufacturers?

And surely there aren't different chains for
8, 9, 10, and 11 casettes, i.e. four different
chain sizes?

Sir Ridesalot

unread,
Sep 9, 2017, 1:23:18 PM9/9/17
to
All you have to do is search the web under bicycle chain widths and you'll seethat 5 speed, 7 speed, 9 speed, 10 speed and 11 speed chains are ALL different widths to cope with the narrower spacings between cogs and also the thinner cogs.

Cheers

Emanuel Berg

unread,
Sep 9, 2017, 1:29:12 PM9/9/17
to
Sir Ridesalot wrote:

> All you have to do is search the web

Anything else you can do for me?

Sir Ridesalot

unread,
Sep 9, 2017, 1:35:07 PM9/9/17
to
I did! I DID! After "web" I had also answered your qquestion with "...under bicycle chain widths and you'll seethat 5 speed, 7 speed, 9 speed, 10 speed and 11 speed chains are ALL different widths to cope with the narrower spacings between cogs and also the thinner cogs."

Cheers

AMuzi

unread,
Sep 9, 2017, 1:41:08 PM9/9/17
to
On 9/9/2017 11:40 AM, Emanuel Berg wrote:
> AMuzi wrote:
>
>> Overall width. 4/5 speed systems used very
>> wide chain as you may recall. To get 8, 9,
>> 10, 11 sprockets inside the 130mm road format
>> (originally seven speeds) the sprockets are
>> closer and so the chain is smaller.
>
> Is it enough to count the sprockets,
> e.g. does an 8 sprocket casette always have the
> same width? Or does that vary
> between manufacturers?
>
> And surely there aren't different chains for
> 8, 9, 10, and 11 casettes, i.e. four different
> chain sizes?
>

Surely you jest!
There are variants within each format. Plus 12 speed now.
Four chain models is not a shop inventory - it's nothing.

Emanuel Berg

unread,
Sep 9, 2017, 2:02:24 PM9/9/17
to
Sir Ridesalot wrote:

> I did! I DID! After "web" I had also answered
> your qquestion with "...under bicycle chain
> widths and you'll seethat 5 speed, 7 speed, 9
> speed, 10 speed and 11 speed chains are ALL
> different widths to cope with the narrower
> spacings between cogs and also the
> thinner cogs."

Yes, I know. Thank you for that.

Emanuel Berg

unread,
Sep 9, 2017, 2:10:19 PM9/9/17
to
AMuzi wrote:

> Surely you jest! There are variants within
> each format. Plus 12 speed now. Four chain
> models is not a shop inventory -
> it's nothing.

No jesting!

In the shop I go to regularly there are only
two chains, both Shimano, one is fat (1s) and
one is for casettes.

The one for casettes, the "Shimano CN-HG40", is
for 6, 7, and 8 sprocket casettes.

Emanuel Berg

unread,
Sep 9, 2017, 2:12:24 PM9/9/17
to
AMuzi wrote:

> There are variants within each format.

OK, so how do you know then? Is it imprinted
somewhere on the casette or do you measure it?
If so, what results translate into what chains?

avag...@gmail.com

unread,
Sep 9, 2017, 3:05:06 PM9/9/17
to
Harris Brown Cyclery has a program

Joerg

unread,
Sep 9, 2017, 3:17:14 PM9/9/17
to
On 2017-09-08 12:59, David Scheidt wrote:
> In rec.bicycles.tech Joerg <ne...@analogconsultants.com> wrote:
> :On 2017-09-08 10:52, Emanuel Berg wrote:
> :> Skip Montanaro wrote:
> :>
> :>> * Why the 1.0 divisor when computing gear?
> :>
> :> As explained, otherwise it'll be integer
> :> division. But I think that qualifies as a hack
> :> (not an ugly hack tho) so there is no shame in
> :> spotting it an "error" :)
> :>
> :>> * You can skip the radius and use wheel
> :>> (diameter) directly in computing
> :>> the circumference.
> :>
> :> Right!
> :>
> :>> * It never occurred to me to do this in Lisp.
> :>> I always just use an online calculator, like:
> :>>
> :>> http://www.gear-calculator.com/?GR=DERS&KB=34,50&RZ=12,13,15,17,19,21,23,25&UF=2150&TF=90&SL=2.6&UN=KMH
> :>
> :> Let's agree there is no need to do it in Lisp.
> :> Only a desire :)
> :>
>
> :Why make things complicated? I do such stuff with spreadsheets. That's
> :what they were invented for. Part of every office software including
> :free ones.
>
> I rewrote his code in common lisp in less time than it takes excel to
> start.
>

Wow, you must be able to type at hundreds of letter a second. Here, it
takes less than 2sec for Excel to start. Mostly only a split second to
open the file because I usually have it running nearly all the time.

--
Regards, Joerg

http://www.analogconsultants.com/

AMuzi

unread,
Sep 9, 2017, 3:21:41 PM9/9/17
to
On 9/9/2017 1:10 PM, Emanuel Berg wrote:
> AMuzi wrote:
>
>> Surely you jest! There are variants within
>> each format. Plus 12 speed now. Four chain
>> models is not a shop inventory -
>> it's nothing.
>
> No jesting!
>
> In the shop I go to regularly there are only
> two chains, both Shimano, one is fat (1s) and
> one is for casettes.
>
> The one for casettes, the "Shimano CN-HG40", is
> for 6, 7, and 8 sprocket casettes.
>

No, it is not.

Emanuel Berg

unread,
Sep 9, 2017, 3:46:36 PM9/9/17
to
Joerg wrote:

> Wow, you must be able to type at hundreds of
> letter a second. Here, it takes less than
> 2sec for Excel to start. Mostly only a split
> second to open the file because I usually
> have it running nearly all the time.

But it is faster to feed data into a shell
tool, hit RET and have the result outputted.

And yes, programmers type very quickly indeed.

On a general note, if you care about time (the
perception thereof) you should throw the
computer into a rock wall and be done with it.

Emanuel Berg

unread,
Sep 9, 2017, 3:50:12 PM9/9/17
to
AMuzi wrote:

>> No jesting! In the shop I go to regularly
>> there are only two chains, both Shimano, one
>> is fat (1s) and one is for casettes. The one
>> for casettes, the "Shimano CN-HG40", is for
>> 6, 7, and 8 sprocket casettes.
>>
>
> No, it is not.

They say it is:

För 6-, 7- och 8-delade kransar. [1]

Might be incorrect, of course.

[1] http://www.clasohlson.com/se/Cykelkedja-Shimano-CN-HG40/34-8914

AMuzi

unread,
Sep 9, 2017, 4:02:12 PM9/9/17
to
On 9/9/2017 2:50 PM, Emanuel Berg wrote:
> AMuzi wrote:
>
>>> No jesting! In the shop I go to regularly
>>> there are only two chains, both Shimano, one
>>> is fat (1s) and one is for casettes. The one
>>> for casettes, the "Shimano CN-HG40", is for
>>> 6, 7, and 8 sprocket casettes.
>>>
>>
>> No, it is not.
>
> They say it is:
>
> För 6-, 7- och 8-delade kransar. [1]
>
> Might be incorrect, of course.
>
> [1] http://www.clasohlson.com/se/Cykelkedja-Shimano-CN-HG40/34-8914
>

The guy who only stocks one model chain knows a lot more
than the guy who made it?

http://bike.shimano.com/content/saus-bike/en/home/mtb1/drivetrain/chains/cn-hg40.html

Shifts for crap on a six speed system. Six changers want
classic chain with rivets sticking out the side, especially
the fronts.

Emanuel Berg

unread,
Sep 9, 2017, 8:59:58 PM9/9/17
to
AMuzi wrote:

> The guy who only stocks one model chain knows
> a lot more than the guy who made it?
>
> http://bike.shimano.com/content/saus-bike/en/home/mtb1/drivetrain/chains/cn-hg40.html

... what do you mean? What I can see your link
say the same:

Cassette Compatibility 6/7/8-speed

Sir Ridesalot

unread,
Sep 9, 2017, 9:47:43 PM9/9/17
to
The link might say 6,7 & 8 speedbut Andrew'sright that the shiftingionthe6 speed will NOT beas good asit would be with a PROPER 6 speed chain. They will NOT work well if at all on 9,10 or 11 speed cassettes.

Cheers

David Scheidt

unread,
Sep 9, 2017, 10:06:08 PM9/9/17
to
In rec.bicycles.tech Joerg <ne...@analogconsultants.com> wrote:
On my mac at work, from the time I double click the excel icon to the
time it is ready to do work is over a minute. It's a modern machine,
running an old version of excel. The windows machine I have, but
never use, which is more powerful, and running a current version,
takes even longer. It does have a spinny disk, and not an ssd.
(that's not counting the time to takes to boot up, since it's off.)

--
sig 57

John B.

unread,
Sep 10, 2017, 1:17:15 AM9/10/17
to
On Sat, 09 Sep 2017 12:37:07 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>John B. wrote:
>
>> The rear sprocket spacing is closer as the
>> number of cassette cogs goes up, so
>> narrower chains.
>>
>> The over all length of the cassette is
>> limited by the distance between the rear drop
>> outs as the wider the cassette the more the
>> hub flange on that side must be offset and
>> thus the angle of the spokes decreases.
>
>Okay? Is that the reason you simply cannot make
>the back fork wider? At some point the spoke
>angle will make for a wheel that isn't
>strong enough?

Sure you can make it wider. In fact aren't MTB bikes wider.
But of course that means a wider crank to keep a decent chain line....

Or, you can just use a narrower chain :-)
--
Cheers,

John B.

John B.

unread,
Sep 10, 2017, 1:21:52 AM9/10/17
to
Disregarding "gear inches" I found a sequel to the Freakonomics book
called "SuperFreakonomics" It gets into the economics of street
prostitution early on in the book :-)
--
Cheers,

John B.

John B.

unread,
Sep 10, 2017, 1:24:30 AM9/10/17
to
On Sat, 09 Sep 2017 18:40:25 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>AMuzi wrote:
>
>> Overall width. 4/5 speed systems used very
>> wide chain as you may recall. To get 8, 9,
>> 10, 11 sprockets inside the 130mm road format
>> (originally seven speeds) the sprockets are
>> closer and so the chain is smaller.
>
>Is it enough to count the sprockets,
>e.g. does an 8 sprocket casette always have the
>same width? Or does that vary
>between manufacturers?
>
>And surely there aren't different chains for
>8, 9, 10, and 11 casettes, i.e. four different
>chain sizes?

You'll have to ask Andrew for complete details but from my own use 9
and 10 speed cassettes are the same width. Or perhaps better to say
that I've interchanged them with no problems.
--
Cheers,

John B.

John B.

unread,
Sep 10, 2017, 1:29:58 AM9/10/17
to
On Sat, 09 Sep 2017 12:40:44 -0500, AMuzi <a...@yellowjersey.org> wrote:

>On 9/9/2017 11:40 AM, Emanuel Berg wrote:
>> AMuzi wrote:
>>
>>> Overall width. 4/5 speed systems used very
>>> wide chain as you may recall. To get 8, 9,
>>> 10, 11 sprockets inside the 130mm road format
>>> (originally seven speeds) the sprockets are
>>> closer and so the chain is smaller.
>>
>> Is it enough to count the sprockets,
>> e.g. does an 8 sprocket casette always have the
>> same width? Or does that vary
>> between manufacturers?
>>
>> And surely there aren't different chains for
>> 8, 9, 10, and 11 casettes, i.e. four different
>> chain sizes?
>>
>
>Surely you jest!
>There are variants within each format. Plus 12 speed now.
>Four chain models is not a shop inventory - it's nothing.

Out of curiosity are single speed bikes doing back there in the world.
Here, I would guess, that they outsell the multi speed bikes.

When I get up early and am out on the road at 6ish when the
neighborhood ladies are out doing the days shopping I've yet to see a
multi speed bicycle.
--
Cheers,

John B.

Joerg

unread,
Sep 10, 2017, 10:59:30 AM9/10/17
to
I suggest you use a PC instead, and a contemporary one. If it was more
than a couple of seconds I'd be concerned about something not being
right with the computer.


> ... The windows machine I have, but
> never use, which is more powerful, and running a current version,
> takes even longer. It does have a spinny disk, and not an ssd.
> (that's not counting the time to takes to boot up, since it's off.)
>

Looks like your computers need some serious clean-up. I just tried it on
mine (Dell XPS8700, no SSD, regular HD). It takes such a small fraction
of one second that it is impossible to gauge the milliseconds from click
to Excel being open. I would need a camera and count the frames.

cycl...@gmail.com

unread,
Sep 10, 2017, 11:04:28 AM9/10/17
to
On Friday, September 8, 2017 at 9:47:02 PM UTC-7, Emanuel Berg wrote:
> John B. wrote:
>
> > "well, we do still have a few 9 speed chains
> > left".
>
> Anyone feel free to elaborate on this. How and
> why should the chain be different with
> different cassette/chainring configurations?
>
> And is there a "notation" do describe this?
> Usually makes it easier to understand...

The spacing between the cogs grows narrower with growing numbers of gears and since they have pick-ups to assist shifting you have to make the chains narrower to keep them from hopping gears all the time.

Emanuel Berg

unread,
Sep 10, 2017, 11:07:13 AM9/10/17
to
John B. wrote:

> Out of curiosity are single speed bikes doing
> back there in the world. Here, I would guess,
> that they outsell the multi speed bikes.
>
> When I get up early and am out on the road at
> 6ish when the neighborhood ladies are out
> doing the days shopping I've yet to see
> a multi speed bicycle.

Very common here as well but I make no big
distinction between the single speed, 3-speed
or even the Pentasport Torpedo, which is much
less common of the three. MTBs and racers and
shoppers with casettes are not uncommon but it
varies with age and gender, and with the ladies
in particular they are in the minority.

Emanuel Berg

unread,
Sep 10, 2017, 11:12:23 AM9/10/17
to
> The spacing between the cogs grows narrower
> with growing numbers of gears

Are the sprockets always the same width, only
spacing grows narrower?

> and since they have pick-ups to assist
> shifting you have to make the chains narrower
> to keep them from hopping gears all the time.

Does it impact anything else in the cycling
experience/performance to have
a narrower chain?

Emanuel Berg

unread,
Sep 10, 2017, 2:46:47 PM9/10/17
to
> Harris Brown Cyclery has a program

Swedish: "Fram med det"

German: "Her da mit"

Swedish again: "...och fort ska det gå!"

German again: "...aber zackig!"

English: "May I have it, please?"

Duane

unread,
Sep 10, 2017, 6:23:59 PM9/10/17
to
Emanuel Berg <moa...@zoho.com> wrote:
>> The spacing between the cogs grows narrower
>> with growing numbers of gears
>
> Are the sprockets always the same width, only
> spacing grows narrower?
>
>> and since they have pick-ups to assist
>> shifting you have to make the chains narrower
>> to keep them from hopping gears all the time.
>
> Does it impact anything else in the cycling
> experience/performance to have
> a narrower chain?
>

11 speed chains don't last as long as 8 speed chains, if that's what you
mean. Performance wise there are too many differences between my 11 speed
and the last 8 speed that I had.

--
duane

Emanuel Berg

unread,
Sep 10, 2017, 7:55:30 PM9/10/17
to
Duane wrote:

> 11 speed chains don't last as long as 8 speed
> chains, if that's what you mean.

Yeah, that's one thing I could have meant.
And why is that? Just smaller chain,
more fragile?

But I was more thinking in the line of power
transfer or perhaps if there is some
implication to shifting. For example if the
chainrings are still suited for the new chain
size, if you just replace the casette (or rear
wheel) and then replace the chain to fit the
new rear spacing.

Also, speaking of shifting, I have a Crescent
Atto Sport here, the cheaper version, and it
has the 2x8 layout that inspired me to do the
program, the shifters are Shimano microShift,
and I noticed they are kind of heavy to
operate, and I got some very minor but still
pain in my left forearm, is this what you have
or can it be tinkered somehow to require less
force to shift?

Tosspot

unread,
Sep 11, 2017, 1:02:41 AM9/11/17
to
On 08/09/17 21:59, David Scheidt wrote:
> In rec.bicycles.tech Joerg <ne...@analogconsultants.com> wrote:
> :On 2017-09-08 10:52, Emanuel Berg wrote:
> :> Skip Montanaro wrote:
> :>
> :>> * Why the 1.0 divisor when computing gear?
> :>
> :> As explained, otherwise it'll be integer
> :> division. But I think that qualifies as a hack
> :> (not an ugly hack tho) so there is no shame in
> :> spotting it an "error" :)
> :>
> :>> * You can skip the radius and use wheel
> :>> (diameter) directly in computing
> :>> the circumference.
> :>
> :> Right!
> :>
> :>> * It never occurred to me to do this in Lisp.
> :>> I always just use an online calculator, like:
> :>>
> :>> http://www.gear-calculator.com/?GR=DERS&KB=34,50&RZ=12,13,15,17,19,21,23,25&UF=2150&TF=90&SL=2.6&UN=KMH
> :>
> :> Let's agree there is no need to do it in Lisp.
> :> Only a desire :)
> :>
>
> :Why make things complicated? I do such stuff with spreadsheets. That's
> :what they were invented for. Part of every office software including
> :free ones.
>
> I rewrote his code in common lisp in less time than it takes excel to
> start.

Dinosaur. SML is the way to go.


Emanuel Berg

unread,
Sep 11, 2017, 1:19:56 AM9/11/17
to
Tosspot wrote:

>> Part of every office software including free
>> ones. I rewrote his code in common lisp in
>> less time than it takes excel to start.
>
> Dinosaur. SML is the way to go.

More like you are the dinosaur! Sure, Excel is
from 1987 and SML (Standard Meta Language) is
from 1990.

But SML is a modern implementation of ML from
way back in 1973! ML is sometimes called
"Lisp with types". But Lisp also have types,
only in a different way.

SML and other modern dialects of ML are today
common at universities and popular with
CS people in general (compiler writers,
language-for-the-sake-of-language guys etc.),
but perhaps CS people with a more engineering
inclination than the purists on Haskell.

John B.

unread,
Sep 11, 2017, 2:20:39 AM9/11/17
to
On Mon, 11 Sep 2017 07:19:46 +0200, Emanuel Berg <moa...@zoho.com>
wrote:
Assembler for ever!

Word Star, the first really good word processor application was
written in assembler by a single programmer over a period of about a
month and the program was released in 1978. A "version 2.0" was
released which was copy protected and a financial failure, but the
first real "new" version was version 3, released in 1983.
--
Cheers,

John B.

Emanuel Berg

unread,
Sep 11, 2017, 2:34:24 AM9/11/17
to
John B. wrote:

> Word Star, the first really good word
> processor application was written in
> assembler by a single programmer over
> a period of about a month

Straight long ear!

John B.

unread,
Sep 11, 2017, 5:54:32 AM9/11/17
to
On Mon, 11 Sep 2017 08:34:20 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>John B. wrote:
>
>> Word Star, the first really good word
>> processor application was written in
>> assembler by a single programmer over
>> a period of about a month
>
>Straight long ear!

Sometime in 1980 Epson wanted to license the software to run on their
PX-8 that used a built in LCD display. The application would have to
run from 48Kb of ROM.

They rehired the Programmer, John Barnaby, who had earlier left the
company, at a salary of $100 an hour (1980 dollars, today $297 ). The
project was completed in two weeks, whereupon Barnaby left the company
again.


--
Cheers,

John B.

Emanuel Berg

unread,
Sep 11, 2017, 9:48:05 AM9/11/17
to
AMuzi wrote:

> The guy who only stocks one model chain knows
> a lot more than the guy who made it?
>
> http://bike.shimano.com/content/saus-bike/en/home/mtb1/drivetrain/chains/cn-hg40.html
>
> Shifts for crap on a six speed system.
> Six changers want classic chain with rivets
> sticking out the side, especially the fronts.

Today I went to a bike repair shop (not the
general-purpose store previously mentioned that
"only stocks" the Shimano 1S and 6/7/8 chain
models), and I asked for a 1S chain.

The guy said he had two, one ordinary and
one SS. I asked if the chain really does rust
if you use the bike, and he confirmed it
didn't, so I got the "SC4/0 Steel Roller Chain"
which is 114L 1/2" x 1/8" Made in Taiwan.

I asked about casette chains for specific
numbers of sprockets and he said, without me
mentioning it, one model for 6/7/8, one for 9,
one for 10, and one for 11, with no mention
of 12.

So it would seem he is in agreement with the
Shimano CN-HG40 6/7/8 specification previously
under fire.

Of course, I never tried that on a 6, so this
is just what he said. The plot thickens...

Emanuel Berg

unread,
Sep 11, 2017, 10:00:44 AM9/11/17
to
John B. wrote:

> Sometime in 1980 Epson wanted to license the
> software to run on their PX-8 that used
> a built in LCD display. The application would
> have to run from 48Kb of ROM.
>
> They rehired the Programmer, John Barnaby,
> who had earlier left the company, at a salary
> of $100 an hour (1980 dollars, today $297 ).
> The project was completed in two weeks,
> whereupon Barnaby left the company again.

Assembler isn't really a programming language
in the modern sense, it is more like you say
exactly what the computer should do at a very
low level, down to manually moving data in and
out of CPU registers, just to do for example
basic arithmetics!

It is sometimes used today in combination with
a high-level language (like C) to provide
immediate access to CPU hardware on top
of that.

Today, using a high-level language like
C doesn't really put you at
a speed-disadvantage compared to using
assembler, because the compiler will perform
all sorts of optimizations. So if the
programmer writes sound code and picks
a sound implementation, any hacks left unturned
to get that extra juice can be left to the
compiler to optimize.

Perhaps John Barnaby could do it by moving
individual data items back and forth but for
mere mortals it is an open question if any
performance benefits will follow. Not to
mention (or I will mention it) it will take
some 10 or 100 times the longer to write.

Here is some assembler I wrote some 10 years
ago:

http://user.it.uu.se/~embe8573/os/asm.S

cycl...@gmail.com

unread,
Sep 11, 2017, 11:25:08 AM9/11/17
to
That gear computer was for an eight speed. With a compact cranks and a 12-28 you can see that most of the gears have 10% spread between gears. There is no reason to have closer gearing unless you're racing.

So all you end up with is a set-up for which you need to shift multiple times rather than once to obtain normal performance. And a lot higher cost and faster wear.

This is what the point is isn't it? WHY have components designed to help only the highest performance professional racers other than to pretend to have that sort of performance yourself?

Yesterday I rode on a 35 mile ride. On the way out into a headwind I averaged a little less than 14 mph. I had a cup of coffee while in the city square the worst band I ever heard was making awful noises. When I was in a band if we had played that badly on our first try in a rehearsal we would have quit.

On the way back the wind had reversed and I had a hard time maintaining 12 mph for most of the way. By the time I got home I was exhausted. Do you think that I could improve my performance with an 11 or 12 speed?

I know my limits and it isn't playing as if I was Chris Froome.

cycl...@gmail.com

unread,
Sep 11, 2017, 11:34:29 AM9/11/17
to
It was normal for a job to last the length of a single project. I've held so many positions it isn't funny. My longest period of employment at one company was five years but it really was three years in one company and another two years at a spin-off.

cycl...@gmail.com

unread,
Sep 11, 2017, 11:39:31 AM9/11/17
to
There are assembly programmers still but they sort of write themselves libraries of functions. Then they cross connect these functions. I looked at it but really I could program much smaller and tighter code in C. I could also write in assembly language as well but I write all programs from scratch in that case so you could get a slight increase in speed but not much over a good C compiler.

Frank Krygowski

unread,
Sep 11, 2017, 10:01:20 PM9/11/17
to
On 9/9/2017 4:01 PM, AMuzi wrote:
> On 9/9/2017 2:50 PM, Emanuel Berg wrote:
>> AMuzi wrote:
>>
>>>> No jesting! In the shop I go to regularly
>>>> there are only two chains, both Shimano, one
>>>> is fat (1s) and one is for casettes. The one
>>>> for casettes, the "Shimano CN-HG40", is for
>>>> 6, 7, and 8 sprocket casettes.
>>>>
>>>
>>> No, it is not.
>>
>> They say it is:
>>
>>      För 6-, 7- och 8-delade kransar. [1]
>>
>> Might be incorrect, of course.
>>
>> [1] http://www.clasohlson.com/se/Cykelkedja-Shimano-CN-HG40/34-8914
>>
>
> The guy who only stocks one model chain knows a lot more than the guy
> who made it?
>
> http://bike.shimano.com/content/saus-bike/en/home/mtb1/drivetrain/chains/cn-hg40.html
>
>
> Shifts for crap on a six speed system. Six changers want classic chain
> with rivets sticking out the side, especially the fronts.

"Shifts for crap" may vary with the design of the gear train, and the
expectations of the user.

My favorite bike is still my ancient Cannondale touring bike. Five,
count 'em, five rear cogs, and friction shifting.

I bought a bunch of (Sachs?) 8 speed chains on sale, and I think they
shift fine. A big factor is probably the half step (plus granny)
chainring setup. I suppose anything can shift smoothly over a five
tooth chainring difference. And with friction shifting, one may be able
to coax shifts that an index system would find difficult.

BTW, I parenthesize the granny because it gets used only on loaded
tours. And I'm doing less and less of that. Maybe the shift out of the
granny is more difficult than it was with protruding pins; I don't remember.

--
- Frank Krygowski

Frank Krygowski

unread,
Sep 11, 2017, 10:18:48 PM9/11/17
to
Wow. If someone were paying me $300 per hour to do a job only I could
do, I'd probably take longer than two weeks to do it. ;-)


--
- Frank Krygowski

John B.

unread,
Sep 11, 2017, 10:53:52 PM9/11/17
to
On Mon, 11 Sep 2017 15:47:59 +0200, Emanuel Berg <moa...@zoho.com>
wrote:
I don't think so. On one hand you are reciting what the specifications
are telling you and on the other hand it is a bloke with years and
years of experience in the business is telling you.
--
Cheers,

John B.

John B.

unread,
Sep 11, 2017, 11:05:33 PM9/11/17
to
On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg <moa...@zoho.com>
wrote:
That isn't true at all. I have definitely improved the speed of a C
program by using an assembler language sub routines and even had two C
compilers that would compile the same program into two different sizes
that performed the same "test" program at two different speeds.

And I remember a "payroll program" that we developed in Pascal that
ran so slowly that we had to rewrite nearly all the in/out stuff in
assembler.

You want to go back to writing code for a single core CPU screaming
along at 1 Mhz :-)


>
>Perhaps John Barnaby could do it by moving
>individual data items back and forth but for
>mere mortals it is an open question if any
>performance benefits will follow. Not to
>mention (or I will mention it) it will take
>some 10 or 100 times the longer to write.
>
>Here is some assembler I wrote some 10 years
>ago:
>
> http://user.it.uu.se/~embe8573/os/asm.S
--
Cheers,

John B.

Sir Ridesalot

unread,
Sep 11, 2017, 11:10:27 PM9/11/17
to
Reading Berg's posts makes me think that a lot of times he's trolling. Many times he asks a question then disagrees with what those experts like Andrew who know the RIGHT answer tell him.

Cheers

Frank Krygowski

unread,
Sep 11, 2017, 11:13:03 PM9/11/17
to
Yes, that was interesting too. But she wasn't a street prostitute. She
was a high-priced call girl. With a degree in economics, as I recall!


--
- Frank Krygowski

John B.

unread,
Sep 11, 2017, 11:17:41 PM9/11/17
to
Yes usually a library of functions... just like C :-)
When you write
main()
{
print("Hello, World\n")
}

it simply calls the function "print" which may be a C function or
could be a pre compiled assembler function.
--
Cheers,

John B.

John B.

unread,
Sep 11, 2017, 11:32:01 PM9/11/17
to
Something I've always wondered about is how in the world can I ride an
out and back course and have a head wind both ways :-(

I think that the reason many? most? bicycles are equipped with the
"latest thing" is that is what sells bicycles.

I have, more then once, seen a bloke that very obviously knows very
little about bicycles come into a shop to buy a bicycle - quite often
it seems with the idea that riding a bicycle will make him slim again
- and the Sales Girl will, after talking to the guy for a while,
recommend a bike that she thinks might suit him. Invariably this will
be a middle of the price range bike and about as invariably the guy
will start looking at something much further up the price range. "Hmmm
this one's got 9 speeds and that one has 10.... Oh and that one over
there has 11..." and this is in Bangkok where I seldom shift more than
once in a two hour ride :-)

--
Cheers,

John B.

Emanuel Berg

unread,
Sep 11, 2017, 11:52:44 PM9/11/17
to
John B. wrote:

> On one hand you are reciting what the
> specifications are telling you and on the
> other hand it is a bloke with years and years
> of experience in the business is telling you.

Shozaburo Shimano founded Shimano in
February 1921 which amounts to a collective
experience of 96y 7m 11d, and not of the
business in general, but of manufacturing
bicycle parts. And they say 6/7/8 of their
own chain.

The other people/shops I've refered to who
also say this are probably just repeating what
Shimano says on the chain box.

And I think that's completely natural! I also
trust what manufacturers of an international
magnitude like Shimano put on their boxes.
First thing with new gear I always read on
the box.

So even tho I never tried it myself (a
6/7/8 chain on a 6 casette) I dare say yes,
I find this story a bit strange.

Emanuel Berg

unread,
Sep 12, 2017, 12:00:13 AM9/12/17
to
Sir Ridesalot wrote:

> Many times he asks a question then disagrees
> with what those experts like Andrew who know
> the RIGHT answer tell him.

So let's hear it, why do Shimano put such
obvious disinformation on their product boxes?

Emanuel Berg

unread,
Sep 12, 2017, 12:07:00 AM9/12/17
to
John B. wrote:

> That isn't true at all. I have definitely
> improved the speed of a C program by using an
> assembler language sub routines and even had
> two C compilers that would compile the same
> program into two different sizes that
> performed the same "test" program at two
> different speeds.

Obviously two different programs will be of
different sizes and run at different speeds.
With compilers to do optimization, and with
much increased hardware to make optimization
unnecessary to begin with, there is close to
zero gain re-writing C into assembler, and its
an undertaking that isn't proportional to that
gain. So it is rather done when there is a need
to manipulate hardware directly or in ways
which the high-level language isn't suited for.

Sir Ridesalot

unread,
Sep 12, 2017, 2:07:38 AM9/12/17
to
Yes, you're definitely trolling.

Cheers

John B.

unread,
Sep 12, 2017, 3:45:28 AM9/12/17
to
Well, in detail, the guy wrote the word processor application,
apparently working 7 days a week and 10 or more hours a day. When he
finished the project I guess he said something like "that's enough for
me" and quit. When the Epson project came along, as one article said,
they lured him back, and he finished the job in two weeks... if his
old work schedule applied that would have been, oh say $42,000 :-)

As an aside I worked a one year project where the client specified
that unless I was the Project Manager they wouldn't award the
contract.... makes it pretty pleasant when it comes to salary
negotiation time :-)
--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 3:48:57 AM9/12/17
to
But compared with some he is relatively harmless.

And serves the purpose of allowing others to exhibit their amazing
knowledge of a subject without long drawn out arguments :-)
--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 3:53:29 AM9/12/17
to
On Tue, 12 Sep 2017 06:00:09 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>Sir Ridesalot wrote:
>
>> Many times he asks a question then disagrees
>> with what those experts like Andrew who know
>> the RIGHT answer tell him.
>
>So let's hear it, why do Shimano put such
>obvious disinformation on their product boxes?

Because, as Andrew told you, it will fit. On the other hand, as Andrew
told you, if a 6 speed it won't shift well.

I might add that I have used a 10 speed chain with a 9 speed cassette
and a 9 speed chain with a 10 speed cassette, and they worked to my
satisfaction although Shimano certainly do not state it will work on
the box.
--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 3:58:31 AM9/12/17
to
On Tue, 12 Sep 2017 05:52:39 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>John B. wrote:
>
>> On one hand you are reciting what the
>> specifications are telling you and on the
>> other hand it is a bloke with years and years
>> of experience in the business is telling you.
>
>Shozaburo Shimano founded Shimano in
>February 1921 which amounts to a collective
>experience of 96y 7m 11d, and not of the
>business in general, but of manufacturing
>bicycle parts. And they say 6/7/8 of their
>own chain.

Your data, while accurate, is frivolous as Shozaburo certainly wasn't
making multi speed bike parts in 1921.
--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 4:12:03 AM9/12/17
to
On Tue, 12 Sep 2017 06:06:56 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>John B. wrote:
>
>> That isn't true at all. I have definitely
>> improved the speed of a C program by using an
>> assembler language sub routines and even had
>> two C compilers that would compile the same
>> program into two different sizes that
>> performed the same "test" program at two
>> different speeds.
>
>Obviously two different programs will be of
>different sizes and run at different speeds.

But that wasn't what I said at all. As I said the same code compiled
on two different compiler resulted in both a different size compiled
application and, as well, a speed difference when running.

>With compilers to do optimization, and with
>much increased hardware to make optimization
>unnecessary to begin with, there is close to
>zero gain re-writing C into assembler, and its

Except when it does make a difference.

>an undertaking that isn't proportional to that
>gain. So it is rather done when there is a need
>to manipulate hardware directly or in ways
>which the high-level language isn't suited for.

I'm not sure that is correct in all cases although of course modern
computers run at speeds that make the slower software appear to be
satisfactory. But I did a search on the question "is modern software
written in assembler" and the first hit replied:

"Probably more than most people think, especially in the
microcontroller field. I write in assembler when it's appropriate,
which for the kind of work I do is most of the time


--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 4:25:56 AM9/12/17
to
Ah, you didn't read the whole book.

The introduction mentioned a $300/hour "Escort" named Allie, and then
Chapter 1 described LaSheena who was a street girl and a later chapter
described Allie's business. An interesting point was that while
business was poor for the Street Girls the Escort kept raising her
prices with no loss of business :-)
--
Cheers,

John B.

AMuzi

unread,
Sep 12, 2017, 8:05:18 AM9/12/17
to
As with SRAM, it was called an 8 chain until they stopped
making the wider models. Those are still available, not any
more expensively, just not from those two vendors.

--
Andrew Muzi
<www.yellowjersey.org/>
Open every day since 1 April, 1971


cycl...@gmail.com

unread,
Sep 12, 2017, 9:46:47 AM9/12/17
to
On Monday, September 11, 2017 at 8:05:33 PM UTC-7, John B. wrote:
> On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg <moa...@zoho.com>
> That isn't true at all. I have definitely improved the speed of a C
> program by using an assembler language sub routines and even had two C
> compilers that would compile the same program into two different sizes
> that performed the same "test" program at two different speeds.
>
> And I remember a "payroll program" that we developed in Pascal that
> ran so slowly that we had to rewrite nearly all the in/out stuff in
> assembler.
>
> You want to go back to writing code for a single core CPU screaming
> along at 1 Mhz :-)

About the only improvements you can get with assembly language is servicing RTOS calls. I needed assembly language programs because I was doing very complex and tedious programs that manipulated 16 axis in a chemical analysis instrument using an 8008. But today's fast processors make that unnecessary. Plus today I would design multiple processors into any complex instrument since they are cheap.

Emanuel Berg

unread,
Sep 12, 2017, 11:43:49 AM9/12/17
to
John B. wrote:

> Because, as Andrew told you, it will fit.
> On the other hand, as Andrew told you, if a 6
> speed it won't shift well.

I think it would make more sense if Shimano put
just one digit, or one set of digits, on their
boxes, which refered both "fits" and "shifts
well".

It is the intuition as well.

For example if I had a 6 casette from Shimano,
then put on a 6/7/8 chain, and it didn't shift
well, the thought wouldn't hit me the
chain/casette combination could be the problem,
but I suppose one will have to get used to
disinformation even from the most
iconic manufacturers.

Emanuel Berg

unread,
Sep 12, 2017, 11:48:34 AM9/12/17
to
AMuzi wrote:

> As with SRAM, it was called an 8 chain until
> they stopped making the wider models.
> Those are still available, not any more
> expensively, just not from those two vendors.

Does that mean the 6/7/8 chain shouldn't be
used for 7s as well? Just not as bad as on a 6?

Frank Krygowski

unread,
Sep 12, 2017, 2:58:38 PM9/12/17
to
Didn't Shimano advertise derailleurs as being "9 Speed" when they were precisely
the same geometry as their previous derailleurs?

- Frank Krygowski

Emanuel Berg

unread,
Sep 12, 2017, 3:07:56 PM9/12/17
to
Frank Krygowski wrote:

> Didn't Shimano advertise derailleurs as being
> "9 Speed" when they were precisely the same
> geometry as their previous derailleurs?

Another aspect of this, do you need/want
different chain breakers for 1, 6, 7, 8, 9, 10,
11, and 12 speed chains or does the bushing
diameter stay the same, or at least doesn't
vary to the point it matters?

On my tool it says "For all speed chain" but
its asaklitt, a brand I trust considerably less
than Shimano...

Emanuel Berg

unread,
Sep 12, 2017, 3:08:39 PM9/12/17
to
Frank Krygowski wrote:

> Didn't Shimano advertise derailleurs as being
> "9 Speed" when they were precisely the same
> geometry as their previous derailleurs?

But is that incorrect as long at it works great
with 9? (If indeed it does.)

Radey Shouman

unread,
Sep 12, 2017, 4:19:25 PM9/12/17
to
John B. <sloc...@gmail.com> writes:

> On Mon, 11 Sep 2017 08:23:48 -0700 (PDT), cycl...@gmail.com wrote:

[ ... ]

>>Yesterday I rode on a 35 mile ride. On the way out into a headwind I
>> averaged a little less than 14 mph. I had a cup of coffee while in
>> the city square the worst band I ever heard was making awful
>> noises. When I was in a band if we had played that badly on our
>> first try in a rehearsal we would have quit.
>>
>>On the way back the wind had reversed and I had a hard time
>> maintaining 12 mph for most of the way. By the time I got home I was
>> exhausted. Do you think that I could improve my performance with an
>> 11 or 12 speed?
>>
>>I know my limits and it isn't playing as if I was Chris Froome.
>
> Something I've always wondered about is how in the world can I ride an
> out and back course and have a head wind both ways :-(

With some reasonable assumptions I think you can show that this is
actually true, in a sense. Suppose for example the wind is blowing at
right angles to your (perfectly straight) direction, and that it happens
to be blowing at exactly your ground speed, v.

The apparent wind will be at 45 degrees your heading, at a velocity of
sqrt(v^2 + v^2) = sqrt(2)*v.

For turbulent flow, the drag force is approximately proportional to the
square of the wind speed, so the drag force will be twice the drag force
you would see in still air, F. (At this point we have assumed a
cylindrical bike & rider, meaning that the coefficient of drag is the
same from the front as the side, since drag from the side is normally
greater, this is conservative).

Fortunately the drag force acts at 45 degrees to your course, so the
drag component that holds you back is
cos(45 deg)*F = (2/sqrt(2))*F
= sqrt(2)*F
~= 1.414 F

This is as true on the way out as it is on the way back, hence you
really do have an effective head wind both ways.
--

Radey Shouman

unread,
Sep 12, 2017, 4:30:47 PM9/12/17
to
I write in assembler every day, not on any rational basis, but because
that's how my boss did it back in the day.

The big difference between new processors and old, from my point of
view, is the much deeper instruction pipelines. In order to get the
most from these machines one should write in the least straightforward
way possible, doing a little of this, then a little of that, so that
there is as long a time as possible between setting some register's
value and using it. Compilers are good at this, human beings not so
much, especially when the code has to be debugged and modified at some
time in the unknowable future.

On the other hand, in assembler one may use the low level processor
behavior to make sure things are done in an efficient way -- for example
carry and overflow conditions are straightforwardly but non-portably
checked. In C, if you want to make sure the compiler does what you
think it should you have to check the generated assembly, and possibly
contort your code to make your intention "clear".

--

Emanuel Berg

unread,
Sep 12, 2017, 5:45:11 PM9/12/17
to
Radey Shouman wrote:

> the much deeper instruction pipelines

"deeper instruction pipelines", is that like
the many transformations of graphical data
before it appears on the screen, or a shell
parsing of a text string with UNIX tools,
i.e. done_value=$(a | b | ... | n) ? If so, are
the extra steps because of new capabilities the
CPU has that wasn't there before?

cycl...@gmail.com

unread,
Sep 12, 2017, 6:44:54 PM9/12/17
to
Well, that's a hard subject isn't it? As a friction shifting chain on a freewheels it shifts almost perfectly as friction shifters do. The problem is with Brifters.

cycl...@gmail.com

unread,
Sep 12, 2017, 6:48:12 PM9/12/17
to
I'm not sure of that Frank. I think that the angles were improved over time. I know that I have a Campy long arm rear derailleur that doesn't shift as well as a short arm newer model. The way the arms rotate and drop are much better on the short arm. That seems to be my experience with the Shimano stuff as well.

cycl...@gmail.com

unread,
Sep 12, 2017, 6:58:50 PM9/12/17
to
Radey - I'm an engineer and understand mathematics. I also understand that on most of the courses I ride I get a complete 180 degree swing in the direction of the winds due to prevailing wind pattern change as the temperature between the coast and the valley changes from the morning to afternoon. I was simply expressing frustration that I happen to live in a place where it always appears to oppose me whereas others living in the valley can have a tail wind in both directions.

It was really nice on a Century down near Gilroy when the end 20 miles was down a hard tailwind and I could maintain 28 mph.

Emanuel Berg

unread,
Sep 12, 2017, 8:13:45 PM9/12/17
to
Here is what Wikipedia says: [1]

With derailleur equipped bicycles, the
external width of the chain also matters,
because chains must not be too wide for the
cogset or they will rub on the next larger
sprocket, or too narrow that they might
fall between two sprockets.

Chains can also be identified by the number
of rear sprockets they can support,
anywhere from 3 to 11, and the list below
enables measuring a chain of unknown origin
to determine its suitability.

* 6 speed – 7.8 mm (5/16")
* 7 speed – 7.3 mm (9/32")
* 8 speed – 7.1 mm (9/32")
* 9 speed – 6.6 to 6.8 mm (1/4 to 9/32")
* 10 speed – 6.2 mm (1/4") (Shimano, Campagnolo)
* 10 speed (Narrow) – 5.88 mm (7/32") (Campagnolo, KMC)
* 10 speed (Narrow, Direction) – 5.88 mm (7/32") (Shimano CN-5700, CN-6700, CN-7900)
* 11 speed – 5.5 mm (7/32") (Campagnolo, KMC, Shimano CN-9000)

Interesting that the 7 and 8 are the same in
inches, but not in mm.

$ units -t '7.3 mm' '1|32 in'
9.1968504

$ units -t '7.1 mm' '1|32 in'
8.9448819

[1] https://en.wikipedia.org/w/index.php?title=bicycle%20chain&printable=yes

John B.

unread,
Sep 12, 2017, 9:06:47 PM9/12/17
to
On Tue, 12 Sep 2017 17:43:43 +0200, Emanuel Berg <moa...@zoho.com>
wrote:

>John B. wrote:
>
>> Because, as Andrew told you, it will fit.
>> On the other hand, as Andrew told you, if a 6
>> speed it won't shift well.
>
>I think it would make more sense if Shimano put
>just one digit, or one set of digits, on their
>boxes, which refered both "fits" and "shifts
>well".
>
Well, apparently it makes sense to Shimano...

>It is the intuition as well.
>
>For example if I had a 6 casette from Shimano,
>then put on a 6/7/8 chain, and it didn't shift
>well, the thought wouldn't hit me the
>chain/casette combination could be the problem,
>but I suppose one will have to get used to
>disinformation even from the most
>iconic manufacturers.

There is no disinformation at all. The chain will fit 6,7,8 speed
cassettes. And that is just what they told you.
--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 9:14:41 PM9/12/17
to
I'm not sure about that. I suspect that the "pull distance" may be a
bit difference if the derailer is designed to work in an indexed
shifter system.

But as far as reaching the other side of the cassette" I've used a 7
speed derailer to shift a 9 speed cassette. Am old Shimano "600" I
believe it was. I replaced it with a more modern derailer as I thought
the "new one" looked nicer.
--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 9:25:27 PM9/12/17
to
I was thinking of days when I ride what I call my short route. It is a
square loop in the city on which the two longer legs are essentially
due north and due south. I set out and on the south leg the wind was
directly in my face. then the "cross wind" leg, about 1 km and
protected by tall buildings and then the north bound leg. Again wind
directly in my face. There are traffic lights on both the north and
south legs and the wind doesn't stop blowing when I stopped at a red
light :-)

--
Cheers,

John B.

John B.

unread,
Sep 12, 2017, 9:37:54 PM9/12/17
to
Ultimately I disassembled the two test programs from the two different
C compilers and found that the difference between the two was that the
Microsoft compiler saved the state, all the registers, etc., then
called the "sub routine" then recovered the state, all the registers,
etc., and went on to the next step. A sort of bullet proofing I guess
you'd call it. The other compiler apparently figured that the
programmer knew what he was doing and if you wrote "write("Good
Morning\n");" it just went ahead and did it.
--
Cheers,

John B.

Emanuel Berg

unread,
Sep 12, 2017, 10:02:10 PM9/12/17
to
John B. wrote:

> There is no disinformation at all. The chain
> will fit 6,7,8 speed cassettes. And that is
> just what they told you.

I can't speak for anyone else, but I'm
interested in equipment that works and works
well, and if it doesn't, I don't care if it
fits or not.
It is loading more messages.
0 new messages