Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[P1] Document BigInt #1002

Closed
34 tasks done
chrisdavidmills opened this issue Feb 8, 2019 · 33 comments
Closed
34 tasks done

[P1] Document BigInt #1002

chrisdavidmills opened this issue Feb 8, 2019 · 33 comments
Labels
Firefox68 content relating to the Firefox 68 release.

Comments

@chrisdavidmills
Copy link
Contributor

chrisdavidmills commented Feb 8, 2019

Cross-filed from https://bugzilla.mozilla.org/show_bug.cgi?id=1476965.

See also https://trello.com/c/toqiqtQ1/17-bigint-fx-67 for the content roadmap Trello card detailing the bugs that need to be ddc'ed one this is done.

Florian's recommendations:

I think we should document this sooner rather than later. I'm adding my brain dump on what I think needs to be done. There might be more work involved here, but this is a start.

BigInt is a new primitive type and this needs to be added to a few places (with notes on type conversation)

BigInt should be mentioned/referenced from relevant Number docs

BigInt comes with a new numeric literal (n)

BigInt and typeof

BigInt API:

BigInt TypedArray API:

BigInt and interaction with other parts of JS (add examples)

All new reference pages need compat data and interactive examples, see

@chrisdavidmills
Copy link
Contributor Author

See also #887

@chrisdavidmills
Copy link
Contributor Author

@sarahgp wrote https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt

This needs reviewing. @Elchi3 can you give her some feedback and help her with future work here? Provided she still wants to contribute further, of coursde ;-)

@jmswisher jmswisher added NeedsTimeEst Needs time estimate Content labels Feb 8, 2019
@sarahghp
Copy link

Yes, I am still interested in contributing and I am open to feedback. I've also been emailing with @iulia-codes about contributing.

My next plan is to take on the Updates starting from the top, but if other people want to hop in (I have limited time), I am totally glad for that, too.

@Elchi3
Copy link
Member

Elchi3 commented Feb 18, 2019

Hey, thanks for re-filing this on GitHub! I've updated the description to use checklists.

I've glanced over the two pages that were created so far and they look excellent!
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/prototype

I'm happy to review more and let me know if there are questions with the items on the to-do list above.

@iulia-codes
Copy link

Hi all, so I've updated the main https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray but I am missing permissions to create new page. Can the page placeholders already be created ? https://developer.mozilla.org/en-US/docs/new?slug=BigInt64Array&parent=5612 and https://developer.mozilla.org/en-US/docs/new?slug=BigUint64Array&parent=5612

I will work on these next.

@chrisdavidmills
Copy link
Contributor Author

@iulia-codes I am happy to give you page creation permissions. What's you MDN username?

I am also happy to create the placeholders for you, but it looks like when you use the jsxref macro call to create a reference to a new page, it is creating them under /JavaScript/Reference, whereas it should be creating them under /JavaScript/Reference/Global_Objects, e.g.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array

So ideally we should create them as children of Global_Objects, e.g. by going to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects and using the "New sub-article" option in the gear menu.

@iulia-codes
Copy link

Hi @chrisdavidmills, my username is iulia on MDN

Good thing to know about the hierarchy of the pages & thanks for creating the two new pages :)

@chrisdavidmills
Copy link
Contributor Author

Hi @chrisdavidmills, my username is iulia on MDN

OK, cool. I've given you page creation permissions.

Good thing to know about the hierarchy of the pages

Yeah, I had to do a bit of digging here. I asked around, and it looks like the jsxref macro has a couple of bugs in terms of where new pages a created, if you use it to create links to new/non-existent pages.

thanks for creating the two new pages :)

You are welcome. Let me know if you need any more help.

@chrisdavidmills
Copy link
Contributor Author

@iulia-codes Hi there! I just wanted to do a quick check in about the two pages I created for you to fill in. Do you think you'll have time to do them soon? If not, don't worry about it — we can just delete them again until you are ready.

