Crates.io | wthr-lang |
lib.rs | wthr-lang |
version | 0.0.3 |
source | src |
created_at | 2024-10-15 00:56:51.910639 |
updated_at | 2024-10-15 18:44:20.904893 |
description | An experimental programming language for weather calculations/applications. |
homepage | |
repository | https://github.com/zanderlewis/weather |
max_upload_size | |
id | 1408834 |
size | 70,456 |
An experimental programming language for weather calculations, trying to succeed FORTRAN.
Weather is a programming language for weather calculations. It is designed to be simple and easy to use, while still being powerful enough to perform complex calculations. The language is inspired by FORTRAN, but aims to be more modern and user-friendly.
The world has a big issue, no one is learning FORTRAN anymore. This is a big problem because FORTRAN is the best language for weather calculations. Weather aims to solve this problem by providing a modern alternative to FORTRAN that is easier to learn and use.
rayon
in the backend) without needing to compile it first. This makes it easy to test and debug code.Weather is still in development and is not yet ready for general use. However, you can try it out by cloning the repository and running the code in the src
directory using Cargo:
git clone https://github.com/zanderlewis/weather
cd weather
cargo run script.wthr
To use Weather, write your code in a file with a .wthr
extension and run it using the Weather interpreter. For example, to run a script called script.wthr
, you would use the following command:
cargo run script.wthr
The syntax of Weather is similar to that of Python, with some improvements for weather applications. Here is an example:
# Assign values to variables
temp = 0
humidity = 7
fahrenheit = 86
celsius = 30
# Calculate and print the dew point
dew_point = dewpoint(temp, humidity)
print("Dew Point: ")
print(dew_point)
# Convert Fahrenheit to Celsius and print the result
celsius_converted = ftoc(fahrenheit)
print("Fahrenheit to Celsius: ")
print(celsius_converted)
# Convert Celsius to Fahrenheit and print the result
fahrenheit_converted = ctof(celsius)
print("Celsius to Fahrenheit: ")
print(fahrenheit_converted)
script.wthr is a good place to start.
Contributions are welcome! Please open an issue or submit a pull request if you would like to contribute to Weather.
Weather is licensed under the Apache-2.0 License. See LICENSE for more information.