Skip to content

Instantly share code, notes, and snippets.

View LucioFranco's full-sized avatar

Lucio Franco LucioFranco

View GitHub Profile
public LinkedList iCopy() {
LinkedList temp = new LinkedList();
Node currentNode = this.startNode;
while(currentNode != null) {
temp.add(currentNode.getValue());
currentNode = currentNode.getNextNode();
}
return temp;
}
// components.rs
use amethyst::ecs::{Component, VecStorage};
#[derive(Debug)]
pub struct Position {
pub x: f32,
pub y: f32,
pub z: f32,
}
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(((false)) or true)")))) true)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(not true)")))) false)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(if true then ((false) or true) else false)")))) true)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(let (verytrue false) in (verytrue))")))) false)
(check-expect (eval-program (bool-parser (lex-this bool-lexer (open-input-string "(let (tango (lambda (x) (x and false))) in (call tango with true))")))) false)

Keybase proof

I hereby claim:

  • I am luciofranco on github.
  • I am luciofranco (https://keybase.io/luciofranco) on keybase.
  • I have a public key ASCkjMKCgrqAIgx1cE5rUGm_RIYLk0d2xDgCb-WbAtgPNgo

To claim this, I am signing this object:

Amethyst Networking TODO

  • Fix warnings
  • Make docs + book section
  • Merge
  • Prototype a proper connection manager (partially implemented in connection_manager.rs)
  • Abstract away UdpSocket behind a trait so we can also have tcp and others
  • Different ways of sending messages (reliable ordered, reliable unordered, unreliable/fast)
  • Finish filter (partial implementation in filter.rs)
  • then comes the harder stuff: Entity creation deletion and sync
;;; package --- My Personal Emacs config
;;; Comentary:
;;; Code:
;; Debug when errors happen
(setq debug-on-error t)
(message "Loading configuration...")
// This is the position of some entity.
// It is syncable but has no reliability guarentees.
// Questions:
// - How do we let the server determine values and
// verify them and replicate them properly?
#[derive(Deserialize, Serialize, Sync)]
struct Position {
x: u16,
y: u16,
}
amethyst v0.9.0 (/Users/lucio/code/amethyst)
├── amethyst_animation v0.4.0 (/Users/lucio/code/amethyst/amethyst_animation)
│ ├── amethyst_assets v0.5.0 (/Users/lucio/code/amethyst/amethyst_assets)
│ │ ├── amethyst_core v0.4.0 (/Users/lucio/code/amethyst/amethyst_core)
│ ├── amethyst_core v0.4.0 (/Users/lucio/code/amethyst/amethyst_core) (*)
│ ├── amethyst_derive v0.2.0 (/Users/lucio/code/amethyst/amethyst_derive)
│ ├── amethyst_renderer v0.9.0 (/Users/lucio/code/amethyst/amethyst_renderer)
│ │ ├── amethyst_assets v0.5.0 (/Users/lucio/code/amethyst/amethyst_assets) (*)
│ │ ├── amethyst_core v0.4.0 (/Users/lucio/code/amethyst/amethyst_core) (*)
│ │ ├── amethyst_derive v0.2.0 (/Users/lucio/code/amethyst/amethyst_derive) (*)
use tower_service::Service;
use futures::Future;
use tokio_io::{AsyncRead, AsyncWrite};
use std::net::ToSocketAddrs;
pub trait ConnectService<A: ToSocketAddrs>{
type Response: AsyncRead + AsyncWrite;
type Error;
type Service: Service<A>;
type Future: Future<Item = Self::Response, Error = Self::Error>;