This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
downloading Nix expressions from ‘https://d3g5gsiof5omrk.cloudfront.net/nixos/unstable/nixos-17.03pre101267.a9584c9/nixexprs.tar.xz’... | |
unpacking channels... | |
created 2 symlinks in user environment | |
these paths will be fetched (0.00 MiB download, 0.01 MiB unpacked): | |
/nix/store/7bi4d7691wqhk1649qvjq1qi3vd9a73m-nixos-rebuild | |
fetching path ‘/nix/store/7bi4d7691wqhk1649qvjq1qi3vd9a73m-nixos-rebuild’... | |
*** Downloading ‘https://cache.nixos.org/nar/0fw4a0qzzq0mgsld5sqparaz6gar79mp72izl4gs3l069znyl3bc.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/7bi4d7691wqhk1649qvjq1qi3vd9a73m-nixos-rebuild’... | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
building Nix... | |
building the system configuration... | |
these derivations will be built: | |
/nix/store/0h6ls3wxz0zdmx1w1cazpvr955b0w8kk-steam-runtime.json.drv | |
/nix/store/0nfdl4f572isprsxrdm7z7adx3jwbqv1-xlock.pam.drv | |
/nix/store/0qdlsk83y66kgxy14gs0cyzblpsrvih3-unit-remote-fs.target.drv | |
/nix/store/1d9h2rk45wzrr0fx2pix1mr6vq9g776f-skype-4.3.0.37.drv | |
/nix/store/1fda4j81hdw6j603y6s9l062ilpfg4rs-udev-rules.drv | |
/nix/store/1h8w0kn0v6vyvbyf1jw2x21fmmslghv3-runuser-l.pam.drv | |
/nix/store/1j490ki62jaw4lbrvldr1cw2yqbn8hjs-unit-systemd-logind.service.drv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::VecDeque; | |
use std::str::FromStr; | |
#[derive(Debug, Clone)] | |
enum OperatorToken { | |
Plus, | |
Minus, | |
Multiply, | |
Divide, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No Makefile; skipping clean. | |
Removing aclocal.m4 | |
Removing autom4te.cache/ | |
Removing build-aux/ar-lib | |
Removing build-aux/config.guess | |
Removing build-aux/config.sub | |
Removing build-aux/depcomp | |
Removing build-aux/install-sh | |
Removing build-aux/missing | |
Removing configure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
travisbhartwell@bashombp:~/Projects/rbasic$ cargo build | |
Compiling either v1.0.2 | |
Compiling itertools v0.5.8 | |
Compiling rbasic v0.1.0 (file:///Users/travisbhartwell/Projects/rbasic) | |
error[E0432]: unresolved import `itertools::Itertools` | |
--> src/lexer.rs:2:5 | |
| | |
2 | use itertools::Itertools; | |
| ^^^^^^^^^^^^^^^^^^^^ Did you mean `self::itertools`? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::str::FromStr; | |
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] | |
pub struct LineNumber(pub u32); | |
#[derive(Debug, Clone, PartialEq)] | |
pub enum Token { | |
Comment(String), | |
// Variables and Literals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn tokenize_line(line: &str) -> Result<LineOfCode, String> { | |
let mut char_iter = line.chars().enumerate().peekable(); | |
let mut line_number = LineNumber(0); | |
let mut tokens: Vec<(u16, Token)> = Vec::new(); | |
while char_iter.peek() != None { | |
let cur = char_iter.next(); | |
if cur.is_some() { | |
let (pos, ch) = cur.unwrap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 5 REM inputting the argument | |
// 10 PRINT " factorial of:" | |
// 20 INPUT A | |
// 30 LET B = 1 | |
// 35 REM beginning of the loop | |
// 40 IF A <= 1 THEN 80 | |
// 50 LET B = B * A | |
// 60 LET A = A - 1 | |
// 70 GOTO 40 | |
// 75 REM prints the result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 5 REM inputting the argument | |
// 10 PRINT " factorial of:" | |
// 20 INPUT A | |
// 30 LET B = 1 | |
// 35 REM beginning of the loop | |
// 40 IF A <= 1 THEN 80 | |
// 50 LET B = B * A | |
// 60 LET A = A - 1 | |
// 70 GOTO 40 | |
// 75 REM prints the result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq-default org2jekyll-blog-author "ardumont" | |
org2jekyll-source-directory (expand-file-name "~/org/") | |
org2jekyll-jekyll-directory (expand-file-name "~/public_html/") | |
org2jekyll-jekyll-drafts-dir "" | |
org2jekyll-jekyll-posts-dir "_posts/" | |
org-publish-project-alist | |
`(("default" | |
:base-directory ,(org2jekyll-input-directory) | |
:base-extension "org" | |
:publishing-directory ,(org2jekyll-output-directory) |