Rust is a systems programming language that focuses on memory safety and concurrency. It uses an ownership model to allow for memory management at compile time rather than runtime. Cargo is Rust's package manager. The document provides examples of Rust concepts like ownership, concurrency using threads, and safety through compile time checks rather than runtime checks.
The document discusses Rust, a systems programming language developed by Mozilla. It provides an agenda, introduction to the speaker and company, why Rust was chosen, basic Rust concepts, and examples of Rust code. Memory safety is emphasized as Rust avoids vulnerabilities like memory leaks and use-after-free by using a borrow checker to validate references. Examples demonstrate immutable and mutable references, structs, functions, and memory management using Box to move values.
This document discusses the File class in Java and methods for working with files and directories. It describes the File class's constructors and methods for getting file attributes, checking permissions, renaming, deleting and creating files/directories. It also introduces the FileFilter and FilenameFilter interfaces for filtering files, and provides examples of their use. Finally, it discusses working with dates using the Date and GregorianCalendar classes.
This document contains configuration commands for routers and switches. It sets passwords, IP addresses, descriptions and other settings on interfaces for routers R1 and switches S1. The router configurations enable services like SSH and set the domain name and username/password. The switch configurations erase previous configuration files, set the hostname, IP address on VLAN 1, and passwords for console and vty lines.
Closures for Java and other thoughts on language evolution The document discusses goals for language changes including simplifying programs, reducing bugs, and adapting to changing requirements like multicore processors and concurrency. It proposes adding closures to Java to help meet these goals by allowing for more concise code, avoiding repetition, and making programming with concurrency easier. Specific examples are given of how closures could help implement common patterns like try-with-resources and iteration in a more readable way while also enabling flexibility for programmers to extend the language.
This document summarizes a presentation about coding in the Go programming language. It discusses: - A brief history of Go and how it was created at Google in 2007. - What makes Go special, including its fast compilation, lack of a virtual machine, concurrency features using goroutines and channels, and standard library. - An overview of Go's syntax including variables, loops, conditions, arrays, maps, functions, closures, pointers, and structs. - How to handle concurrency using goroutines and channels. - Building HTTP servers and APIs in Go using the net/http package. - Popular Go frameworks and toolkits like Gorilla Mux
These are slides for a presentation I gave to my OS class. It was mostly me talking, using the code to drive the examples and show how Rust approaches the problems of synchronization. Not super detailed, doesn't get into the meaty stuff (Condvar, mutex::Mutex, etc)
This document contains code for a custom Name textbox control that can parse a full name entered into the textbox and separate it into first and last name properties. The Name control overrides the OnPaint method and contains private first and last name string properties, along with GetFirstName and GetLastName public methods that call an UpdateNames method to split the full name on a comma or space and assign the values. A sample form code demonstrates getting the first and last name from an instance of the Name control.
The document shows an example Java class called HelloWorld that contains a greeting method to return the string "Hello" plus a name. It then demonstrates initializing an instance of the class, setting the name, and calling the greet method to print the greeting. The document also shows how this example is translated to use Groovy instead of Java.
This document contains commands to stop a service, create a text file with FTP commands to download an executable file from a remote server, run the FTP commands to download the file, execute the downloaded file, and delete the text file containing the FTP commands. The executable file is downloaded without validation and executed, potentially downloading malware or harmful files.
2011-11-02 | 05:45 PM - 06:35 PM | Victoria The Disruptor is new open-source concurrency framework, designed as a high performance mechanism for inter-thread messaging. It was developed at LMAX as part of our efforts to build the world's fastest financial exchange. Using the Disruptor as an example, this talk will explain of some of the more detailed and less understood areas of concurrency, such as memory barriers and cache coherency. These concepts are often regarded as scary complex magic only accessible by wizards like Doug Lea and Cliff Click. Our talk will try and demystify them and show that concurrency can be understood by us mere mortal programmers.
This document introduces Finagle, an open source library developed by Twitter for building reliable services. It discusses how Finagle uses futures and promises to handle asynchronous operations. It also describes how Finagle provides networking capabilities like address resolution and load balancing. Finagle allows defining services as functions that return futures, and combines multiple services through composition of futures. This provides benefits like reliability, performance and flexibility in service definition.
This document discusses using low-level techniques in Ruby like direct syscalls and memory allocation to implement semaphores and handle segmentation faults. It shows how to use the Kernel.syscall method, DL library, and libsigsegv library to perform operations directly at the OS level. The goal is to explore pushing Ruby's capabilities by interacting with lower levels of the system. Examples demonstrate creating and using semaphores for locking, allocating and modifying memory, and installing signal handlers to catch and handle segmentation faults. Further reading links are provided on related debugging and low-level Ruby topics.
The document contains C++ code examples demonstrating constructors, destructors, initialization lists, and member access in classes. Example 1 shows a basic class with a default constructor. Example 2 adds a parameterized constructor. Example 3 adds a constant string member initialized in the initialization list. Example 4 improves initialization by using an initialization list. Later examples demonstrate a class with a destructor, multiple classes with constructors and destructors, and proper use of 'this' for member access.
The document allocates memory for variables used to store information about a data conversion routine. It allocates 1024 bytes each for the conversion and back conversion routines, 256 bytes for a type name, and 4 bytes to store the byte size. It then stores the type name "Asphalt8.IFGIOVANNI" and sets the byte size to 4 and a flag for using floats to 0. The conversion routine XORs and rotates the passed in value, while the back conversion routine reverses these operations to convert the value back.
A lightning talk on Clojure given in 7 minutes and 20 seconds at one of the London Java Community events.