* Posts by Fibbles

1432 posts • joined 28 Jan 2008

Page:

What's all the C Plus Fuss? Bjarne Stroustrup warns of dangerous future plans for his C++

Fibbles

Re: Design by committee

The contains method is certainly shorter but the whole point of Standard Library algorithms is that they are generic. The free function 'std::find' will work with any container that provides iterators, even user created ones. You can even use the function on a raw array by just passing it pointers rather than iterators. The fact that it lets you specify the begin and end iterators also lets you find an item within a sub-range.

On the other hand the 'contains' method needs to be re-implemented for every new type of container. It also only lets you search the full container, there's no facility for specifying a sub range.

Then there's the return type. The 'std::find' function will return a pointer/iterator to your found element so you can immediately start using it, otherwise it'll return whatever you specified as the end of the range. By the looks of things 'contains' just returns a bool which is considerably less useful.

0
0
Fibbles

The second you start using a different syntax for the same command (for), and distinguish using obscure symbols, and even HAVE things like "auto" type modifiers (which just makes me think of VB "Variants"... shudder...), then you've strayed far enough from the original command to warrant a new keyword.

That line is impenetrable to my programming mind.

What makes it impenetrable? I really can't see how 'foreach x in y' is significantly more readable than 'for x in y'.

The auto keyword is not specific to for loops, you can use it pretty much anywhere you'd like the type deduced. It's useful because you shouldn't be redeclaring the same information over and over. If I change variable foo from int to unsigned int I don't want to have to then go through each line of code to change the type there as well.

Can you honestly imagine seeing something like that inside, say, the Linux kernel? Or the LibreSSL library?

No because they're both written in C, not C++.

For instance, if that loop modifies x, and it's just a reference back to the object inside the collection, that could quickly turn into disaster and it might well be hard to spot.

References have been a core part of the language since the year dot. Do you have the same complaint about pointers? A reference serves the same purpose as a dereferenced pointer.

Honestly, a programming language is like a joke, if you have to explain it,

You can't honestly expect to be able to use a language without learning the syntax. Even something like Python (which is marketed as close to natural language,) requires you to learn the syntax.

4
0
Fibbles

It's not far off that really. C++ is a statically typed language so you need to provide a type in your code or explicitly tell the compiler to deduce it from the value passed.

for ( auto& x : v )

If you look at the above range based for you can see that the colon is equivalent to 'in'. The only non obvious bit to somebody who uses another language is the 'auto&'. The 'auto' just tells the compiler to deduce the type since it knows what 'v' contains and therefore knows the type of 'x'. The '&' tells the compiler that it should not make a copy of the element from the container but just use a reference back to the original object.

4
0
Fibbles

/glm/gtc/matrix_transform.inl

glm - because it's in the OpenGL Math Library

gtc - because it's Template Core rather than Template eXperimental (gtx)

matrix_transform - because it's a free function for transforming a matrix object

.inl - design choice of the library, could just as easily go in the hpp file

This seems more a criticism of the GLM library and their header layouts rather than a valid criticism of templates. It's also unfair comparing its size to linmath since GLM is specifically designed to inter-operate with OpenGL and mimics GLSL as closely as possible within the limits of the language.

2
0
Fibbles

"Language I know is easier to understand than language I do not know."

The range based for loop is far from opaque to anybody who actually knows the language. It simply iterates the each element 'foo' in container 'bar'. It does it by using a feature of the language that has been in the standard for 20 years, namely 'iterators'. Every algorithm in the Standard Library uses iterators, they're not a difficult concept and are fundamental to understanding the Standard Library.

Your complaint seems to be that you don't understand the inner workings of the Standard Library and therefore can't 'secure' your code which is ridiculous because you shouldn't care about the implementation any more than you should care about the implementation of your compiler. At a certain point you have to trust that something does what it says on the tin.

3
5
Fibbles

Re: Heaven help the newbies.

It got better?

You don't have to use every new feature of the language and I can't think of any that actively make it worse.

3
5
Fibbles

Re: Disagree....

I thought the same. I thought he just described Java when he described a "completely type-safe and resource-safe style of programming". That's what Java *is* and it became a thing precisely as an antidote to C++.

The difference is that C++ aims to do these things with zero runtime overhead. Think RAII vs garbage collection.

11
1

Navy names new attack sub HMS Agincourt

Fibbles

oh yes:

https://en.wikipedia.org/wiki/List_of_spacecraft_in_the_Culture_series

"Now We Try It My Way"

H.M.S. Ultimate Ship the Second

Seems fitting for the Royal Navy.

1
0

Windows Notepad fixed after 33 years: Now it finally handles Unix, Mac OS line endings

Fibbles

I'm half expecting to see that the Notepad shortcut now points to wordpad.exe

8
0

