Commit Graph

917 Commits

Author SHA1 Message Date
Yehuda Katz
8a29c9e6ab Migrated numerics to BigInt/BigDecimal
This commit migrates Value's numeric types to BigInt and BigDecimal. The
basic idea is that overflow errors aren't great in a shell environment,
and not really necessary.

The main immediate consequence is that new errors can occur when
serializing Nu values to other formats. You can see this in changes to
the various serialization formats (JSON, TOML, etc.). There's a new
`CoerceInto` trait that uses the `ToPrimitive` trait from `num_traits`
to attempt to coerce a `BigNum` or `BigDecimal` into a target type, and
produces a `RangeError` (kind of `ShellError`) if the coercion fails.

Another possible future consequence is that certain performance-critical
numeric operations might be too slow. If that happens, we can introduce
specialized numeric types to help improve the performance of those
situations, based on the real-world experience.
2019-09-01 21:00:30 -07:00
Jonathan Turner
9e17b937c3
Merge pull request #557 from nushell/jonathandturner-patch-2
Attempt to speed up CI
2019-09-01 19:55:32 +12:00
Jonathan Turner
acdecdbb04
Attempt to speed up CI 2019-09-01 19:33:13 +12:00
Jonathan Turner
bf19dff602
Merge pull request #556 from jonathandturner/improve_post
Fix unwraps in post
2019-09-01 19:33:02 +12:00
Jonathan Turner
a7e378d1c9 Fix unwraps in post 2019-09-01 18:44:56 +12:00
Andrés N. Robalino
dd3c149615
Merge pull request #555 from nushell/help
Help baseline.
2019-08-31 19:37:25 -05:00
Andrés N. Robalino
ca0c6eaf58 This commit introduces a basic help feature. We can go to it
with the `help` command to explore and list all commands available.

Enter will also try to see if the location to be entered is an existing
Nu command, if it is it will let you inspect the command under `help`.

This provides baseline needed so we can iterate on it.
2019-08-31 19:06:11 -05:00
Jonathan Turner
ce2d247367
Merge pull request #554 from jonathandturner/random_fixes
Assorted fixes
2019-09-01 10:43:48 +12:00
Jonathan Turner
1a67ac6102 Random fixes 2019-09-01 09:19:59 +12:00
Jonathan Turner
70ebe899c6
Merge pull request #552 from est31/image_decoding
Remove unused image features
2019-09-01 06:24:42 +12:00
Jonathan Turner
ed8896e828
Merge pull request #551 from est31/bson_update
Update bson to 0.14
2019-09-01 06:16:11 +12:00
est31
00c5adda80 Remove unused image features 2019-08-31 19:45:09 +02:00
Patrick Meredith
b514d93ffd Add Decimal to sample.bson 2019-08-31 19:15:48 +02:00
est31
5b7940b88c Update bson to 0.14 2019-08-31 18:47:14 +02:00
Jonathan Turner
f5db3276b9
Update README.md 2019-08-31 18:12:08 +12:00
Jonathan Turner
90daf0a486
Update README.md 2019-08-31 17:14:04 +12:00
Jonathan Turner
423ccbe6c2
Merge pull request #548 from jonathandturner/post
Add `post` command
2019-08-31 17:04:22 +12:00
Jonathan Turner
0d6b85b5bf
Merge branch 'master' into post 2019-08-31 16:39:24 +12:00
Jonathan Turner
6e932c471d
Merge pull request #543 from nushell/decimals
Basic support for decimal numbers
2019-08-31 16:31:04 +12:00
Jonathan Turner
ad18c7f61a Finish magic post and magic receive 2019-08-31 16:08:59 +12:00
Yehuda Katz
6f5ddbd6ae Fixed comparison between bytes and decimals
The previous commit introduced a new decimal type as well as comparison
coercions between decimals and integers, but not between decimals and
bytes.
2019-08-30 21:05:32 -07:00
Yehuda Katz
138b5af82b Basic support for decimal numbers
This commit is more substantial than it looks: there was basically no
real support for decimals before, and that impacted values all the way
through.

I also made Size contain a decimal instead of an integer (`1.6kb` is a
reasonable thing to type), which impacted a bunch of code.

