Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ExcessBLarg!
Sep 1, 2001
The only thing you actually need is a Copyright statement. Redistribution is a reserved right by default, which is why open source licenses explicitly grant it. You can say something like "do not distribute" to make clear to your users that you are not allowing for redistribution but that's just advisory.

That does mean that people can't redistribute the software even non-commercially, but it's probably not worth the commercial/non-commercial distinction. I suspect you really want to control the public distribution entirely--you wouldn't want someone to take your program and repackage it with adware or malware even if it's "non-commercial".

In general, Copyright law very much works to the benefits of rights holders. "All rights reserved" is default for Berne Convention signatory countires, which includes the US since 1989. The purpose of having a license is to allow other people to (re)distribute your software in limited ways. The risk, though, is that someone infringing on your work could point to ambiguity in the language of the license to claim that the alleged infringement was really permissible under the license.

The one thing you might want to include from the MIT license is the warranty disclaimer ("The software is provided 'as is' without warranty of any kind, ...."). Some countries have implied warranties where any good "sold" must be fit for a purpose, which as applied to software means that it is (reasonably) correct and bug free in its operation. The purpose of the disclaimer is to indicate that, since you're distributing the software without cost, you cannot be held liable under any implied warranty. Now, I don't think anyone has been sued for releasing unfit freeware, but that's the reasoning for it.

Adbot
ADBOT LOVES YOU

sarehu
Apr 20, 2007

(call/cc call/cc)

ExcessBLarg! posted:

The only thing you actually need is a Copyright statement.

The one thing you might want to include from the MIT license is the warranty disclaimer

You need the warranty disclaimer more than any copyright statement.

ExcessBLarg!
Sep 1, 2001

sarehu posted:

You need the warranty disclaimer more than any copyright statement.
It's advisable to include it, but at the same time the implied warranties on free (as in beer) software is, as far as I'm aware, an academic concern.

Some prominent software has been released with neither licenses nor warranty disclaimers to no ill effect. Off the top of my head, SQLite is public domain and the only "license" is a disclaimer of Copyright. DJB traditionally has released software with just a Copyright notice, and inconsistently with a statement of "NO WARRANTY". He's since moved to releasing with public domain notices.

sarehu
Apr 20, 2007

(call/cc call/cc)
No no no, according to lawyers that know about this sort of thing, you drat well better disclaim merchantability, fitness for a particular use, etc, or else you face a very real risk of losing your house. To omit the disclaimer because you want to be cool is batshit insane.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.
Fitness for purpose is the same thing as warranty of merchantability, which basically says if you sell something, it needs to do what you said it will do. I would be very interested in a case citation to any example in the U.S. of warranty of merchantability damages to be awarded for something that wasn't actually sold.

ExcessBLarg!
Sep 1, 2001

sarehu posted:

No no no, according to lawyers that know about this sort of thing, you drat well better disclaim merchantability, fitness for a particular use, etc, or else you face a very real risk of losing your house.
No, that's my point, it's not a real risk because it's never been tried and demonstrated. What happened is that when lawyers crafted free software licenses, they added that clause as a hedge against the theoretical risk of someone applying implied warranty laws against free software.

Laws are weird like that. Implied warranties might not apply to software at all. Or they might not apply to software that is not sold. Or they might apply, but with damages limited to the cost of sale, which is zero. Or they might not apply because the disclaimer says they don't. Or they might still apply because the law precludes disclaimers, and so we're all screwed anyways.

I personally would include the disclaimer since it's text that's already written, but most freeware released in the 90s before click-through EULAs were a thing had no such statements and everyone was fine.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

ExcessBLarg! posted:

Laws are weird like that. Implied warranties might not apply to software at all. Or they might not apply to software that is not sold. Or they might apply, but with damages limited to the cost of sale, which is zero. Or they might not apply because the disclaimer says they don't. Or they might still apply because the law precludes disclaimers, and so we're all screwed anyways.

This is why lazy evaluation is bad, mkay? :v:

sarehu
Apr 20, 2007

(call/cc call/cc)