MY GOD, IT'S FULL OF CARS: SpaceX parks a Tesla in orbit (just don't mention the barge)

Fibbles

Re: Academics

You call it junk but I, for one, find it comforting to think that when all life is gone from this planet and the Sun swells to such an extent that it consumes the Earth; there will still be a Spaceman chilling out there in his car with the top down, Bowie in the tape deck and emblazoned across the dashboard (in big friendly letters,) the words "DON'T PANIC!".

65
0

Ubuntu 17.10: We're coming GNOME! Plenty that's Artful in Aardvark, with a few Wayland wails

Fibbles

Re: Nice

You're all spelling XFCE wrong.

16
1

Eggheads identify the last animal that will survive on Earth until the Sun dies

Fibbles

Re: Pfft, the last living thing on Earth will be lawyers...

Have you been exposed to a gamma ray burst that wasn't your fault?

21
0

Windows Insiders with SD cards turn into OneDrive outsiders

Fibbles

Re: Sky blue, water wet, MS fucking over customers...

You forgot the anniversary update that messed up the partition table on dual boot systems. They subdivided the Windows partition to create a recovery partition but when rebuilding the partition table assumed anything with a filesystem that Windows doesn't native support was just empty space. Goodbye grub, goodbye Linux.

23
0

Europe-wide BitTorrent indexer blockade looms after Pirate Bay blow

Fibbles

Re: Hi Andrew

Andrew and everyone who grew out of their teenage stick-it-to-the-man phase.

1
3

Atlassian wants you to put all your eggs in one Bitbucket and beyond

Fibbles

Re: Atlassian's still happy for organisations to shop à la carte

You are Bryan Rollins and I claim my 5 pounds.

1
0

EU axes geo-blocking: Upsets studios, delights consumers

Fibbles

Re: hurting pirates

As I pointed out in my post, we are by definition "pirates" when we format shift; therefore all that we paid for is "pirated".

While I'll admit the courts have confused the issue by bringing format shifting under the umbrella term of 'piracy' I doubt it is the definition most people would use. Piracy for myself, and I imagine most other people would be described as "obtaining copyrighted material you don't have a license for".

The idea that the masses of torrent sites exist mostly because of format shifters is ridiculous. As I said before, they exist because people want free shit.

You are assuming we don't pay for what we pirate.

It's a fairly valid assumption when you go on to say only a few lines later:

It is certainly true that I don't pay for all that I "pirate" but that's because ever so much that I download isn't worth paying for.

Another favourite shield excuse of the freetard. It completely ignores the fact that the value proposition of a movie, book, game, etc changes after the first use. Usually a film is worth less to the viewer on the second viewing because they already know what's going to happen. People are much less likely to pay for content they've already consumed, regardless of how much they enjoyed it the first time. That doesn't mean the first viewing shouldn't still be paid for.

The people with the "bullshit excuses" are companies like Sony and their secret Rootkit that voided the warranty on my quite expensive CD player.

That was over a decade ago. I remember at the time the bullshit excuse on this forum was along the lines of "if only they'd sell music without DRM, piracy would disappear". Publishers then went on to sell music without DRM. Lo and behold, piracy continued; almost as if the DRM argument was some sort of bullshit excuse to mask just wanting things for free.

As I said before, there'll always be some sort of flimsy excuse for piracy. People understandably want to take shit for free but they also want to feel morally justified whilst doing it. It doesn't matter the mental gymnastics involved to get to that point. For most pirates there'll always be "one last hurdle" before they pay for their content.

FWIW the music industry pissed me off so much with their bullshit that I now only purchase mainstream music second-hand. I do buy new from musicians selling their own material; they're cheaper and I know where the money is going.

That's some serious hipster nonsense right there. You'll only buy artisanal music sold by the musician themselves? So any form of production network suddenly makes them not worthy of your cash? Where do you draw the line? Anything other than individually burned CD-Rs in hand-drawn sleeves is the evil work of Big Music?

BTW, it's considered quite bad form to invent quotes

"Hurr Durr, I'm gonna treat a random internet forum like debate club and point out what I think are fallacies mostly because I can't tell the difference between a sarcastic but accurate summation of my point and a strawman. For my next trick I'm gonna nitpick about your grammatical errors before finally transforming into Spectacularly Refined Gent. Good day to you Sir!"

0
0
Fibbles

Re: hurting pirates

Most who pirate a lot also purchase a lot.

If you say so. If they don't purchase what they pirate what difference does it make though?

If you only pay for half of what you consume that isn't somehow magically made OK because you also happen to consume a lot.

It also depends on how you define "piracy".

"We're all format shifters. Honest, gov!"

I highly doubt that. I can accept people are going to pirate even though they shouldn't. I just wish they'd stop inventing such bullshit excuses for doing so.

0
4
Fibbles

Re: hurting pirates