The biggest impact of this commit is that it creates many more possible
ways for valid nu types to fail to serialize as toml, json, etc. which
typically can't support the full range of Decimal (or Bigint, which I
also think we should support). This commit makes to-toml fallible, and a
similar effort is necessary for the rest of the serializations.

We also need to figure out how to clearly communicate to users what has
happened, but failing to serialize to toml seems clearly superior to me
than weird errors in basic math operations.
2019-08-30 21:05:32 -07:00
Jonathan Turner
1d77595576 Merge branch 'master' into post 2019-08-31 15:12:03 +12:00
Jonathan Turner
f274df6753
Merge pull request #547 from jonathandturner/expand_list_sqlite
Expand lists loaded from sqlite
2019-08-31 14:49:07 +12:00
Jonathan Turner
2470e6dc24 Expand lists loaded from sqlite 2019-08-31 14:23:29 +12:00
Jonathan Turner
339cf98dd1
Merge pull request #546 from jonathandturner/from_to_automatic
Automatically call matching from-* and to-* commands
2019-08-31 14:17:32 +12:00
Jonathan Turner
2cde4da43f Partially fix list support 2019-08-31 13:35:53 +12:00
Jonathan Turner
2cec8168c7 Merge master 2019-08-31 13:30:41 +12:00
Jonathan Turner
bf03b530c9
Merge pull request #545 from pmeredit/topic/sqlite
Add SQLite support
2019-08-31 13:23:40 +12:00
Jonathan Turner
761cc3db14 Finish up enter and save 2019-08-31 12:59:21 +12:00
Patrick Meredith
3d147d1143 Add SQLite support 2019-08-30 20:54:45 -04:00
Jonathan Turner
fa2c6ec227 Merge master 2019-08-31 10:13:09 +12:00
Jonathan Turner
4cde96bcc4
Merge pull request #542 from pmeredit/topic/fix_from_json_null
Fix from_json to use Nothing for Json::Null
2019-08-31 10:11:49 +12:00
Patrick Meredith
481722b80a Fix from_json to use Nothing 2019-08-30 17:34:35 -04:00
Jonathan Turner
a4fa5628ea
Merge pull request #541 from jonathandturner/heim_ps
Switch to using async/await for ps
2019-08-31 08:15:47 +12:00
Jonathan Turner
c3abb3b687 Fix unwrap 2019-08-31 07:28:10 +12:00
Jonathan Turner
60bfa277d0 Experiment with async/await-enabled ps 2019-08-31 07:07:07 +12:00
Jonathan Turner
9e167713b3 Add post command 2019-08-31 06:27:15 +12:00
Jonathan Turner
39e06bbc80
Merge pull request #511 from svartalf/heim-0.0.7
Heim 0.0.7 preparations
2019-08-31 03:47:50 +12:00
Jonathan Turner
d870060018
Merge pull request #539 from GuillaumeGomez/sysinfo
Update sysinfo version
2019-08-31 03:38:14 +12:00
svartalf
213db54378 Update to heim v0.0.7. 2019-08-30 18:08:57 +03:00
Guillaume Gomez
d1f70aff73 Update sysinfo version 2019-08-30 13:25:00 +02:00
Jonathan Turner
3fba30f2dc
Merge pull request #537 from jonathandturner/tabs_in_textview
Add tab support to textview
2019-08-30 16:20:40 +12:00
Jonathan Turner
729051fdd2
Merge pull request #407 from iamcodemaker/vi
WIP: add support for vi mode
2019-08-30 15:54:30 +12:00
Jonathan Turner
605618bef8
Merge pull request #536 from jonathandturner/pin_bson
Pin bson
2019-08-30 15:49:47 +12:00
Jonathan Turner
8db21ddf99 Add tab support to textview 2019-08-30 15:47:30 +12:00
Jonathan Turner
1f9d5f9f89 Pin bson 2019-08-30 15:24:35 +12:00
Jonathan Turner
5d47ad386e
Merge pull request #535 from vsoch/another/quay.io
Adding missing quay.io registry references
2019-08-30 14:45:42 +12:00
Vanessa Sochat
2c4777d2b5
adding missing quay.io registry references
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-08-29 21:48:30 -04:00
Jonathan Turner
8d21c7383e
Merge pull request #534 from vsoch/pr/build-from-quay
FROM image for Docker multistage build needs to be from quay.io
2019-08-30 13:39:58 +12:00