Comments (15)
(and the thread on HN)
Which thread are you referring to?
https://news.ycombinator.com/item?id=36864624
But if you are interested, I can send you a pre-release
Sure, I will be happy to test/use it.
Some beta testing would be great! I have attached a pre-release to this post. In order to use it, you need to create ~/.config/numbat
and then move the modules
folder from the archive to that directory.
You can find some preliminary documentation (tutorial, examples, reference) here: https://numbat.dev/doc/
What are the planned new features?
The major new feature is that users can define their own units. We also introduce the concept of physical dimensions and statically check all code before executing it. All the predefined units/constants/functions are now also written in the "Numbat" language itself. Numbat is also orders of magnitude faster than Insect. It has much better error messages. It fixes some open bugs in Insect. And a lot of other things :-)
from insect.
Great. Now I have realized how to add custom units.
It will be handy to have let c = speed_of_light
as a part of default setup. Since numbat is not trying to be a general purpose programming language (and everyone uses c
for speed of light), having a default value for the variable c
will not harm the user experience, in my opinion.
from insect.
I propose all the following for more convenience in the default user experience.
let c = speed_of_light
let G = gravitational_constant
let h_bar = ℏ
let magnetic_constant = µ0
let electric_constant = ε0
let bohr_Magneton = µ_B
let fine_structure_constant = α
let avogadro_Constant = N_A
let boltzmann_Constant = k_B
let gas_Constant = R
let bohr_Radius = a0
from insect.
Thank you for the suggestions. I refrained from adding some short aliases since I didn't want to pollute the one-character namespace even further. But I also missed having c
for speed_of_light
already.
I implemented all of your suggestions (but long names always lowercase / snake case), pushed a new beta release and updated the documentation: https://numbat.dev/doc/list-constants.html
from insect.
Yes, thanks. I found that too. It's a limitation of our unit simplification right now. I fixed it for now with a manual -> meter
conversion in the unit definition, so now you should have the desired result.
from insect.
Ha! I also saw that paper (and the thread on HN), and immediately added oersted
/Oe
to the rewrite of Insect, that we are currently working on:
So in the new version you can do this:
Unfortunately, the new version is not yet public. But if you are interested, I can send you a pre-release (Linux binary, command-line version). It's pretty much on the same level, feature wise, as Insect. But has quite a few advantages.
from insect.
Ha! I also saw that paper
:)
(and the thread on HN)
Which thread are you referring to?
But if you are interested, I can send you a pre-release
Sure, I will be happy to test/use it. What are the planned new features?
You can upload the binary right here. In case you don't want to do that, you can also send me an email (can be found on my GitHub profile page).
from insect.
I get the following error in Linux Mint 21.2
./numbat: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
I tried sudo apt install libssl-dev
, but that did not help.
from insect.
@archisman-panigrahi Thank you for trying. I now built a new recent release without a libssl dependency. You can find the download link and instructions here: https://numbat.dev/
Looking forward to your feedback!
from insect.
Now it runs!
Should I submit bug reports for numbat right here? I just realized that it does not have magneticConstant
and electricConstant
. Maybe it supports greek symbols, but it is hard to write greek alphabets on a regular keyboard.
It would be great if numbat already contains all the constants of insect (it is fine if they are renamed, like planckConstant -> planck_constant
)
from insect.
Now it runs!
Great — thank you for the feedback!
Should I submit bug reports for numbat right here?
I wanted to add you to the numbat repository, but GitHubs permission system for private repositories is not very granular... it's either all or nothing. So please feel free to report Numbat issues in this ticket. Or if they apply to Insect as well, feel free to open new tickets.
I just realized that it does not have
magneticConstant
andelectricConstant
.
It does, but not under those names. We should add those long names as well. In the meantime, you can also create a ~/.config/numbat/init.nbt
file and add
let magnetic_constant = µ0
let electric_constant = ε0
Maybe it supports greek symbols, but it is hard to write greek alphabets on a regular keyboard.
Yes, you can use µ0
/ε0
— but mu0
/eps0
are also supported.
It would be great if numbat already contains all the constants of insect (it is fine if they are renamed, like
planckConstant -> planck_constant
)
I think it does. See https://numbat.dev/doc/list-constants.html for a list of all builtin constants. You can also type list
in the REPL. And feel free to report it here if you think something is missing.
from insect.
but long names always lowercase / snake case)
I mixed up uppercase and lowercase. Thanks for making everything lowercase.
from insect.
One more thing I just found in the new version.
>>> bohr_radius
bohr_radius
= 5.29177e-11 F·J²/(C²·kg·m·Hz²)
It would be great if it reports 5.29177e-11 m
instead.
from insect.
You can now try this online here: https://numbat.dev/?q=mu0+*+2500+Oe+-%3E+T
from insect.
Works. I verified that T/mu0 -> Oe
works too.
I am closing the issue.
from insect.
Related Issues (20)
- Make the website a PWA installable app HOT 1
- Octal, Hex and binary number input does not work HOT 4
- Generate linux binaries for armhf and arm64 HOT 1
- Insect shows errors if `xdgBasedir.data` or any of its parents don't exist HOT 6
- [cli] Change unconventional behavior of Ctrl-C HOT 2
- Document .insectrc
- Use insectrc in non-interactive operation HOT 1
- Add optional precision argument to round() HOT 6
- `insect` command accepts commands such as quit (both as argument and from stdin) HOT 1
- Support underscores as separators HOT 4
- `copy`/`cp` doesn't seem to work on Wayland
- Output error when input to factorial is not a non-negative integer HOT 2
- Dummy Units for calculating Workhours? (aka man-hours, person-hours, person-days, ...) HOT 5
- Allow repeated factorial HOT 1
- Unit 'knot' is not documented HOT 1
- Variadic functions HOT 4
- Support for Planck units and Stoney units. HOT 8
- Error making a simple division HOT 2
- The results are not accurate: `10^18 + 1 = 1000000000000000000` HOT 1
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 insect.