Some pirate simply because the can

Many pirate because they are pissed off being unable to pay

I think you've got your adjectives the wrong way around there. If we're being realistic, most pirate because they don't want to pay for something when they can easily get it for free. While there are definitely some that pirate because of geoblocking, delayed regional releases and DRM, who then go on to later buy the product; for most its just a convenient excuse to try to legitimise their actions. The numbers of seeds doesn't suddenly drop to zero once a TV show has been released in all regions. I suspect that for many pirates there'll always be "just one last hurdle" that needs to be overcome before they'll pay for content.

3
15

Linux homes for Ubuntu Unity orphans: Minty Cinnamon, GNOME or Ubuntu, mate?

Fibbles

Re: XFCE

Another happy XFCE user here. Switched to Xubuntu when unity was released and haven't looked back.

0
0

BOFH: This is your last chance. After this, there is no turning back

Fibbles

With the BOFH there no, so I assume some sort of Star Trek fight to the death scene needs to take place before the PFY replaces the BOFH.

Stephen: Did you ever hear the tragedy of BOFH The Wise?

James: No?

Stephen: I thought not. It’s not a story the HR would tell you. It’s an IT legend. BOFH was a Dark Lord of IT, so powerful and so wise he could influence management to increase budgets… He had such a knowledge of the dark side, he could even keep the ones he cared about from being sacked for gross misconduct.

James: He could actually save people from summary termination?

Stephen: The dark side is a pathway to many defenestrative abilities some consider to be... unethical.

James: What happened to him?

Stephen: He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice had him sacked for embezzlement and use of a cattle-prod without completing the necessary risk assessment paperwork. Ironic. He could save others, but not himself.

4
0

Apple, Mozilla kill API to deplete W3C battery-snitching standard

Fibbles

Re: It's one standard in a long row of idiotic web standards

If mainstream browsers would only implement essential features, web developers wouldn't use all that cruft.

They'd still use all the cruft. It'd just be implemented with proprietary plugins.

1
0

Windows 10 market share fell in September

Fibbles

Breaking news:

Accumulation of floating point errors gives el reg excuse to write clickbait.

0
0

The server's down. At 3AM. On Christmas. You're drunk. So you put a disk in the freezer

Fibbles

Re: "decorations will be up"

Christmas Puddings are already out on the shelves.

I'd happily eat Christmas pudding year round so this is no bad thing. I'm not sure it outweighs having to put up with neighbours plastering their houses in fairy lights on November 6th though.

2
0

Days are numbered for the Czech Republic

Fibbles

If the name change is solely for the purpose of advertising then I'd say Bohemia is the most marketable name in that list. They could have even changed the national anthem to Queen. It would have certainly made the start of international football games more interesting.

37
0

Double KO! Capcom's Street Fighter V installs hidden rootkit on PCs

Fibbles

Re: So that's M Bison's new power

Seems like something more at home in a Metal Gear game. When Psycho Mantis first read the contents of my PS1 memory card it blew my mind.

5
0

Pull the plug! PowerPoint may kill my conference audience

Fibbles

Re: A quick thought

Convert each slide to a JPG image. Most media players can handle photo slideshows.

7
0

Virgin Media costs balloon by MEEELLIONS in wake of Brexit

Fibbles

Re: Another Illustration of the Fact...

The employees can vote for whoever they like, it's a secret ballot after all.

It's not as secret as you might think. There needs to be some sort of tracking mechanism to aid in investigations of electoral fraud.

Each ballot slip has a serial number and records are kept matching voters to serial numbers. The slips themselves are stored in a government warehouse for a year before being destroyed.

It's very possible for the government to find out who you voted for. Considering the reports of lax security around the used ballot slips it wouldn't surprise me if, after greasing the right palms, private parties could find out who you voted for.

7
1

Delete Google Maps? Go ahead, says Google, we'll still track you

Fibbles
Trollface

Re: "We've reached out to Google to ask "

Glad to see you'll be actioning this change going forward.

18
0
Fibbles

Re: Google is copying Microsoft

I think you've got that the wrong way around. Microsoft have been trailblazers of many shady practices over the years but mass harvesting of personal info is definitely something they learned from Google.

40
0

UK's EE scores network reliability clean sweep, rival dwarves fume

Fibbles

Re: One thing is for sure

I suspect EE throttles their traffic heavily at peak times. In central Birmingham 4G EE gives about 100 KBytes/s whereas Three gives around 4 MBytes/s.

1
0

Adobe reverses decision to kill NPAPI Flash plugin for Linux

Fibbles

Re: Dan 55

All good points. However, whilst get_iplayer is a great program I don't think it should let the Beeb off the hook for their shoddy Linux support.

4
0
Fibbles

Re: Bad