ExcessBLarg! posted:

No, that's my point, it's not a real risk because it's never been tried and demonstrated. What happened is that when lawyers crafted free software licenses, they added that clause as a hedge against the theoretical risk of someone applying implied warranty laws against free software.

That's not how to use the word "risk".

KernelSlanders posted:

Fitness for purpose is the same thing as warranty of merchantability

No.

ExcessBLarg!
Sep 1, 2001
I'm not interested in having a pedantic argument over "risk". What I'm getting at is that warranty disclaimers are something that nearly everyone agrees is a "good idea" when you have the opportunity to include them, but if you've released something in the past without one you're probably fine.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Look. If you're going to open-source something, you have to include some sort of license statement, or else it's not really open-source because other people don't have the right to use it. Given that you're going to include a license, you might as well save yourself some time by using a standard license. Using standard license text means your license will actually be legally defensible, as opposed to a lot of the things that people want to throw in custom licenses which are not legally enforceable and can compromise the validity of the entire license. Using a standard license also makes it much easier for people to use your code if they're actually conscientious about licensing, because their lawyers will generally have already reviewed and blanket-approved many of the common licenses, but they will not want to waste their time and money on every internet idiot's hilarious fake lawyer talk.

I would recommend the Apache license unless you feel strongly about copyleft.

If you're actually going to take contributions, there's a lot more to think about than just licensing.

nielsm
Jun 1, 2009



The original question was specifically about releasing closed-source freeware, in binary-only distribution.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


ExcessBLarg! posted:

I'm not interested in having a pedantic argument over "risk". What I'm getting at is that warranty disclaimers are something that nearly everyone agrees is a "good idea" when you have the opportunity to include them, but if you've released something in the past without one you're probably fine.

Every legal matter hinges on pedantry. That's the inherent nature of the law.

22 Eargesplitten
Oct 10, 2010



When people talk about nested ifs being bad, are they talking about having other conditionals inside an if function, or are they talking specifically about where you are using multiple ifs that could be in one statement. Like

code:
if(foo)
{
   if(bar)
   {
        fizz;
    }
}
rather than

code:
if(foo && bar)
{
   fizz;
}
?

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

UCC § 2-314 posted:

Implied Warranty: Merchantability; Usage of Trade.

(1) Unless excluded or modified (Section 2-316), a warranty that the goods shall be merchantable is implied in a contract for their sale if the seller is a merchantwith respect to goods of that kind. Under this section the serving for value of food or drink to be consumed either on the premises or elsewhere is a sale.

(2) Goods to be merchantable must be at least such as

...

(c) are fit for the ordinary purposes for which such goods are used

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



22 Eargesplitten posted:

When people talk about nested ifs being bad, are they talking about having other conditionals inside an if function, or are they talking specifically about where you are using multiple ifs that could be in one statement. Like

code:
if(foo)
{
   if(bar)
   {
        fizz;
    }
}
rather than

code:
if(foo && bar)
{
   fizz;
}
?

Number 1. Especially when there's stateful code that has properties being referenced lower down and it gets really hard to try and figure out what the hell is happening on a call to the function.

Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.
I've got a bunch of local shell scripts like:
code:
#!/bin/bash
afplay /home/gravitypike/bin/ff7_fanfare.mp3
that I'll use to indicate that a local script has completed: $ mvn clean install && fanfare.sh || buzz.sh

Is there a good way, when I'm ssh'd into a remote host, to accomplish the same thing? I'm running a script that I expect to take 2-5 minutes, and want to be noisily notified upon completion?

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

Gravity Pike posted:

I've got a bunch of local shell scripts like:
code:
#!/bin/bash
afplay /home/gravitypike/bin/ff7_fanfare.mp3
that I'll use to indicate that a local script has completed: $ mvn clean install && fanfare.sh || buzz.sh

Is there a good way, when I'm ssh'd into a remote host, to accomplish the same thing? I'm running a script that I expect to take 2-5 minutes, and want to be noisily notified upon completion?

Webhook maybe? Bonus points if you connect it to your Sonos.

