Based on:
- I assume that
/dev/nvme0n1
is the system's disk, and/dev/sda
is USB drive.
Based on:
/dev/nvme0n1
is the system's disk, and /dev/sda
is USB drive.The intention of this post is to provide a solution (with examples) to a somewhat uncommon issue in Erlang. I hate searching for answers to the same problems over and over, and I had a hard time finding answers to this particular problem, so I wrote it all down once I figured it out. If one day you decide to read and write data through fifo's (named pipes) and then decide you want to read or write the other end of the pipe from Erlang, this post is for you.
I wanted to read and write to a fifo from a C/C++ app and have an Erlang app communicate over the other end of that fifo. Put simply, Erlang doesn't really support what I was trying to do. You cannot just file:open/2
a fifo, or any special device for that matter, in Erlang and expect it to work. This is documented in Erlang's FAQ.
extern crate glfw; | |
extern crate kiss3d; | |
extern crate nalgebra as na; | |
use na::Point3; | |
use kiss3d::window::Window; | |
use kiss3d::light::Light; | |
/* | |
Good Cargo.toml |
package main | |
import ( | |
"fmt" | |
) | |
func fn(m map[int]int) { | |
m = map[int]int{42: 101} | |
} |
package main | |
import ( | |
"fmt" | |
"math/big" | |
) | |
/* | |
1 | |
10 |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var x int = 217 | |
var y uint8 | |
for i := 0; i < x; i++ { |
// Author: Kyle Lemons | |
package main | |
import ( | |
"fmt" | |
"http" | |
"log" | |
) | |
func Log(handler http.Handler) http.Handler { |
// Author: @francesc | |
package main | |
import ( | |
"log" | |
"time" | |
) | |
type Logger struct { | |
Log func(format string, args ...interface{}) |
// Author: @francesc | |
package main | |
import ( | |
"log" | |
"time" | |
) | |
func whenDone() func(format string, args ...interface{}) { | |
start := time.Now() |