But, but... If the skip button was a plain hyperlink you might never load the intro. If you do that how else will we share with you the main buzzwords of our mission statement? It is imperative that we tell you about how we work with the community to promote synergy; how we leverage our visionary product to promote organic growth. If you don't see these words floating next to stock photos of smiling people you may never realise that we are innovative and disruptive thought-leaders. How will you know that our paradigm shifting business is a game changer that will cause the entire industry to pivot? How will you know?

7
0

It's OK to fine someone for repeating a historical fact, says Russian Supreme Court

Fibbles

They might be a member of the ECHR but it's no guarantee they'll adhere to any ruling.

7
0

Watch SpaceX's rocket dramatically detonate, destroying a $200m Facebook satellite

Fibbles

Re: cant see much

arrayAllEngines[9].Start(); // Start the engine in the middle of stage 1

Is this supposed to start all 9 engines or just the 9th? Because it fails at both.

4
0
Fibbles

Re: Facebook Satellite

"Here's what I think of the new WhatsApp terms and conditions." - Elon Musk

43
0

If you haven't changed your Dropbox password for 4 years, do so now

Fibbles

Re: Sounds fishy to me

Pick a reasonably long eBook and keep it on your phone. Pick a random line number, e.g. line 7 of every page. Every time you need a password pick a random page of the book and use line 7. Then instead of remembering a very long password just remember the page number.

It's not a secure enough method for government work or anything like that but it'll do for most people's private email, forum accounts, etc.

0
0

Linux turns 25, with corporate contributors now key to its future

Fibbles

Re: Linux control to proprietary entities, particularly Microsoft

If there really was some immense conspiracy to remove Linus from the process why wouldn't they just fork the kernel? There's no reason anyone has to listen to Torvalds, they do so by choice.

2
0

You shrunk the database into a .gz and the app won't work? Sigh

Fibbles

We had an American colleague fly to Iceland instead of Ireland. Only realised it when he got into a taxi at Reykjavik and asked to be taken to Dublin city centre.

Ok, just a second whilst I get the pontoons and outboard motor from the boot.

8
0

Londoner jailed after refusing to unlock his mobile phones

Fibbles

Re: Hmm

Antique guns are perfectly legal in the UK though the definition of 'antique' is vague. The police usually go with anything pre WWII. Ammunition for these guns requires a licence though.

7
0

Chinese Android smartphone firm: It packs a dedicated crypto chip

Fibbles

Re: Cool

It has to be vague to protect industrial secrets. Can't have the competition finding out about their amazing triple ROT13 encryption algorithm.

3
0

Star Trek Beyond: An unwatchable steaming pile of tribble dung

Fibbles

Re: Nobody stopped and asked the question; 'Do we need to remake Star Trek?'

Air on vulcan......?

I'm sorry, but that, is just such a classic 'comic book guy' post,...

"Uh, yeah, well, whenever you notice something like that... a wizard did it."

0
0
Fibbles

Re: Nahh, the old Star Trek was for nerds...

Didn't they do an episode of Next Gen where most of the crew were obsessed with some silly game?

As best I remember it was also an augmented reality game. You may be onto something...

0
0

Since you love Flash so much, Adobe now has TWO versions for you

Fibbles
Mushroom

Take off and nuke it from orbit. It's the only way to be sure.

Edit: Bah, beaten to it.

3
0

Theresa or Teresa May? Twitter confuses nude model and new PM

Fibbles

Teresa May's Punishment Party

I'm sure James Murdoch is awaiting his invite with bated breath.

2
0

A bad day for DBAs: MIT boffins are replacing you with a mere spreadsheet

Fibbles

Re: SIEUFERD

Sie Ferd.

If you speak German and Norwegian I guess you could take it to mean 'they journey'. It describes what your queries will be doing through the database.

My consultancy fee will be with your office momentarily.

0
0

Oracle says it is 'committed' to Java EE 8 – amid claims it quietly axed future development

Fibbles

Re: Die Java Die

Whilst you wouldn't write your typical application program in it, you can't get at those special purpose instructions even in C.

I suppose that depends on if you count using the asm keyword as writing in C or writing in assembler.

2
0

Bacon is not my vodka friend

Fibbles

Used to have something similar back in ye olde student days to be used for dares, drinking games and the like.

Black liquorice Sambuca infused with Ghost Chillis. We called it Devil's Blood.

2
0

Parliament takes axe to 2nd EU referendum petition

Fibbles

Re: Be careful what you wish for...

So much this.

Instead of trying to convince Leave voters why they should actually vote Remain, the campaign spent a great deal of time decrying anyone with a differing opinion as a racist. Sure, some of them undoubtedly are racist but the majority are likely just disturbed by endless media scare stories of mass immigration and repressive EU regulations. Insulting people is no way to win a debate.

13
0

Page:

Forums

Biting the hand that feeds IT © 1998–2018