Comments (6)
I'm still studying it. As NuShell didn't reach yet the first ever stable level, I don't know if I should implement all of my workflow directly using it. Currently, I'm just exploring the data processing pipeline features that they have against a workflow using sed
/awk
and your bc-gh
, for instance. All I'm doing is pretty much pick a JSON file, iterate over it, apply some editions/additions using your bc-gh
and then save it again to a JSON file. Hope you like NuShell as much as I do and one day in the future, it can have the same popularity as zsh
.
If in the future I implement something that I'm proud of, I'll happily share it with you, Gavin.
from bc.
Unfortunately, there is not any workaround, and that is on purpose. The bc
language is just too restricted to go any further without serious work.
It is possible, yes. However, I believe that would be a mistake.
I once said this:
Good software design includes putting whatever complexity must exist where it best fits.
So one of the skills of a good programmer is knowing where complexity should go.
If you need multiple values in one array slot, it sounds like you need structs, objects, or some other compound data thing. That sort of complexity should live in a "proper" programming language.
So I suggest that you use a "proper" programming language with arbitrary-precision numbers, like Python.
That said, I don't want to just hang you out to dry with no solution!
You're using my bc
because it was the best for the job until now, right? Can you tell me why that is?
You've mentioned that you use it for finances; unlike most other math, finances basically require base 10 math, so is that why my bc
was best?
If so, I might have a solution for you.
Do you know Python?
If so, I could learn how to create a C extension for Python, and then I could use my bc
's library form to create a Python extension to use my bc
's library. That way, you could use Python, but still have the decimal-based math you need for finances, and I wouldn't have to do a ton of work to add multi-values to bc
while also adding my bc
to Python.
As an extra bonus, if you use Python, you could then have your files be output to JSON or another well-known format. And hey, I may even be able to help you convert your scripts to Python if you send them to me. (Do it through email, not this bug report!)
Will that work for you?
from bc.
Hi, @gavinhoward,
I'm using your bc
tool for over a year to keep track of my expenses and everything related to my personal finances. The main reason behind this decision is what you just said, generally speaking, finances use base 10 math and bc-gh
allows me to have arbitrary-precision numbers on it. The second big reason is you. The passion you put into your projects is truly amazing. I know that as long as you're alive and well, you'll keep this project running and that's a important thing for me. Also, your support as shown here in this issue is very, very good. To end, I'm a follower of your blog since the beginning of 2022.
I don't know Python. I could learn it but I don't like much its' syntax and the biggest part of its' design choices. I'll probably take this chance to improve my NuShell knowledge and try to integrate bc-gh
into it. With NuShell, I know that I can work with well-known formats like JSON/YAML/TOML in order to be able to implement my desired workflow. Thank you for everything and keep up the excellent work.
from bc.
You flatter me! :) But more seriously, thank you for the compliments; I struggle to see worth in my code, and that helps a lot.
I'm sorry I couldn't help more. But feel free to ask any questions to help with your port to NuShell. I'm happy to help with that since I was not much help here!
from bc.
You flatter me! :) But more seriously, thank you for the compliments; I struggle to see worth in my code, and that helps a lot.
Your code and your blog posts truly make a difference to my life 💙
I'm sorry I couldn't help more. But feel free to ask any questions to help with your port to NuShell. I'm happy to help with that since I was not much help here!
You don't have to be sorry. I read the documentation of NuShell and I think I'm able to implement my current workflow with bc-gh
on it pretty easily. Thank you for all your spent time and help offered. Have a nice rest of week!
from bc.
You're welcome.
Hey, when you finish your NuShell implementation, I would love it if you could email it to me; I'm almost done with my new language, and I'd love to use it as a test application.
from bc.
Related Issues (20)
- Multi-line comments in files result in parse error HOT 7
- Release tarballs in `gzip` format HOT 4
- --prefix=... is partially ignored? HOT 12
- Scale argument is ignored HOT 6
- Specifying `--prefix` when cross-compiling HOT 9
- Difference between --localedir and NLSPATH HOT 4
- Good job on your bc implementation. You should add it to wikipedia HOT 5
- Windows MSVC compilation problem HOT 4
- test failures on Android HOT 4
- another mksh/bash difference? HOT 7
- bc -> bc dependency loop HOT 2
- bc freezes evaluating cbrt(0.01) HOT 4
- [QUESTION] Bypass Math Overflow for Large Computations HOT 12
- Build fails on macOS HOT 4
- Incoherent rambling followed by a suggestion for an improvement. HOT 8
- Build errors after ./configure -a HOT 6
- bc attempts to first calculate gigantic obase before erroring out HOT 1
- Allowing redefinition of builtin function such as abs() for compatibility with bc scripts HOT 2
- Not an issue, but a change proposal HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bc.