Skip to content

Instantly share code, notes, and snippets.

💥
Segfault in progress

Who? Me?! mark-i-m

View GitHub Profile
@mark-i-m
mark-i-m / rust2019.md
Last active Dec 24, 2018
rust2019.md
View rust2019.md

Rust 2019: Technical Debt, Continued Productivity, and Stability

A response to the call for Rust 2019 posts

I hope this post doesn't come across as a laundry list of stuff to do. Mainly, I consider a lot of this to be technical debt, and I would like to see it paid down a bit. Most of them also happen to be pain points that I have come across in my own usage of Rust, so perhaps I'm biased! Feel free to let me know...

Some of these are also just ideas intended to get people thinking. At the end, I discuss the hypothetical Rust 2021.

(EDIT: feel free to discuss here: https://internals.rust-lang.org/t/rust-2019-technical-debt-continued-productivity-and-stability/9004)

@mark-i-m
mark-i-m / up.debug
Created Nov 5, 2018
vagrant up --debug
View up.debug
$ vagrant up --debug
INFO global: Vagrant version: 2.2.0
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.0/gems/vagrant-2.2.0/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
View rust2018.md

This is for the [Rust2018 initiative][rust2018]. I will try to keep this brief, since I'm sure you have read a bunch of these.

Technical Debt

I have to 100% agree with [@nrc's post][nrc]. I feel like Rust has a lot of great things in the pipeline, but it worries me that there are so many [open tracking issues][track] and open issues in general (over 3100 at time of writing).

@mark-i-m
mark-i-m / interrupts.rs
Last active Jan 8, 2018
Trying out proposed inline asm syntax
View interrupts.rs
pub unsafe extern "C" fn irq0() {
asm!{
"
push %rax
movq $0, %rax
",
// No inputs
// No outputs
clobber("rax", "rsp")
};
@mark-i-m
mark-i-m / ycm_54c3rwsi.log
Created Nov 22, 2017
YCM server shut down
View ycm_54c3rwsi.log
2017-11-22 13:24:28,598 - ERROR - Unable to connect to server
Traceback (most recent call last):
File "/afs/cs.wisc.edu/u/m/a/markm/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/afs/cs.wisc.edu/u/m/a/markm/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/afs/cs.wisc.edu/u/m/a/markm/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
@mark-i-m
mark-i-m / machine.rs
Created Jul 18, 2017
Excerpt from x86_64 OS kernel interrupt/trap handling
View machine.rs
#[naked]
pub unsafe extern "C" fn irq0() {
asm!{
"push %rax
movq $$0, %rax "
: /* No outputs */
: /* No inputs */
: "rax", "rsp"
: "volatile"
View proto.rs
extern crate bytes;
extern crate serde;
extern crate serde_json;
extern crate tokio_io;
extern crate tokio_proto;
use tokio_io::{AsyncRead, AsyncWrite};
use tokio_io::codec::{Decoder, Encoder, Framed};
use tokio_proto::pipeline::ServerProto;
View Output
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
0 ^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^t^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.>f^.^.^.^.^.^.^.^.^.^.^.
1 ^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.<r^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.
2 ^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.
3 ^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.vt^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.
4 ^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.
5 ^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.
@mark-i-m
mark-i-m / euclid.py
Last active Aug 29, 2015
euclid.py
View euclid.py
#!/bin/env python2
import sys
# get first number
a = input('Enter first number: ')
print('a = %d' % a)
# get second number
b = input('Enter second numner: ')
You can’t perform that action at this time.