Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MasseGuillaume/hands-on-scala-native
https://github.com/MasseGuillaume/hands-on-scala-native
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/MasseGuillaume/hands-on-scala-native
- Owner: MasseGuillaume
- Created: 2017-04-11T15:47:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-19T18:46:27.000Z (over 6 years ago)
- Last Synced: 2024-04-22T13:32:37.174Z (8 months ago)
- Language: Scala
- Homepage: https://masseguillaume.github.io/hands-on-scala-native-slides/#/
- Size: 37.1 KB
- Stars: 31
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-scala-native - Hands on Scala Native - Tutorial for implementing a bandwidth monitor with Ncurses. (Tutorials and Examples)
README
[![Build Status](https://travis-ci.org/MasseGuillaume/hands-on-scala-native.svg?branch=master)](https://travis-ci.org/MasseGuillaume/hands-on-scala-native)
# Hands-on Scala-Native
## Install Required Software
see http://www.scala-native.org/en/latest/user/setup.html
and install ncursesor
```
curl https://nixos.org/nix/install | sh
nix-shell .
```## Original C program
[Nbwmon: Ncurse sbandwidth monitor](https://github.com/causes-/nbwmon)
```
┌[ 1.59 KiB/s ]─────────[ nbwmon-0.6 | interface: wlp4s0 ]────────────[ Received ]┐
│- * │
│- * * │
│- * * │
│- * * * │
│- * * * │
│- * * * * │
│- * * * * * * │
│- * * * * * * *│
│- * * * * **** * ** *│
│- * * * * ** **** * * * ** *│
│- * ** * * *** * **** * ** * ** * * * *** *│
└[ 0 B/s ]────────────────────────────────────────────────────────────────────────┘
┌[ 3.74 KiB/s ]────────────────────────────────────────────────────[ Transmitted ]┐
│- * │
│- * │
│- * │
│- * │
│- * │
│- * │
│- * * │
│- * * * │
│- * * * ** * │
│- * * * ** **** * * *│
│- * ** * * **** * **** * ** * ** * * * * ** *│
└[ 0 B/s ]────────────────────────────────────────────────────────────────────────┘
┌[ Received ]───────────────────────────┐┌[ Transmitted ]─────────────────────────┐
│Current: 384 B/s││Current: 564 B/s│
│Maximum: 1.59 KiB/s││Maximum: 3.74 KiB/s│
│Average: 113 B/s││Average: 164 B/s│
│Minimum: 0 B/s││Minimum: 0 B/s│
│Total: 3.65 GiB││Total: 2.88 GiB│
│ ││ │
└───────────────────────────────────────┘└────────────────────────────────────────┘
```## Running
```
sbt
> ~nativeLink
``````
./run
```