The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Isn't that how any language implemented variable length strings before C arrived and "invented" NUL termination? (In conflict with long established international standards... If you really need a string terminator character, there is one in the ASCII / ISO646 character set; it is not NUL!)
For something like forty years, the common way of serializing mixed type data has been to take it one step further, adding a (binary) tag prefix, for a TLV (tag - length - value) format. Skipping through the fields of an unordered record is simple and quick.
One disadvantage is that if you run on a 64 bit CPU, and insist on 64 bit tag and length, then you have a 16 byte overhead per value. There are standards for packing both tag and length, not unlike UTF-8 encoding, so that a "small" tag and short length take up only one byte each - at the expense of more complex code when the small tag or length range is exceeded.
And, talking about NUL terminators: One standard way to terminate list of a variable number of fields (including a variable length array) is by a sentinel element of tag = 0, length = 0. If you want super-efficient code and use a packed format, one byte for each, you can test both as a single short to see if it is zero, in single instruction.
Through the years, there has been a few T-shirts I regret that I never bought. One had a great pi symbol at the front and the first 2000 digits of pi on the back. If I see anything like that again, I would buy it with without hesitating even a second.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
I made a widget for my employer's website - it contains something like 2700 quotes that (of course display randomly) sourced from all sorts of people and place. This one should be well appreciated here:
If you are allergic to a thing, it is best not to put that thing in your mouth, particularly if the thing is cats. - Lemony Snicket
Good one! One of the articles I posted here a long, LONG time ago was a fortune viewer. I now have almost 2000 of them and I added that one to the list. Thanks. Several of the entries are statements made by users here.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
Google "Balboos" and click on "Balboos' Contemplation's & Such" (this route to improve SEO - this choice is almost always on top).
On the right side are Quotes I made up over the years. I would love to become famous for them and be able to do the (paid) Talk-Show Circuit". They change as you go down the list - everyone should find some "blah" and other better than "blah".
Or, if you looking for a direct link, below is "Ravings en mass
You made me dig up that twenty year old 'fortune' program, with its 55000+ lines fortune collection, finding a few season related pearls. Like this one, attributed to Dave Barry:
Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice. In the old days, it was not called the Holiday Season; the Christians called it "Christmas" and went to church; the Jews called it "Hanukka" and went to synagogue; the atheists went to parties and drank. People passing each other on the street would say "Merry Christmas!" or "Happy Hanukka!" or (to the atheists) "Look out for the wall!"
I didn't find the one I was sure was there: Again, Dave Barry talking about the perfect gift - the Christmas fruitcake, so heavy that you would need a chopper to cut it. But you don't need to; none ever eats that stuff, but store it until next Christmas for use as a gift to another relative ...
I am sure that was in some Fortune database, but apparently not in the one I saved. If any of you dig up another old fortune base and find it in there, please tell me!
Another food related cookie (some serve it for Christmas):
Yeah, if it looks like a duck, and walks like a duck, and quacks like a duck -- shoot it.
If any of you dig up another old fortune base and find it in there, ple
My table was not dug up. I would periodically go to Google famous people for their quotes and daisy chain from their to other related persona. Each one type in by hand if selected.
I had some (self-imposed) constraints since this was on a page for all employees to view/use/enjoy/ignore:
Nothing political in any partisan sense (comments about politics, in general, OK. The source could be Ronald Reagan or Vladimir Lenin).
Nothing religious in for any particular religion (although sources could be biblical, Talmudic, Vedic, Fortune Cookies, etc).
I had to like it.
Not a fortune cookie, but inspirations and chuckles.
You can always tell the Christmas season is here when you start getting
incredibly dense, tinfoil-and-ribbon- wrapped lumps in the mail. Fruitcakes
make ideal gifts because the Postal Service has been unable to find a way to
damage them. They last forever, largely because nobody ever eats them. In
fact, many smart people save the fruitcakes they receive and send them back
to the original givers the next year; some fruitcakes have been passed back
and forth for hundreds of years.
The easiest way to make a fruitcake is to buy a darkish cake, then pound
some old, hard fruit into it with a mallet. Be sure to wear safety glasses.
-- Dave Barry, "Simple, Homespun Gifts"
Any recent ubuntu, and probably most other linuxes....
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
Your description makes me realize just how much I'm not a professional pastry chef.
Using, instead, the scientific method, I inspected a fruitcake and determined they are made by staining block of wood to the desired color and then, when dry, soaking it in brine until it is further preserved, and finally, in warm pond water to make it swell. Then, simply paint the appropriate images of alleged dry fruit to decorate (like decorating a tree, really, but without all the leaves in the way).
Who'd have suspected anything to do with actual cake?
Petting a cat's belly - when you can get away with it.
Eating something somebody else made for you
Spending two days writing code on your PC only for it to compile and run without a hitch on an IoT device.
Clearly, as it's not top of your list, you've not experienced "Trader Joe's Dunkers" and some good hot coffee. One of those things that make your third item truly rise to the occasion, or, alternatively, allows you to reward yourself for the deed.