Slashdot Mirror


User: tlolczyk

tlolczyk's activity in the archive.

Stories
0
Comments
25
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 25

  1. Re:Hexcode on Slashdot Asks: How Did You Learn How To Code? · · Score: 1

    I believe it was called the COSMAC ELF the first computer being published in Popular Electronics about six months after the Altair 8008.

  2. Minotaur in a Mushroom Maze on Slashdot Asks: How Did You Learn How To Code? · · Score: 1

    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. )

  3. Re:Bought a ZX80, and a copy of Sync magazine on Slashdot Asks: How Did You Learn How To Code? · · Score: 1

    ATL wasn't so bad it was based on a template trick first mentioned in Barton and Nackman, and then brought to light in a Cope article in C++Report. I did something similar with Corba CCM objects, but Corba fell out of favor before I finished.

  4. Re:Good for them on Dutch City To Experiment With Paying Citizens a "Basic Income" (theguardian.com) · · Score: 1

    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.

  5. Re:Why Version Control is Important on Lessons From Your Toughest Software Bugs · · Score: 1

    There were all sorts of SCM's available then.

  6. So where is this years GrepCon and BashCon? on Lennart Poettering Announces the First Systemd Conference · · Score: 2

    Two utilities that are much more important then systemD. I really try to. if not like systemd, at least get along with it. yet the more time goes by the more negative my opinion gets. It really reminds me off all the problems we went through with pulseaudio.

  7. Re:GRR on Han Solo To Get His Own Star Wars Movie Prequel · · Score: 1

    Then go Machete order, or at least go with The Phantom Edit.

  8. Re:SOM and WPS on Ask Slashdot: If You Could Assemble a "FrankenOS" What Parts Would You Use? · · Score: 1

    SOM would be cool. But hey even COM would be better then dbus.

  9. Re:File versioning and backup flags on Ask Slashdot: If You Could Assemble a "FrankenOS" What Parts Would You Use? · · Score: 2

    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.

  10. Re:Am I The Only One Who Does Not Know? on Clang Plays Tetris -- Tetris As a C++ Template Metaprogram · · Score: 0

    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.

  11. Re:Is it allowed? on Clang Plays Tetris -- Tetris As a C++ Template Metaprogram · · Score: 0

    Does that include this?

  12. Re:C++ metaprogramming is just like functional pro on Clang Plays Tetris -- Tetris As a C++ Template Metaprogram · · Score: 1

    C++ TMP is turing complete and has no state. So yes it is functional. The point is not to write games though, but to write better tuned library code. I can only guess at the illicit substances the person doing this was ingesting.

  13. Stupid and bad coder. on Clang Plays Tetris -- Tetris As a C++ Template Metaprogram · · Score: 1

    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.

  14. Re:Really ? on First Human Colonies Should Be Among Venus' Clouds · · Score: 0

    Well high enough in the atmosphere it will be at a better temperature. Still a lot of nasties in it though.

  15. Atomospheric toxins. on First Human Colonies Should Be Among Venus' Clouds · · Score: 0

    Aren't there toxins in the atmosphere, such as methane and formaldehyde ( to name just two ) that make it problematic?

  16. Re:Kinda similar ... on Ask Slashdot: What To Do With Empty Toner Cartridges? · · Score: 0

    You do realize there are places that will refurbish your cartridges for half the price. Buy two cartridges when you buy the printer. Then when a cartridge runs low send it out to be refurbished. When the next one wears out, refill it yourself. It will do decent day to day printing but not professional printing. Alternate the two cartridges professionally rebuilt, sending one out to be refilled when it runs dry.

  17. Of course refill. on Ask Slashdot: What To Do With Empty Toner Cartridges? · · Score: 0

    There are other parts that wear out. Wipers and things like that, but if you do a half decent job of just putting in toner, the copies should be good enough for day to day printing ( things like blotches may show ). Save the good cartridges or the professionally refilled ones ( where they replace the other wearable parts ) for when yolu want good looking print.

  18. Re:Yes. on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: 0
    Sorry, I should learn to preview my stuff before submitting.

    std::vector<bool >

  19. Re:Yes. on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: 0

    std::vector

  20. Re:Yes. on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: 0

    Then why didn't they? Well for one thing they spent so much time on writing and getting _dbus_get_first_of_list _dbus_get_next_of_list _dbus_get_previous_of_list ( or whatever they called them ) that they didn't want to get rid of them. Second they spent too much time using and writing these procedures to think about what the most efficient way is. This is not to mention lines like MyElement *e=(MyElement *)list->data; Which require a copy of a pointer to e. A few extra instruction. Of course the single most important aspect of this. DBus is a critical program for linux. A lot of other programs use it, Inefficiencies reverberate through the whole system. This is one application that you want to get as fast as you can So why didn't they?.

  21. Re: C++ is never the right tool on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: 1

    C++ is the best language for garbage collection because C++ makes so little garbage.

  22. Yes. on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: -1, Flamebait

    Asking here is just stupid. you'll just get a bunch of idiots telling you why there language is better. Unless your problem requires something like Prolog, C++ should be able to handle it. I just pointed out that dbus written in C++ would be much faster then the C version: simply by avoiding the cache hits. But be carefull, use C++14, it's not your gramps C++ ( ie pre C++98 ). Tio catch up read a couple of books: Scott Meyer's Modern Effective C++ and Bjarne Stroustrup's Tour of C++. Also download some talks about C++ from youtube in particular from 2014 conferences. In particular those by Stroustrup, Meyers, Herb Sutter and Nicolai Jousitis. I just watch them when I make breakfast. Then ask about the libraries you need.

  23. A recent experience. on Knowing C++ Beyond a Beginner Level · · Score: 1

    I had to look at the code for dbus. I found some "interesting" things. The first is DBusString and DBusRealString. One is effectively a String class. The other is a wrapper for the first class, that for some reason hides it's content. The second thing is something called something like DBusList, a linked list of generic pointers.

    I can't say for sure, but I suspect that I could have replaced large chunks with C++ been slightly more efficoent. Just by a few simple tweaks which were obscured by all the extra verbiage and need to make sure such "localized" libraries were correct.

    Hell, as I started to write this, I realized one major inefficiency. In C++ it would have been written using "vectors" contiguous array that are resizable instead of linked lists. This would make a big difference. Advancing the iterator to a linked list involves dereferencing a pointer. Advancing the vector iterator involves incrementing a pointer. A major difference as the majority of the time the link list increment will involve a cache hit.

    So it seems a C++ version of dbus would be much faster then the C version.

    As for readability. If you insist on readablity for all "programmers" then you wind up with the piece of shit that is the Google C++ coding standard. An intermediate C++ programmer will be able to understand, a highly intelligent beginner would. Someone who indulges in stupidity would not. If you see something like MyClass(MyClass &&my_class_in) and change it without knowing what it does, assuming it is wrong ( nevermind that it does compile ) you will get into trouble.trouble. I have a simple philosophy, I use any tool in C++ to organize the software as well as possible. Everuthing else follows from that.

  24. Efficiency is still important. on Knowing C++ Beyond a Beginner Level · · Score: 1

    Yes writing in C++ ( or even C ) is more expensive, but programmer cost is no longer the biggest factor in cost. Every cycle more needed by a program needs so many more milliwatts. Every cycle more generates so many calories which require so many milliwatts of airconditioning. Add enough and it really costs a lot. If you are writing for Android, it may mean that the Galaxy Tab 3 is not good enough to run your code, which means so many customers lost. Etc. It really has always been this, Moore's law just did a good job of obscuring the fact.

  25. How to become a master? on Knowing C++ Beyond a Beginner Level · · Score: 1

    1) Read all of Scott Meyer's books. Not all of the rules in the old books apply anymore, but a lot still do, and they are not covered in his new books. 2) Go to https://www.youtube.com/result... pick out the videos you like and especially focus on Bjarne Stroustrup, Scott Meye, Herb Sutter, Nico Jousittis. Watch them. Look for other videos ( believe me there are more then you can watch in a lifetime unless you're a C++ superwaonk ) from other conferences. 3) Be familar with the newer concepts: variadic templates, perfect forwarding, move semantics, and concepts (lite). 4) Of course you have to have done some programming touching these things, but Scott Meyer's IIRC has never written programs. Finally, if there is something that needs to be done: for example, writing a specialized template library; and you balk because you do not have the basic knowledge needed to write that, then you are not a master.