|
|
Thread Tools | Display Modes |
#111
|
|||
|
|||
program to compute gears, with table
John B. wrote:
:On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg :wrote: :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. :That isn't true at all. I have definitely improved the speed of a C rogram by using an assembler language sub routines and even had two C On modern hardware with modern compilers? The world has moved on, and optimizing compilers write better code than humans do. -- sig 77 |
Ads |
#112
|
|||
|
|||
program to compute gears, with table
On Wednesday, September 20, 2017 at 12:36:42 PM UTC-7, David Scheidt wrote:
John B. wrote: :On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg :wrote: :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. :That isn't true at all. I have definitely improved the speed of a C rogram by using an assembler language sub routines and even had two C On modern hardware with modern compilers? The world has moved on, and optimizing compilers write better code than humans do. I was the whizz who could get things to work at high speed with assembly language. I did the first multi-axis chemical analysis unit that ran PCR in order to identify HIV in the blood banking system and later improved it with multi-CPU's and 16 axis for DNA analysis. You have to remember that at the time we had dog-slow Intel 8008's. Later I did the poison gas detectors to be used to find those WMD that the liberals claim never existed. These things had to work at extremely high speed because parts per million could disable or even kill you. Almost all "assembly language programmers" these days write a group of subroutines and then simply link these subroutines together. This is very bad practice and actually is much slower than C and I've tested them and know for certain. The assembly program I tested was from a rather famous programmer who developed what I thought as an almost 100% fatal disease. But three years later he is still alive though the only way I can see him living is by getting transfusions pretty often. Because he got ill I was called in and observing his code (and fighting off the gagging) I re-wrote it in C and tested the time of the program. My C was significantly faster. Then I tried two other C compilers and they too gave faster code than his assembly. Now this guy was famous for having the fastest assembly routines around though they had never seen the stuff I did. But the C program took a quarter of the time to write and it was a hell of a lot easier to read in case it needed maintenance or upgrading later. Funny story - the company he worked for needed a programmer after he had to take a medical retirement. They wouldn't hire me because I don't have a degree. And this despite I could redesign their hardware to be much better than it is besides programming. One of the project leaders I worked for got a Nobel Prize and another two Emmy awards plus several engineering awards. They deserved them because they had the original ideas but without the working proof they couldn't have gotten the recognition. |
#113
|
|||
|
|||
program to compute gears, with table
On Wednesday, September 20, 2017 at 1:57:09 PM UTC-7, wrote:
On Wednesday, September 20, 2017 at 12:36:42 PM UTC-7, David Scheidt wrote: John B. wrote: :On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg :wrote: :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. :That isn't true at all. I have definitely improved the speed of a C rogram by using an assembler language sub routines and even had two C On modern hardware with modern compilers? The world has moved on, and optimizing compilers write better code than humans do. I was the whizz who could get things to work at high speed with assembly language. I did the first multi-axis chemical analysis unit that ran PCR in order to identify HIV in the blood banking system and later improved it with multi-CPU's and 16 axis for DNA analysis. You have to remember that at the time we had dog-slow Intel 8008's. Later I did the poison gas detectors to be used to find those WMD that the liberals claim never existed. These things had to work at extremely high speed because parts per million could disable or even kill you. Almost all "assembly language programmers" these days write a group of subroutines and then simply link these subroutines together. This is very bad practice and actually is much slower than C and I've tested them and know for certain. The assembly program I tested was from a rather famous programmer who developed what I thought as an almost 100% fatal disease. But three years later he is still alive though the only way I can see him living is by getting transfusions pretty often. Because he got ill I was called in and observing his code (and fighting off the gagging) I re-wrote it in C and tested the time of the program. My C was significantly faster. Then I tried two other C compilers and they too gave faster code than his assembly. Now this guy was famous for having the fastest assembly routines around though they had never seen the stuff I did. But the C program took a quarter of the time to write and it was a hell of a lot easier to read in case it needed maintenance or upgrading later. Funny story - the company he worked for needed a programmer after he had to take a medical retirement. They wouldn't hire me because I don't have a degree. And this despite I could redesign their hardware to be much better than it is besides programming. One of the project leaders I worked for got a Nobel Prize and another two Emmy awards plus several engineering awards. They deserved them because they had the original ideas but without the working proof they couldn't have gotten the recognition. Tom you are absolutely ****ing awesome. |
#114
|
|||
|
|||
program to compute gears, with table
David Scheidt wrote:
On modern hardware with modern compilers? The world has moved on, and optimizing compilers write better code than humans do. That's the beauty of computers and it is the reason for the insane rate of development of computer capabilities. People write software, and it enables people to write even better software, with less effort. And the next guy using it can be virtually unaware of the previous step and still be hugely benefited from it. And it goes on and on... If this property was transferable to the world of mechanics people would make space crafts in their back yards by now. But even tho engineers and manufacturers can produce an even better hammer, no matter how good it gets, it remains a basic hand tool. So while I love the newest, most expensive, ergonomic, and stylish gear, I'm under no illusion, because I know what I do with it has more often than not been done just as well by my grandfather with a tool from a blown shed filled to the burst limit with rusty old axes... -- underground experts united http://user.it.uu.se/~embe8573 |
#115
|
|||
|
|||
program to compute gears, with table
On Friday, September 8, 2017 at 6:33:18 AM UTC+1, Emanuel Berg wrote:
Hey guys, does this look right to you? Why are you making it so complicated? At http://coolmainpress.com/BICYCLINGHebieChainglider.html you can see how simple I made it in Excel. Nobody on any of my bicycle groups ever had a problem understanding what was going on, or indeed how to change the model to suit even very odd transmission choices. Copies of the Excel sheets (there are more than on the web page) are available on request to andrejute at coolmainpress with the comMERCIAL extension. Andre Jute If you can put it in an algorithm, we can discuss it. Until then it is a hypothesis. |
#116
|
|||
|
|||
program to compute gears, with table
Andre Jute wrote:
Why are you making it so complicated? [...] If you can put it in an algorithm, we can discuss it. Until then it is a hypothesis. It isn't complicated, it is just a bunch of code that implements a very simple (but interesting) formula! It isn't even on the "algorithm" level, really... By the way, I've made some mostly cosmetic changes to the code that produces a better-looking and more pedagogical output. ;; This file: http://user.it.uu.se/~embe8573/emacs-init/bike.el ;; ;; eval me: ;; (test-program) ;; ;; BSD: 622 mm ;; ti 23 mm ;; wheel: 622 + 23 = 645 mm ;; roll-out = chainring/sprocket * wheel ;; ;; chainring sprocket roll-out ;; ;; 34 25 2688.8 ;; 34 23 2922.6 ;; 34 21 3201.0 ;; 34 19 3537.9 ;; 34 17 3954.1 ;; 50 25 3954.1 ;; 50 23 4298.0 ;; 34 15 4481.4 ;; 50 21 4707.3 ;; 34 13 5170.8 ;; 50 19 5202.8 ;; 34 12 5601.7 ;; 50 17 5814.9 ;; 50 15 6590.2 ;; 50 13 7604.1 ;; 50 12 8237.8 (require 'cl-lib) (defun test-program () (let ((chainrings '(34 50)) (sprockets '(12 13 15 17 19 21 23 25)) (bsd 622) (tire 23) ) (print-roll-outs chainrings sprockets bsd tire) )) (defun roll-out (chainring sprocket bsd tire) (let*((pi 3.14159265) (circum (+ (* bsd pi) tire)) (roll-out (* (/ chainring sprocket 1.0) circum))) (list chainring sprocket roll-out))) ;; (roll-out 34 25 622 23) (defun all-roll-outs (chainrings sprockets bsd tire) (let*((gears (cl-loop for c in chainrings append (cl-loop for s in sprockets collect (roll-out c s bsd tire) ) ))) (cl-sort gears #' :key #'cl-third))) ;; (all-roll-outs '(34 50) '(12 13 15 17 19 21 23 25) 622 23) (defun print-roll-outs (chainrings sprockets bsd tire) (let ((out-buffer (get-buffer-create "*gears*"))) (with-current-buffer out-buffer (erase-buffer) (insert (format " BSD: %3d mm\n" bsd) (format " ti %3d mm\n" tire) (format "wheel: %d + %d = %d mm\n" bsd tire (+ bsd tire)) "roll-out = chainring/sprocket * wheel\n\n" " chainring sprocket roll-out\n\n") (let ((ros (all-roll-outs chainrings sprockets bsd tire))) (cl-loop for ro in ros do (let ((c ( car ro)) (s ( cadr ro)) (r (cl-caddr ro))) (insert (format "% 9d% 11d% 13.1f\n" c s r)) )))) (pop-to-buffer out-buffer) )) -- underground experts united http://user.it.uu.se/~embe8573 |
#117
|
|||
|
|||
program to compute gears, with table
On Wednesday, September 20, 2017 at 2:15:18 PM UTC-7, Doug Landau wrote:
On Wednesday, September 20, 2017 at 1:57:09 PM UTC-7, wrote: On Wednesday, September 20, 2017 at 12:36:42 PM UTC-7, David Scheidt wrote: John B. wrote: :On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg :wrote: :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. :That isn't true at all. I have definitely improved the speed of a C rogram by using an assembler language sub routines and even had two C On modern hardware with modern compilers? The world has moved on, and optimizing compilers write better code than humans do. I was the whizz who could get things to work at high speed with assembly language. I did the first multi-axis chemical analysis unit that ran PCR in order to identify HIV in the blood banking system and later improved it with multi-CPU's and 16 axis for DNA analysis. You have to remember that at the time we had dog-slow Intel 8008's. Later I did the poison gas detectors to be used to find those WMD that the liberals claim never existed. These things had to work at extremely high speed because parts per million could disable or even kill you. Almost all "assembly language programmers" these days write a group of subroutines and then simply link these subroutines together. This is very bad practice and actually is much slower than C and I've tested them and know for certain. The assembly program I tested was from a rather famous programmer who developed what I thought as an almost 100% fatal disease. But three years later he is still alive though the only way I can see him living is by getting transfusions pretty often. Because he got ill I was called in and observing his code (and fighting off the gagging) I re-wrote it in C and tested the time of the program. My C was significantly faster. Then I tried two other C compilers and they too gave faster code than his assembly. Now this guy was famous for having the fastest assembly routines around though they had never seen the stuff I did. But the C program took a quarter of the time to write and it was a hell of a lot easier to read in case it needed maintenance or upgrading later. Funny story - the company he worked for needed a programmer after he had to take a medical retirement. They wouldn't hire me because I don't have a degree. And this despite I could redesign their hardware to be much better than it is besides programming. One of the project leaders I worked for got a Nobel Prize and another two Emmy awards plus several engineering awards. They deserved them because they had the original ideas but without the working proof they couldn't have gotten the recognition. Tom you are absolutely ****ing awesome. (I once silenced a crowd of 50 people at the Tivoli in Copenhagen. But for two gasps. Can you do that?) |
#118
|
|||
|
|||
program to compute gears, with table
On Wednesday, September 20, 2017 at 3:15:40 PM UTC-7, Emanuel Berg wrote:
David Scheidt wrote: On modern hardware with modern compilers? The world has moved on, and optimizing compilers write better code than humans do. That's the beauty of computers and it is the reason for the insane rate of development of computer capabilities. People write software, and it enables people to write even better software, with less effort. And the next guy using it can be virtually unaware of the previous step and still be hugely benefited from it. And it goes on and on... If this property was transferable to the world of mechanics people would make space crafts in their back yards by now. But even tho engineers and manufacturers can produce an even better hammer, no matter how good it gets, it remains a basic hand tool. So while I love the newest, most expensive, ergonomic, and stylish gear, I'm under no illusion, because I know what I do with it has more often than not been done just as well by my grandfather with a tool from a blown shed filled to the burst limit with rusty old axes... Actually most of the high level languages that they use for artificial intelligence are wide open for hacking. Remember that rather than improve your Windows so it can't be hacked you have to buy a separate program that supposedly cuts the hackers off at the pass. So every program that is written in high level languages is a chance for some unethical hacker to control something that is yours. When I tried to explain that to Tesla they got angry and said, "I don't think there's any reason for us to talk anymore". |
#119
|
|||
|
|||
program to compute gears, with table
On Wednesday, September 20, 2017 at 5:19:34 PM UTC-7, Doug Landau wrote:
On Wednesday, September 20, 2017 at 2:15:18 PM UTC-7, Doug Landau wrote: On Wednesday, September 20, 2017 at 1:57:09 PM UTC-7, wrote: On Wednesday, September 20, 2017 at 12:36:42 PM UTC-7, David Scheidt wrote: John B. wrote: :On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg :wrote: :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. :That isn't true at all. I have definitely improved the speed of a C rogram by using an assembler language sub routines and even had two C On modern hardware with modern compilers? The world has moved on, and optimizing compilers write better code than humans do. I was the whizz who could get things to work at high speed with assembly language. I did the first multi-axis chemical analysis unit that ran PCR in order to identify HIV in the blood banking system and later improved it with multi-CPU's and 16 axis for DNA analysis. You have to remember that at the time we had dog-slow Intel 8008's. Later I did the poison gas detectors to be used to find those WMD that the liberals claim never existed. These things had to work at extremely high speed because parts per million could disable or even kill you. Almost all "assembly language programmers" these days write a group of subroutines and then simply link these subroutines together. This is very bad practice and actually is much slower than C and I've tested them and know for certain. The assembly program I tested was from a rather famous programmer who developed what I thought as an almost 100% fatal disease. But three years later he is still alive though the only way I can see him living is by getting transfusions pretty often. Because he got ill I was called in and observing his code (and fighting off the gagging) I re-wrote it in C and tested the time of the program. My C was significantly faster. Then I tried two other C compilers and they too gave faster code than his assembly. Now this guy was famous for having the fastest assembly routines around though they had never seen the stuff I did. But the C program took a quarter of the time to write and it was a hell of a lot easier to read in case it needed maintenance or upgrading later.. Funny story - the company he worked for needed a programmer after he had to take a medical retirement. They wouldn't hire me because I don't have a degree. And this despite I could redesign their hardware to be much better than it is besides programming. One of the project leaders I worked for got a Nobel Prize and another two Emmy awards plus several engineering awards. They deserved them because they had the original ideas but without the working proof they couldn't have gotten the recognition. Tom you are absolutely ****ing awesome. (I once silenced a crowd of 50 people at the Tivoli in Copenhagen. But for two gasps. Can you do that?) Stop walking about naked. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table. | Marc[_2_] | UK | 6 | November 25th 09 10:29 AM |
Is Frame spacing for 7 Gears = to 5 Gears? | [email protected] | Techniques | 4 | April 13th 09 12:28 AM |
Now that's a table! | Bob Downie | UK | 4 | April 16th 07 06:23 PM |
Inversion Table | Bill B | Recumbent Biking | 3 | October 22nd 04 03:59 AM |
Gears gears gear..what to choose? | bstephens | Techniques | 8 | February 18th 04 04:06 PM |