Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 39 of 39 - Collapse all  -  Translate all to Translated (View all originals) < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jason Brumwell  
View profile  
 More options Oct 9 2012, 4:12 pm
From: Jason Brumwell <jason.brumw...@gmail.com>
Date: Tue, 9 Oct 2012 13:12:11 -0700 (PDT)
Local: Tues, Oct 9 2012 4:12 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

a++


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shawn wilson  
View profile  
 More options Oct 9 2012, 4:25 pm
From: shawn wilson <ag4ve...@gmail.com>
Date: Tue, 9 Oct 2012 20:25:20 +0000
Local: Tues, Oct 9 2012 4:25 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

No idea why the comment about warning when you give crypt binary didn't
gain more notice, but... why not make a new interface instead of changing
the current one and possibly breaking stuff?

You could eventually make the old API the same as the new (in a year?
Whenever github searches come up empty?) It wont affect me and it seems the
modules I use that use crypt are updated frequently enough that I trust
I'll be fine, but what's the point of breaking stuff if you don't have to?
On Oct 9, 2012 12:11 PM, "Isaac Schlueter" <i...@izs.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
codepilot Account  
View profile  
 More options Oct 9 2012, 6:21 pm
From: codepilot Account <codepi...@gmail.com>
Date: Tue, 9 Oct 2012 15:20:39 -0700
Local: Tues, Oct 9 2012 6:20 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

Just out of curiosity, will this be the last nail in the coffin of 'binary'
encoding? At least as the default, I mean.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mscdex  
View profile  
 More options Oct 9 2012, 7:32 pm
From: mscdex <msc...@gmail.com>
Date: Tue, 9 Oct 2012 16:32:16 -0700 (PDT)
Local: Tues, Oct 9 2012 7:32 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
On Oct 9, 6:21 pm, codepilot Account <codepi...@gmail.com> wrote:

> Just out of curiosity, will this be the last nail in the coffin of 'binary'
> encoding? At least as the default, I mean.

As a default, I'd hope so.

Last nail in the coffin totally though? I'd hope not. This particular
discussion (eliminating this encoding altogether) has been had on the
list here and on node's github issues almost ad nauseum, but I am
still in favor of keeping it around (with a note discouraging its use
in the docs) until Buffer's core capabilities are equivalent or nearly
equivalent to those of strings (e.g. indexOf, lastIndexOf, etc).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stewart Mckinney  
View profile  
 More options Oct 9 2012, 7:42 pm
From: Stewart Mckinney <lordma...@gmail.com>
Date: Tue, 9 Oct 2012 19:42:43 -0400
Local: Tues, Oct 9 2012 7:42 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

my vote is a), go for it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
murvinlai  
View profile  
 More options Oct 10 2012, 8:31 pm
From: murvinlai <murvin...@gmail.com>
Date: Wed, 10 Oct 2012 17:31:23 -0700 (PDT)
Local: Wed, Oct 10 2012 8:31 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

Go for it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luke Arduini  
View profile  
 More options Oct 11 2012, 12:44 am
From: Luke Arduini <lucasardu...@gmail.com>
Date: Wed, 10 Oct 2012 21:44:09 -0700 (PDT)
Local: Thurs, Oct 11 2012 12:44 am
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
b)

Remember the sys/util situation in 0.8?

>1. What is the cost of keeping "sys" throwing?
>2. What is the cost of putting it back?

This is a different type of change entirely but I think the general
idea of the questions is still applicable:

1. What is the cost of this change being made as soon as 0.10 when
the crypto API is currently marked as stable in 0.8?
2. What is the cost of marking the crypto API as unstable for 0.10,
then making the change in 0.12?

With the sys/util situation, the concern was that the 'increased
difficulty of migrating code' could be harmful to the project from a
long term perspective, including the possibility of it injuring
node's credibility in the "no, it'll work, trust me" sense.

If the labels for stability of node's core modules aren't respected,
aren't we sort of in the same situation?

Cost of 1 is it might break a bunch of peoples modules even though
the API was marked as stable. I guess these people should have
subscribed to the mailing list.

I don't know of any cost to 2, just the benefit of giving people
notice that the API is unstable again so they should expect
potential module breakage on the next version.

I like the idea of stuff changing for the better as quickly as
possible as much as the next person here, but I think being
consistent with breaking API changes is more important.

On Oct 8, 7:24 pm, Isaac Schlueter <i...@izs.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ege Özcan  
View profile  
 More options Oct 11 2012, 3:28 am
From: Ege Özcan <ege...@gmail.com>
Date: Thu, 11 Oct 2012 00:28:06 -0700 (PDT)
Local: Thurs, Oct 11 2012 3:28 am
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

Crypto API breaking can create security problems. Also something marked as
"stable" which stops working in the next version is not good for any
project. I'd go for the option b.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 11 2012, 11:55 am
From: Isaac Schlueter <i...@izs.me>
Date: Thu, 11 Oct 2012 08:54:55 -0700
Local: Thurs, Oct 11 2012 11:54 am
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
Luke,

