savepoint
This commit is contained in:
		
							parent
							
								
									290be77204
								
							
						
					
					
						commit
						355ad371a7
					
				
							
								
								
									
										21
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								README.md
									
									
									
									
									
								
							|  | @ -61,15 +61,30 @@ Why use make instead of the built-in go commands? Because the point of make is t | |||
| 
 | ||||
| ## Usage together with standard Linux utilities | ||||
| 
 | ||||
| ``` | ||||
| ```bash | ||||
| f | ||||
| ed -u "s|#.*||" | sed -u 's|M|000000|g' | f | ||||
| sed -u "s|#.*||" | sed -u 's|M|000000|g' | f | ||||
| 
 | ||||
| cat more/piano-tuners.f | f | ||||
| cat more/piano-tuners-commented.f | sed -u "s|#.*||" | sed -u 's|M|000000|g' | f | ||||
| 
 | ||||
| tee -a input.log | go run f.go | tee -a output.log | ||||
| tee -a io.log | go run f.go | tee -a io.log | ||||
| 
 | ||||
| function f(){ | ||||
|   sed -u "s|#.*||" |  | ||||
|   sed -u "s|//.*||" |  | ||||
|   sed -u 's|K|000|g' |  | ||||
|   sed -u 's|M|000000|g' |  | ||||
|   sed -u 's|B|000000000|g' |  | ||||
|   /usr/bin/f | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ## Tips & tricks | ||||
| 
 | ||||
| Conceptually clearer to have all the multiplications first and then all the divisions | ||||
| 
 | ||||
| ## Roadmap  | ||||
| 
 | ||||
| - [x] Write README | ||||
|  | @ -81,3 +96,5 @@ tee -a io.log | go run f.go | tee -a io.log | |||
| - [x] Add show more info version | ||||
| - [ ] Program into a small device, like a calculator? | ||||
| - [ ] Think of some way of calling bc | ||||
| - [ ] Think how to integrate with squiggle.c to draw samples | ||||
| - [ ] Think about how to draw a histogram from samples | ||||
|  |  | |||
							
								
								
									
										2
									
								
								f.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								f.go
									
									
									
									
									
								
							|  | @ -82,7 +82,9 @@ EventForLoop: | |||
| 				fmt.Printf("=> %.1f %.1f\n", old_low, old_high) | ||||
| 				logmean_old, logstd_old := boundsToLogParams(old_low, old_high) | ||||
| 				fmt.Printf("=> Lognormal, with logmean: %.1f, logstd: %.1f\n", logmean_old, logstd_old) | ||||
| 				continue EventForLoop | ||||
| 			} | ||||
| 			fmt.Println(error_msg_cont) | ||||
| 			continue EventForLoop | ||||
| 		case 2: | ||||
| 			new_low, err1 = strconv.ParseFloat(tokens[0], 64) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user