@grahamdearsley
Forum Replies Created
-
AuthorPosts
-
Remember, we ARE in fanticy land here 😂
Well the rest of the UK would be hugely better off financially, the only real cost would be the rebuilding of Hadrian’s wall 😁
The sad and dangerous thing is she is selling a fantasy. Have a look at this:
https://www.deliveringforscotland.gov.uk/scotland-in-the-uk/public-spending/
Where is an independent Scotland going to find the money to make up the short fall ?
The SNP keeps saying that Scotland would rejoin the EU but the EU keeps saying its not interested in an independent Scotland and all the border problems that would involve.
The EU is also not interested in replacing Scotlands UK grant with an EU one.
I haven’t even mentioned all the institutions Scotland would have to build and finance along with the matter of WHAT money because it won’t be the pound.
I would not presume to tell the scots what they can’t do but if they follow Sturgeon it will be straight off a cliff.
Off topic again but the Atari tape system was quite unusual too.
The datacorder was analogue/digital. The Poky sound chip sent analogue signals out on a dedicated wire, to be recorded, but the return signal was first converted into digital and then sent back over the serial i/o bus.
The tape file system was unusual too, because it had one that it didn’t use. If you named a tape file then you had to load it with that name but no name was just as good. I think they may have been considering something like the micro drive but in the end the computer only got control over play/stop, not ff/rw that would have been needed.
Another thing was you could boot the computer from tape, that was unusual because most other micro’s couldn’t boot off anything.
Ah yes, the micro drive, complete with the extra stretch tape 😁
Another C++11 type is the… tuple !
A tuple is a template type so the syntax includes the extra type data in angle brackets like so:
tuple<int, string, double> example
I can also follow the declaration with a braced initialiser list if I like.
A tuple can contain almost any type but once it is declared its size is fixed.
Did you know that Visicalc was avaliable for the Atari 800, almost as soon as the computer was released ?
Wordstar was avaliable too, and yet still almost no one brought “An Atari” for their office 😁
Another nugget from C++11, the list initialised function return value.
If a functions return type is a class type like <vector> then I can return a braced list of values, like so:
vector<string> example()
{
return{string1, string2, string2}
}
The returned <vector> is initialised with however many strings I return so I can return ANY number.
Suppose it could come in handy one day 😀
I got around my problem of class instances needing a unique name.
A class instance DOES need a unique name and it can only be assigned by a literal but the members of a vector only have a type and an index.
I can have class called “sample” and an instance of it called “sample1”, I can then have a vector called “test” that contains objects of type “sample”. I can now push_back “sample1” onto “test”, change the contents of “sample1″, and push_back again.
I can do the above as many times as I like and then access the class objects by their vector index number, like so:
class sample
{int value1 = 10};
vector<sample> test;
sample sample1;
test.push_back (sample1);
sample1.value1 = 20;
test.push_back (sample1);
cout << test[0].value1<<” “<<test[1].value1;
Prints 10 20 and that’s just what I want 😁
And in case you didn’t already know, size_t is an implimentation specific type that is defined on a per system basis, mostly based on the word size of the hardware, its there for portability reasons.
Many of the std library functions return objects of type size_t, in the previous example the <string> member function “size()” returns size_t type.
Had a look Ed, quite good.
I just came across another “helpful” feature of C++11 that I can’t see a use for, decltype.
We have “auto” that let’s the compiler determine types for us and “decltype” seems to be a less flexible way of doing nearly the same thing. Here is an example:
string s = “Hello”;
decltype (s.size()) length = s.size();
In the above example “lengeth” gets the type size_t . The reason is that decltype evaluates the expression s.size() to determine its return type but it does not actually call it.
I get exactly the same result with:
auto length = s.size();
Why the need for another system determined type ?
I have the Samsung Smart call app active on my phone and it attempts to identify any numbers that are not in my contact list, its usually pretty good but it failed to find a match with this number, Google is a blank too.
Just been subjected to a vaccine scam but I can’t figure out why.
I am booked in for my second jab on Thursday but yesterday morning I got a call from an indian woman ( not unusual) who said my appointment had been canceled and I would have to attend on Sunday at 7.10 instead. The woman sounded in a great hurry to get off the phone and the call was from a mobile but I thought no more of it till the afternoon when I got a text from the vaccine centre telling me that any call I may have got was a scam and I should attend my appointment as originally booked.
Now what could the point of that be ?
I have to wonder about PC cases with a window in the side too, if that doesn’t let RFI escape I don’t know what does.
I came across an annoying situation in Atari BASIC many many years ago and it still seems to be there in C++.
In BASIC I wanted to dimension a string with the name of an input string, but no, the name of a string must be a literal.
It would also have been nice to be able to have name$(1), name$(2), etc, but no again, the name MUST be a plain literal.
Now I come up against the same thing in C++. I define a class and then I want to create an unknown, at compile time, number of instances of it but I can’t because the name of the instance must again be a literal.
In Atari BASIC I gave up and resorted to a disk file but all this time later I had hoped that C++ could do better.
Unless it can ?
I won’t be writing any 3D games for some time yet but Visual Studio is the recommended IDE for Unreal Engine 4 and its producers have written VS intellisense plugin’s for it so you get on the fly error highlighting during the editing phase.
Microsoft also recommend UE4 as the default 3D engine for VS and they provide support material too, including installation and setup guides.
The more I look into C++ class inheritance the less I can see me using it. If I were writing a library class that was going to be used by other people then the tight encapsulation that higherarchys can provide would be very useful. But i’m not 😁
Classes are fine and even friends of classes are fine but derived classes seem to be a lot of effort for not much gain in the sort of programs I am likely to write.
I think that Boris really HAD to have a feasibility study, at least. Before the last election, and even before the Brexit vote, Boris had said he was strongly in favour of the project (and I think he still is) but unless the result of the study says we can have a tunnel for tuppence I don’t think it will go any further.
Its amazing that almost no one mentions that mutex is short for mutually exclusive, just knowing that explains a lot about what they are.
The Windows internals books do actually tell you what mutex stands for, ONCE, but it is buried deep in a chapter that starts out being about something else so its easy to skip over (I did, at least 3 times).
There are indeed a fair few questions just asking for answers to home work and lots of them do not bother posting what they have tried so far.
Those questions do not deserve the time of day but if you really ARE a beginner then you may not know how to frame a question.
The self satisfied members of Stack Overflow could take that into account.
-
AuthorPosts