@chrisdavidmills chrisdavidmills added the Firefox67 content relating to the Firefox 67 release. label Apr 12, 2019
@jmswisher jmswisher removed the NeedsTimeEst Needs time estimate label Apr 30, 2019
@chrisdavidmills chrisdavidmills changed the title Document BigInt Document BigInt [Priority 1, but Florian should do this] May 1, 2019
@chrisdavidmills chrisdavidmills changed the title Document BigInt [Priority 1, but Florian should do this] [P1] Document BigInt May 1, 2019
@chrisdavidmills chrisdavidmills changed the title [P1] Document BigInt [P1] Document BigInt May 1, 2019
@jmswisher jmswisher added this to the Jessye Norman (S3 Q2 2019 milestone May 2, 2019
@iulia-codes
Copy link

Hey @chrisdavidmills, I noticed the pages are gone, but that's okay, as I've continued updating on the already existing pages. I have planned to update the two new pages that you created by the end of May.

@iulia-codes
Copy link

@littledan
Copy link

Great work on all of those, @iulia-codes. The new content you wrote looks very good to me. Would it make sense to also add context to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_Types#Literals ?

@chrisdavidmills
Copy link
Contributor Author

Hey @chrisdavidmills, I noticed the pages are gone, but that's okay, as I've continued updating on the already existing pages. I have planned to update the two new pages that you created by the end of May.

Hi @iulia-codes; thanks for all the work on this! If you are ready to start working on those two new pages, I can always reinstate them again. Would you like me to do so?

@iulia-codes
Copy link

Hi @chrisdavidmills yes, I can finish it this weekend and then maybe have it up for review.

@iulia-codes
Copy link

Definitely @littledan will add a reference there as well.

@chrisdavidmills
Copy link
Contributor Author

@iulia-codes ok, cool!

I have reinstated the following pages, so you can now edit them and fill them in:

As always, let me know if you need any help. I'll check my mail a couple of times over the weekend, just in case.

@lpd-au
Copy link

lpd-au commented May 28, 2019

Just a heads up, at the moment the BigInt page itself says:

The following operators may be used with BigInts (or object-wrapped BigInts): +, *, -, **, %.

Without making any mention of bitwise operators, which do appear to be supported.

@Elchi3
Copy link
Member

Elchi3 commented Jun 5, 2019

BigInt typed array API

I worked on the BigInt typed array API part of this as it seems like I wouldn't collide with anyone. Here's things to look at and to maybe review, if you're interested.

The BigInt typed array additions are now listed on relevant pages:

New reference pages have been created:

To make the sidebar menu as useful as for the other typed arrays some hacks are needed:

Browser compat data updates are in this PR (assumes same compat as general BigInt availability)

Interactive sample updates for bigint typed arrays:

Questions:

@Elchi3 Elchi3 added Firefox68 content relating to the Firefox 68 release. and removed Firefox67 content relating to the Firefox 67 release. labels Jul 11, 2019
@Elchi3
Copy link
Member

Elchi3 commented Jul 16, 2019

@chrisdavidmills Could you review the docs that I've listed in the last four comments here?

@chrisdavidmills
Copy link
Contributor Author

@Elchi3 Sure. Might take me a few days to dig myself out of this current hole, but I should get to them by the end of the week ;-)

@chrisdavidmills
Copy link
Contributor Author

@Elchi3 OK, so I've reviewed all the stuff on #1002 (comment)

The pages all look great and make sense. I just did a bit of light copy editing really.

You had a question here:

A contributor updated following reference page and added some code. This can now use getBigUint64, right?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView#64-bit_Integer_Values

I'm not an expert, but yeah, looks like it.

@Elchi3
Copy link
Member

Elchi3 commented Jul 18, 2019

Thanks Chris! It looks like another contributor added a BigInt version of that code in the meantime already. I've just looked that over and removed "works only in Chrome" which isn't true anymore :)

@chrisdavidmills
Copy link
Contributor Author

OK, I've also now reviewed everything at #1002 (comment)

Again, all reads really well. Just a few minor bits of copy editing to do.

Thanks Chris! It looks like another contributor added a BigInt version of that code in the meantime already. I've just looked that over and removed "works only in Chrome" which isn't true anymore :)

OK, great!

@lpd-au
Copy link

lpd-au commented Jul 18, 2019

Just a heads up, at the moment the BigInt page itself says:

The following operators may be used with BigInts (or object-wrapped BigInts): +, *, -, **, %.

Without making any mention of bitwise operators, which do appear to be supported.

Bump

@Elchi3
Copy link
Member

Elchi3 commented Jul 18, 2019

I've added "Bitwise operators are supported as well, except >>> (zero-fill right shift) as all BigInts are signed. Also unsupported is the unary + in order to not break asm.js."

@chrisdavidmills
Copy link
Contributor Author

I've now reviewed everything at #1002 (comment). All looks fine, just made a few really minor copy edits.

@chrisdavidmills
Copy link
Contributor Author

OK, everything at #1002 (comment) now reviewed too! Only a few copy edits.

I haven't mentioned on every Math method that it doesn't work with BigInt. Should I do that?

Is it just all Math methods? In which case, you already basically say that, so I think we're OK.

@Elchi3
Copy link
Member

Elchi3 commented Jul 19, 2019

Yeah, it is all of them. Thank you a lot for all your reviews! 👍

@Elchi3
Copy link
Member

Elchi3 commented Jul 23, 2019

I'm going to close this. Thanks everyone who helped on this! If there is follow-up work on BigInt, please file a new issue and cc me.

@Elchi3 Elchi3 closed this as completed Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Firefox68 content relating to the Firefox 68 release.
Projects
None yet
Development

No branches or pull requests

7 participants