Please create an account to participate in the Slashdot moderation system


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Search engine? (Score 1) 286

If a C string array needs to be NULL terminated, then a 16 byte array only has 15 bytes of usable string storage. How am I artificially adjusting the buffer length by telling strncpy() to copy at most 15 bytes of data?

Let's take another approach. Let's assume I need to copy of C string into a fixed length array as might happen with a binary protocol. If strncpy() automatically NULL terminated the string, then I would be unable to use every byte of the fixed width field as one byte would always be consumed by the superfluous NULL terminating character (unless, of course, I write my own function).

In its current form, strncpy() can be used for copying strings into fix length fields or into another string array without the need of two functions.

Comment Re:Search engine? (Score 1) 286

For example, strncpy() doesn't actually do what any reasonable person would assume it does. Using it in the wrong "obvious" way can result in bugs that won't easily be found during testing. There are hundreds more land mines like that sprinkled throughout the C ecosystem, and they all need to be reviewed repeatedly before one can be considered an experienced developer.

Knowing the prototype of "char * strncpy(char * dst, const char * src, size_t len);", my assumption would be that strncpy() would copy up to 'len' bytes of data from the 'src' pointer to the 'dst' pointer which probably does not include a NULL terminator if the 'src' string is longer than 'len'. As such, as a programmer I should pass 'dst_len - 1' as 'len' so I can ensure the 'dst' string is NULL terminated by calling "dst[dst_len-1] = '\0';" immediately after calling strncpy().

If this is an unreasonable assumption, what is a reasonable assumption?

Comment Re:Kernel is 4.4... (Score 2) 54

The 4.6 kernel series is already end of life, 4.7 is only marked stable, and 4.8 hasn't yet been released.. Currently Linux Kernel 4.4 is the latest longterm Linux kernel and is projected to be supported until Feb. 2018. With the exception of kernel 3.2, support will end for the other Linux longterm kernels either this year or next year.

If you are creating a long term support release of a Linux distro, it makes sense to choose a longterm support kernel over either an EOL kernel release or an unreleased kernel (which likely bring its own set of issues). If the distro did choose to kernel without long term support, they would be on the hook for back porting critical patches into the kernel. Since they did choose a long term kernel release, they can focus on what sets Mint apart, maintaining their Cinnamon interface, rather than maintaining a custom kernel release.

On a related note, Alpine Linux and Slackware Linux also chose the 4.4 kernel.

Comment Re:Not apples to apples (Score 2) 1023

Looking at the math, if a McDonalds location is making fries from 11:00 am until 10:00 pm daily, a $15/hour wage would be about $1,155 per week or about $54,750 per year. Using your argument that a single employee is not dedicated to making only fries at a single location, lets say only about 1/3 of a man-hour per business hour, that still is about $18,250 per year in wages for making and bagging fries. However with the same assumptions at $8/hour is only $9,7333 per year in wages for making and bagging fries.

So a $15/hour wage alone would pay for a $35,000 robot in 2 years and an $8/hour wage would do the same in 3.6 years.

If you increase the business day to 14 hours (11am - 1:00am), the numbers become:
$15/hour wage @ 14 hour days = $25,550/year to make fries or 1.4 years to pay for a $35k robot
$8/hour wage @ 14 hour days = $13,626/year to make fries or 2.6 years to pay for a $35k robot

Keep in mind that the above figures do not cover the costs in addition to wages for hiring employee such as unemployment insurance and other benefits.

Comment Re:Define Pirates (Score 1) 198

Not my job. Try looking at the Canadian government web site.

Again, not my problem if you don't understand the consequences of the existence of treaties you sign.

It is not my job to explain the binding force of treaties on US law, however I'll do it anyway so you'll see that treaties may be be as cut and dry in the US as they are in Canada. As a side note, I would be surprised if your diplomats did not understand the binding force of different treaties with the US on US law.

Although under international law, a US Treaty, a US congressional-executive agreement, and a sole-executive agreement are all the same, within the United States they have significant legal differences.

A constitutional treaty is capable of extending beyond the term of the president which negotiated the treaty and the senators who ratified it. A constitutional treaty also has the ability to legislate in areas which are constitutionally within the sole authority of the individual states. A constitutional treaty is relatively rare in the United States.

A congressional-executive agreement only requires a simple majority of congress and the agreement of the president. These agreements are the same as any other legislation passed by congress and are likewise limited in scope to the authority vested in both the legislative and executive branches of the government.

A sole-executive agreement is entirely within the president's discretion. However this agreement is limited in power to only the authority vested in the president and cannot extend beyond the president's term in office without the authorization of the president's successor.

