Friday, June 5, 2015

Digest for comp.lang.c++@googlegroups.com - 9 updates in 4 topics

tHRINASSOMAO <assthrinaxodn@bitch.nyikos>: Jun 04 11:03PM -0400

===============
>BREAKING GODAMN NEWS
====================
 
ON JUNE 1ST, 2015, THRINAXODON LED A PARTY OF FOSSIL HUNTERS TO THE
TRANS-ANTARCTIC MOUNTAINS, AND PROMPTLY UNCOVERED HAND-AXES, AND A HUMAN
SKULL, AS WELL AS CHARCOAL AND A DEAD PLACODERM WITH SPEARPOINTS
ENLODGED IN IT, DATING BACK TO THE DEVONIAN.
 
THE RESULTS WERE PUBLISHED IN THE INFLUENTIAL JOURNAL /Science/, AND HAS
FINALLY PROVEN THAT DARWINISM IS, AND ALWAYS HAS BEEN, A SHAM.
 
RICHARD DAWKINS WAS SENT TO PRISON FOR THIS STUNNING DEVELOPMENT, AND
DARWIN'S REMAINS BURNED AND DUMPED IN THE OCEAN.
 
THRINAXODON ENJOYS HIS COMEBACK AS A WORLD-RENOWNED SCIENTIST GLADLY.
HIS ENEMIES SUCH AS THE SMITHSONIAN, PETER NYIKOS INSTITUTE AND
TALK.ORIGINS WERE ROUNDED UP AND SENT TO MENTAL INSTITUTIONS.
 
I`M BACK!
 
=========================
HELL YEAH!
"Lőrinczy Zsigmond" <nospam@for.me>: Jun 05 07:37AM +0200

It's just a provocation from a brain-dead troll
that should be ignored, innit?
Vir Campestris <vir.campestris@invalid.invalid>: Jun 05 09:46PM +0100

On 05/06/2015 06:37, Lőrinczy Zsigmond wrote:
> It's just a provocation from a brain-dead troll
> that should be ignored, innit?
 
In future please do. Don't post it back.
Paavo Helde <myfirstname@osa.pri.ee>: Jun 05 02:26PM -0500

Paul <pepstein5@gmail.com> wrote in
 
> Uncompression is uniquely determined by the constraint,
> given in the comments, that inputs only contain chars that are letters
> of the English alphabet.
 
OK, I had overlooked that. Yes, if each input byte contains less than 6
bits of information, then it can always be compressed into a shorter
length.
 
> in different ways. I don't understand why this would be any type of
> problem -- we would simply have a non-injective function. Nobody said
> that we wanted to uncompress strings.
 
In that case 'return "";' should be the fastest implementation.
 
 
> If you believe that it sometimes results in a runtime error, please
> can you give inputs that cause incorrect output? If you believe that
> this is inefficient, please can you explain why?
 
No, I somehow assumed all bits in the input are used, and if it were so
then this statement would make it impossible to have lossless
compression.
 
Cheers
Paavo
Vir Campestris <vir.campestris@invalid.invalid>: Jun 05 09:45PM +0100

On 05/06/2015 19:51, Paul wrote:
> Uncompression is uniquely determined by the constraint, given in the comments, that inputs only contain chars that are letters of the English alphabet.
 
So you've only got 52 possible input characters? Or is it 26?
 
Surely the first stage is to throw away all the spare bits. You only
need 6, and that leaves you some spares to mean things like "There
follows a 4 bit repeat count" or such. Unless of course one of the
requirements is that the output should still be printable.
 
But I wonder why you don't just use a standard compression, such as zip.
If it does need to be printable run that through base64.
 
Andy
"Skybuck Flying" <skybuck2000@hotmail.com>: Jun 05 04:21PM +0200

Hello,
 
807 megabytes of C/CPP source code was leaked onto the internet, I want to
analyze/explore it real fast so an much desired update to Skybuck's ODE tool
was needed (possibly the fastest source code browser and editor in the world
! =D)
 
So nice handy new features:
 
1. C/CPP highlighting (next to the already existing delphi/pascal
highlighting)
2. Super fast source code browser thanks to key up, key down support in tree
view.
 
The rar file can be downloaded from here:
 
http://www.skybuck.org/Applications/SkybuckODE/
 
I think this is the first release of mine which has the bugs fixed...
version 0.09 had a bug in the rippling... let for an exercise for there
reader, version 0.10 was never released ?
 
So version 0.12 is your first chance to get your hands on some great
software.
 
Most of the greatness comes from TSynEdit/TSynCPP/TSynPas and
TVirtualTreeString.
 
And some handy dandy Skybuck code for folder rippling and so forth.
 
Unfortunately this will be a "closed source" release cause I have no time to
bother with uploading it to some versioning system like sourceforge or
whatever.
 
However any interested folks can send me a mail if you want the latest and
greatest source code. (It was compiled by using Delphi XE8 and GetIt build
in feature to download embar... TSynEdit and TVirtualTreeString, so far it
seems to work quite nicely.
 
However the application might sometimes produce an exception when it's
terminated... not sure if it will how up or if it's a problem or what the
cause of it is. so far it doesn't seem to severe... not bad for freeby ! ;)
 
Now hurry up... download it so you can enjoy fast source code browsing...
 
And here are some last hints for the source code leak:
 
ots
 
enozegar
 
^ read it backwards and google it and you might hit upon a pot of gold ! =D
 
Bye,
Skybuck =D
"Skybuck Flying" <skybuck2000@hotmail.com>: Jun 05 10:41PM +0200

What I find lacking of this/my tool is the inability to find stuff,
declarations, vars, fields, structs, etc.
 
Maybe some day I can add some pascal/c/c++ parsers to it which could be used
for finding stuff.
 
That would make this tool even more usefull for quick browsing/examining
files of source code.
 
(Fortunately, meanwhile I find a nice rainbow around the pot of gold which
sweetens it :))
 
Bye,
Skybuck.
jt@toerring.de (Jens Thoms Toerring): Jun 05 08:39PM


> for (size_t i = strlen (str) - 1; i >= 0; i--){
> ...
> }
 
Since size_t is an unsigned integer type (what type exactly
doesn't matter, the 'unsigned' bit is the important thing)
it will "wrap around if the value is 0 and you subtract 1
(or any other number), thus resulting in a value that is
still larger or equal to 0 (in the case of subtracting 1 the
result is the largest value that can be stored in a size_t).
So this is indeed an infinite loop (unless there's something
in the body of the loop that gets you out of it, of course).
 
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 05 09:41PM +0100

On 05/06/2015 19:25, Doug Mika wrote:
 
> for (size_t i = strlen (str) - 1; i >= 0; i--){
> ...
> }
 
The solution is the arrow idiom but can you spot the arrow?
 
#include <iostream>
#include <string>
 
int main()
{
std::string str = "Hello, World!";
for (size_t i = str.size(); i--> 0;)
{
std::cout << str[i];
}
std::cout << std::endl;
}
 
/Flibble
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: