I hereby claim:
- I am ianks on github.
- I am ianks (https://keybase.io/ianks) on keybase.
- I have a public key ASBHlKmXo8r7i1OF61hp5hD2ANjGtymfYB6sp9Xw7EYY1wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| git clone --depth 1 --branch release/14.x https://github.com/llvm/llvm-project | |
| cd llvm-project | |
| mkdir build | |
| cd build | |
| echo "Configuring clang" | |
| cmake -G "Ninja" -DENABLE_SHARED=OFF -DLIBCLANG_BUILD_STATIC=ON -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release ../llvm |
| use magnus::{error::Error, exception, gc, value::Value, RTypedData, TryConvert, TypedData}; | |
| use std::{marker::PhantomData, ops::Deref}; | |
| /// A small wrapper for `RTypedData` that keeps track of the concrete struct | |
| /// type, and the underlying [`Value`] for GC purposes. | |
| #[derive(Debug)] | |
| #[repr(transparent)] | |
| pub struct WrappedStruct<T: TypedData> { | |
| inner: RTypedData, | |
| phantom: PhantomData<T>, |
| # How would I write a sig such that #wrapped_start the same type signature | |
| # as the subclass' #start method (i.e. Car#start or Boat#start) | |
| class Vehicle | |
| def wrapped_start | |
| start | |
| end | |
| end | |
| class Car < Vehicle | |
| sig { params(key: String, license: License).returns(T::Boolean) } |
| user nginx; | |
| worker_processes 10; | |
| worker_rlimit_nofile 16384; | |
| pid /var/run/nginx.pid; | |
| error_log /var/log/nginx/error.log warn; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
| { | |
| "id": 820982911946154500, | |
| "email": "[email protected]", | |
| "closed_at": null, | |
| "created_at": "2019-07-30T12:29:54-04:00", | |
| "updated_at": "2019-07-30T12:29:54-04:00", | |
| "number": 234, | |
| "note": null, | |
| "token": "123456abcd", | |
| "gateway": null, |
| class BlogPostCreator | |
| def create_post | |
| if similar_post_already_created? | |
| yield_to_user("This looks like a duplicate, sure you want to post this?") || halt | |
| end | |
| # do the things... | |
| end | |
| end |
| def sum_price(items: Enumerable<RespondTo[price: Integer]> | |
| # ... | |
| end |
| export class UserList extends React.Component { | |
| handleClick = (item) => console.log('You clicked ', this.props.group); | |
| render() { | |
| return ( | |
| <HugeListOfItems | |
| group={group} | |
| handleClick={this.handleClick} | |
| /> | |
| ); |