22 Eargesplitten
Oct 10, 2010



piratepilates posted:

Number 1. Especially when there's stateful code that has properties being referenced lower down and it gets really hard to try and figure out what the hell is happening on a call to the function.

So something like

code:
if(foo)
{
   bar;
   if(fizz);
   {
      buzz;
   }
}
Is fine?

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

22 Eargesplitten posted:

So something like

code:
if(foo)
{
   bar;
   if(fizz);
   {
      buzz;
   }
}
Is fine?

If that is the simplest way to describe your program, sure. It's not a hard rule, it's mainly to make things easier to maintain. If you find yourself nesting too much, either you can probably simplify it with some boolean logic, or you should refactor into smaller functions.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



22 Eargesplitten posted:

So something like

code:
if(foo)
{
   bar;
   if(fizz);
   {
      buzz;
   }
}
Is fine?

If it's simple it's fine, the more nested if's you add the more someone will hate to read it in the future.

Also consider changing nested if's to early guard conditions instead (I remember there was a recent discussion about this poo poo in some CoC thread).

So in the example above:

code:
if (!foo) {
    // return/error
}

bar;
if (fizz) {
    buzz;
}

or if fizz is not dependent on bar being executed:

code:
if (!foo) {
    // return/error
}
if (!fizz) {
    // return/error (a separate error maybe, otherwise roll this in to the if above)
}

bar;
bizz;

The last code block to me personally reads the best, since you can process it in a very simple way:
- if foo isn't met, we error
- if fizz isn't met, we error
- bar
- bizz

While with nested if's each of those conditions is dependent to your way of thinking on the if statements that came before it, instead of a simple list of stuff that can happen.

sarehu
Apr 20, 2007

(call/cc call/cc)

The "ordinary purposes" there is not the fitness for a particular purpose.

UCC § 2-315 posted:

Where the seller at the time of contracting has reason to know any particular purpose for which the goods are required and that the buyeris relying on the seller's skill or judgment to select or furnish suitable goods, there is unless excluded or modified under the next section an implied warranty that the goods shall be fit for such purpose.

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

sarehu posted:

The "ordinary purposes" there is not the fitness for a particular purpose.

Backing off this derail of a derail, and returning to the derail itself:

KernelSlanders posted:

I would be very interested in a case citation to any example in the U.S. of warranty of merchantability [or fitness for purpose] damages to be awarded for something that wasn't actually sold.

I assume you don't know of one.

sarehu
Apr 20, 2007

(call/cc call/cc)

KernelSlanders posted:

I assume you don't know of one.

Of course not. Free software generally has these disclaimers, after all.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Basically if you don't include a suitable disclaimer, you run the very exciting risk of ending up the test case for this exact argument.

So your lawyer will tell you to always include the disclaimer, and since including it doesn't actually cost you anything, you might as well listen to them.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

nielsm posted:

The original question was specifically about releasing closed-source freeware, in binary-only distribution.

Pfft, context.

me your dad
Jul 25, 2006

I just got Sublime Text 3 after using Notepad++ for years. Is there a way to change the color of the < > brackets? They're white right now (using Monokai theme) and I'd rather them be the same shade of magenta as the tag names.

I found instructions for Sublime Text 2 but I don't have a folder called Color Scheme - Default under Preferences/Packages

Neslepaks
Sep 3, 2003

Gravity Pike posted:

I've got a bunch of local shell scripts like:
code:
#!/bin/bash
afplay /home/gravitypike/bin/ff7_fanfare.mp3
that I'll use to indicate that a local script has completed: $ mvn clean install && fanfare.sh || buzz.sh

Is there a good way, when I'm ssh'd into a remote host, to accomplish the same thing? I'm running a script that I expect to take 2-5 minutes, and want to be noisily notified upon completion?

Here's one silly way. In a separate terminal on your local machine do:

code:
$ [ "$(nc -l 8111)" = "ok" ] && fanfare.sh || buzz.sh
Then when you ssh:

code:
$ ssh -R 8111:localhost:8111 remotemachine
$ mvn clean install && (echo ok|nc localhost 8111) || (echo fail|nc localhost 8111)

Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.