In summary, a constitutional treaty can ban capital punishment on foreign nationals tried within the states even though Congress does not have the power to outright ban capital punishment. A congressional-executive agreement can impose tariffs and other taxes upon imported good since taxation is within the authority of congress, however a congressional-executive agreement cannot ban capital punishment. An sole-executive agreement can lift sanctions the president enforces (he controls the military), but he cannot impose tariffs, taxes, or guarantee monetary compensation since these authorities belong to Congress and not the president. Additionally, the president cannot make an agreement which violates US law.

Since I've taken the time to explain how treaties affect US law, maybe you can throw us a bone and tell us the name of this supposed treaty which grants Canadians within US borders exemptions from the DMCA.

Comment Re:April 1st (Score 1) 209

>Implying those borg have ever had a sense of humor.

Nay, I say we hang them with 8-tracks.

The tape in an 8-track cartridge would never hold enough weight to hang them properly.

I say we spread them across eight tracks and use a Train (TM) as a Milling Machine (TM) to make Meat Loaf (TM) out of them, then cover them with Beattles (TM) that will eat the evidence so the Police (TM) can't put us on Deathrow (TM).

Comment Re:HOWTO (Score 1) 1081

Anyone who deserves execution does not deserve a quick, painless termination, they deserve to suffer as much as possible. The only way to make it better is to make them suffer like their victims, and their victims are NOT JUST THE PEOPLE THEY KILLED, but also all the people left behind.

The point of the judicial system is not to exact revenge, but to protect society. I stand with the teachings (CCC 2267) of the Catholic Church on this issue.

2267 Assuming that the guilty party's identity and responsibility have been fully determined, the traditional teaching of the Church does not exclude recourse to the death penalty, if this is the only possible way of effectively defending human lives against the unjust aggressor.

If, however, non-lethal means are sufficient to defend and protect people's safety from the aggressor, authority will limit itself to such means, as these are more in keeping with the concrete conditions of the common good and more in conformity to the dignity of the human person.

Today, in fact, as a consequence of the possibilities which the state has for effectively preventing crime, by rendering one who has committed an offense incapable of doing harm - without definitely taking away from him the possibility of redeeming himself - the cases in which the execution of the offender is an absolute necessity "are very rare, if not practically nonexistent."

Comment Re:Just Askin' (Score 1) 367

The law mentioned in the video is the Gun Control Act of 1968 which was a passed in 1968. 1968 was in the 20th century, not the 18th century. More to your argument, it was passed 34 years after the Communications Act of 1934, not 150+ years before the Communications Act of 1934.

1968 was in the 20th century or the nineteen hundreds.

1768 was in the 18th century or the seventeen hundreds.

Comment The release of Some Software is now available (Score 3, Insightful) 189


For those of us who have not heard of Wayland, the following is how the summary reads:

The x.y.z release of Some Software is now available for download. The project thanks all who have contributed, and especially the desktop environments and client applications that now converse using Some Software. In an official announcement from Some Author of Some Company, he says the Some Software protocol may be considered 'done' but that doesn't mean there's not work to be done. A bigger importance is now given to testing, documentation, and bugfixing. As Some Software is maturing, we are also getting closer to the point where the big Linux distros will eventually start integrating it to their operating system.

So what does Some Software actually do and why should I be interested? I know that I can Google Some Software, but is it really that hard to start with the summary with the following:

The x.y.z release of Somesoftware, a package which does blah blah blah, is now available for download. ...

After all, phrases such as "As Wayland is maturing", imply that this is a relatively new piece of software still under development of which everyone is not familiar, especially for those of us using BSDs, Solaris, and Slackware.


Comment Re:Makes sense. (Score 2) 629

When is Microsoft going to patch those flaws in Windows XP!

Hmm, Windows XP is over 13 years old and has been end of support for 5 years, and still released a security patch 7 months ago.

Android 4.3 was released 2 years ago. So the EOS was when? A few months after it was released?

Not that Windows XP and Android are great comparisons, but your jab does not exactly help Google's case. A better example would have been Apple iPhone 1 vs Android 4.3, but even Apple supported the first iPhone for 3 years before ending support.

Comment Re: Louisiana too (Score 1) 468

The majority in the House of Representatives is Republican, however the organization called Majority House PAC is Democrat. From the Majority House PAC website:

As the super PAC focused on holding Republicans accountable and helping Democrats win seats in the House, House Majority PAC combines innovative new approaches with time-tested strategies to do battle with Republican outside groups and make a difference.

Slashdot Top Deals

Riches cover a multitude of woes. -- Menander