That's a good point, I should have made the costs more clear initially.

In this case, the cost of delaying until 0.12 is that we delay what I
consider to be one of the 2 main features of 0.10.  Those features
are:

1. The Streams API is consistent across node, used wherever
appropriate, and easier to extend.
2. HTTP/TLS are less crappy by default.

The only change is that crypto methods that previously expected a
binary string by default will expect a buffer by default, just like
every other function in node, and that methods that return a binary
string by default will return a buffer by default, just like every
other function in node.

So, this is not a zero-benefit change (as sys/util was), and it's not
zero-cost to keep (as sys/util was).  I don't feel like an idiot
trying to explain to someone why their program requires them to add a
new 'binary' argument (or refactor to use Buffers).  And, unlike the
sys module, very few people actually use these APIs directly.

The cost of keeping it as it is, or delaying until 0.12, is that it
continues to be a confusing pain-point for users, and an awful
overly-complicated part of the code.  At least in master today, you
can pass 'buffer' as an argument to get a buffer out of it, which
previously was impossible.  But it's still

On Thu, Oct 11, 2012 at 12:28 AM, Ege Özcan <ege...@gmail.com> wrote:
> Crypto API breaking can create security problems.

Sorry, that's FUD.  Show me a use-case where that's the case, and
we'll figure out what is the best way to handle it.

> Also something marked as
> "stable" which stops working in the next version is not good for any
> project. I'd go for the option b.

Overdue: https://github.com/joyent/node/commit/99b2368a6cd408e75850ac73585de88...

That doesn't mean that it's necessarily going to change in 0.10.  But
it was a mistake to call something stable that is such an odd wart on
the Node API.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 11 2012, 11:57 am
From: Isaac Schlueter <i...@izs.me>
Date: Thu, 11 Oct 2012 08:57:24 -0700
Local: Thurs, Oct 11 2012 11:57 am
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
Oops, premature send, sorry.

On Thu, Oct 11, 2012 at 8:54 AM, Isaac Schlueter <i...@izs.me> wrote:
> The cost of keeping it as it is, or delaying until 0.12, is that it
> continues to be a confusing pain-point for users, and an awful
> overly-complicated part of the code.  At least in master today, you
> can pass 'buffer' as an argument to get a buffer out of it, which
> previously was impossible.  But it's still

But it's still confusing and weird, because it doesn't match the rest
of the Node API.  If we put a streaming interface on it, then we'll
have to do a bunch of hoop-jumping to get it right.  Also, there are
parts that are just broken.  For example, using hex encoding in some
of these functions just blows up with an assertion error, and
apparently always has.  The fact that no one has ever complained about
this makes me think that it's just not an API that gets a lot of use,
and is probably pretty safe to fix.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Trevor Norris  
View profile  
 More options Oct 12 2012, 12:07 pm
From: Trevor Norris <trev.nor...@gmail.com>
Date: Fri, 12 Oct 2012 09:07:39 -0700 (PDT)
Local: Fri, Oct 12 2012 12:07 pm
Subject: Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

(a) go for it

It seems like it would be reasonable to make the change at the same time
you introduce the streams2 branch. Don't worry about migrating it the
current, just to change it over.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diogo Resende  
View profile  
 More options Oct 12 2012, 12:26 pm
From: Diogo Resende <drese...@thinkdigital.pt>
Date: Fri, 12 Oct 2012 17:25:35 +0100
Local: Fri, Oct 12 2012 12:25 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

Not crypto related but since you're trying to give consistency to the API, why not make other changes like:

var sock1 = new require("net").Socket(...);
var sock1 = require("dgram").createSocket(..);

I'm sure there aren't a lot of inconsistencies but this is one that bugs me..

--
Diogo Resende


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diogo Resende  
View profile  
 More options Oct 12 2012, 12:28 pm
From: Diogo Resende <drese...@thinkdigital.pt>
Date: Fri, 12 Oct 2012 17:27:37 +0100
Local: Fri, Oct 12 2012 12:27 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers

I just realized there is dgram.Socket.. but the documentation says:

The dgram Socket class encapsulates the datagram functionality. It should be created viadgram.createSocket(type, [callback]).

--
Diogo Resende


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 12 2012, 4:36 pm
From: Isaac Schlueter <i...@izs.me>
Date: Fri, 12 Oct 2012 13:35:31 -0700
Local: Fri, Oct 12 2012 4:35 pm
Subject: Re: [nodejs] Re: Poll for v0.10 feature: Crypto default to 'binary' strings vs defaulting to buffers
If you have other complaints about Node's API, please post issues at
https://github.com/joyent/node/issues so that we can keep this thread
on topic.

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages < Older 
« Back to Discussions « Newer topic     Older topic »