Neslepaks posted:

Here's one silly way.

Haha, I really like that, thanks!

Tots
Sep 3, 2007

:frogout:
Where can I get a cheap or free off brand TLD domainname?

E: Nevermind, I just remembered I still own a domain name. Whoops :downs:

Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.

Tots posted:

Where can I get a cheap or free off brand TLD domainname?

Namecheap.com has some sort of $0.88/yr deal for some of the crappier TLDs right now. It looks like they probably pop up to $8-33/yr after the first year, where .com's are steady at $11.

Tots
Sep 3, 2007

:frogout:

Gravity Pike posted:

Namecheap.com has some sort of $0.88/yr deal for some of the crappier TLDs right now. It looks like they probably pop up to $8-33/yr after the first year, where .com's are steady at $11.

Thanks, I might still check this out

reading
Jul 27, 2013
Octave: How can I get the date of yesterday? Especially in a formatted string?

I know how to use datestr to get today's date easily but I need to refer to the previous day.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

reading posted:

Octave: How can I get the date of yesterday? Especially in a formatted string?

I know how to use datestr to get today's date easily but I need to refer to the previous day.

You're going to need to specify which language you want to do this in.

sarehu
Apr 20, 2007

(call/cc call/cc)

Skandranon posted:

You're going to need to specify which language you want to do this in.

In GNU Octave, presumably.

nielsm
Jun 1, 2009



Skandranon posted:

You're going to need to specify which language you want to do this in.

He did. Octave. It's a Matlab clone.

As far as I can tell from 2 minutes :google:, Octave represents dates and times similar to Excel, as a decimal number with whole part being days since some epoch, and decimal part being time of day. So you can use the Now function to get the current time, subtract 1 to get yesterday same time, then format that as a date.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

nielsm posted:

He did. Octave. It's a Matlab clone.

As far as I can tell from 2 minutes :google:, Octave represents dates and times similar to Excel, as a decimal number with whole part being days since some epoch, and decimal part being time of day. So you can use the Now function to get the current time, subtract 1 to get yesterday same time, then format that as a date.

My bad, thought that was a name or something, completely missed it.

reading
Jul 27, 2013

nielsm posted:

He did. Octave. It's a Matlab clone.

As far as I can tell from 2 minutes :google:, Octave represents dates and times similar to Excel, as a decimal number with whole part being days since some epoch, and decimal part being time of day. So you can use the Now function to get the current time, subtract 1 to get yesterday same time, then format that as a date.

Thank you, this works. Although I swear I had already tried it, but that was:
date(now-1)
which although the date() function accepts args like that with no complaints it doesn't actually work. But:
datestr(now-1)
works!

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

What the gently caress is a 'factory'? I know the Java joke is ObjectFactoryFactoryBeanFactory() but what is it?

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Bob Morales posted:

What the gently caress is a 'factory'? I know the Java joke is ObjectFactoryFactoryBeanFactory() but what is it?

Factories are objects that make other objects. Generally this is relevant when there are things you can't do in the constructor for an object that need to be done before the object can be interacted with. For example, if your program requires different objects that do not have owner/creator relationships to be aware of each other, you can't establish that awareness in an object constructor -- that's known as "leaking "this" in constructor", and can be problematic e.g. if another thread attempts to interact with the object while its constructor is still executing. So instead the factory makes the object, and then once its constructor is done (and it is therefore safe to interact with) establishes relationships between the new object and any other object.

Adbot
ADBOT LOVES YOU

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Bob Morales posted:

What the gently caress is a 'factory'? I know the Java joke is ObjectFactoryFactoryBeanFactory() but what is it?

It's a function that builds an object for you based on some parameters when constructors won't suffice (for example you might want to build one of several derived classes depending on the parameters - you can't do that with a constructor). Because Java/OOP seems to abhor just having a simple function, this function is often put into a "factory" class. This is a classic example of Java forcing you to "noun your verbs" (you can't just build something, you need to get a builder and then tell it to build).

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply