Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

Comment Minotaur in a Mushroom Maze (Score 1) 515

That was the name of a book serialized in Analog in the mid 70's. Part of the story involved a physicist writing FORTRAN code to calculate the magnetic field inside a cyclotron(?). Since I wanted to be a physicist I went to the library and got a book on FORTRAN, then a book on BASIC. A bit later I read about computers using aa language extension called to calculate curvatures from metrics for General Relativity. I couldn't get access to a FORMAC compiler, but did get access to REDUCE, so I learned Lisp along the way. Then Pascal. Forth when I got my C-64, Then when I got my ST Modula-2 then C. I remember Mark Williams C and my first debugger, along with my first exposure to Emacs via Microemacs. What a nasty way to pervert a young adult! ( Emacs that is. )

Comment Re:Good for them (Score 1) 474

Sure. And if you had a magic well to pour funding into the economy that would be nice, but for the most part being able to put money into the economy involves pulling the same money out of the economy through taxes.

That does not necesssarily have to be the case.As of now the Fed has two jobs: 1) Taking old money out of circulation and replacing it with new money, 2) Loaning money to banks so that they can lend it to you. The second is hopw money comes into being.

Since the economy is constantly growing and we are introducing things of value, we need to introduce new money into the system. For example iof the total value of goods in the US was $40trillion and went up to $41trillion, we would need to print one trillion dollars to keep the amount of cash sync with the amount of goods.

So instead of introducing that extra cash vid process 2 above, estimate how much more cash you want introduced by estimating the increase in value. Something like (GDP-annual consumption)*fudge_factor. Since it's tied to excess goods produced it's not inflationary. What is more doing something like this causes everyone to have an incentive in the country doing well economically.

Comment Re:File versioning and backup flags (Score 2) 484

The VMS versioning system was more of a kludge then something elegant.

For one thing, it versioned intermediate files too. Causing people to run "purge" (IIRC) all the time For another thing, if you wanted to keep an old version of a file, fine, but it might x.x;11 and the present version is x.x;40. It is far easier to find if you simple copy the file into another name before making changes. If you want to keep versions of several files, there exist several programs that do that. We call them version control systems.

Comment Re:Am I The Only One Who Does Not Know? (Score 0) 68

Metaprogramming comes in two forms:metaprogramming, and metaobject programming.

Metaobject programming is writing code that modifies the way objects act. A version of this is aspect-oriented programming (which you may have heard of), which is supposed to be safer. An example of this would be to modify the way methods are called. For example, you write to a file the name of a method and it's parameter when it's called. Something like that would be useful for writing test scripts.

The best example of metaobject programming would be Ruby on Rails, where derfinition files are read and a program generates the objects that are represented in the database as well as the db tables, queries etc.

Metaobject programming is considered very dangerous, because if a moron is using it he can rewrite object behavior to the point where you get some very unexpected behaviour.

Metaprograming, is simply writing a program that writes programs.

The simplest version of metaprograming are macros.

An interesting and easily understood paper, "Aspecet-Oriented Programming Kiczales et al", he desceribes having a set of routines which manipulate images. Doing things like and-ing and xor-ing the images. The problem arises when you have to do a lot of these operations at once, it becomes very slow. The trick is that they wrote Lisp code which generated C code. When they wrote code composing multiple filters, the Lisp would analyse it and merge loops before generating the C code. In that way he was acle to significantly reduce runtime.

Templates automatically generate code so are automatically metaprograming, but the term means something more general allowed mostly by specialization. Imagine some template class method Foo::bar which is implemented in some way, but that for the class Quick the usual way is slower then another way then you can write Foo::bar{faster way} and For::bar{standard way

. When generating the template code,if the class is Quick it will called the specialized version otherwise it will call the standard technique. This allows recursion to terminate, So the template system happens to be a turing complete system. you can write programs with templates that are run during compile time. That is template metaprograming.

Usally TMP is used to generate libraries that are more more efficient, smaller etc... , For example a very simple TMP is std::copy which simply copies objects, but the specialization std::copy will be specialized to call memcpy which can be much faster then the object copy.

Comment Stupid and bad coder. (Score 1) 68

That just just it. I remember Alexander Alexandrescu talking about such stupidity on Usenet in the mid90's. The code without a doubt is complex. slow and resource hogging since you use the compiler as an interpreter. Just a way of wasting watts ( the power it takes the computer to run ). No serious professional programmer would even try to attempt such a thing and there is really no reason to. It also flies in the face of things that Stroustrup and Sutter have been saying at conferences like CppCon2014 to keep things simple. I also remember Scott meyer making a joke about someone noticing the template system being turing complete.

Slashdot Top Deals

As you will see, I told them, in no uncertain terms, to see Figure one. -- Dave "First Strike" Pare

Working...