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
class Arrow (A : Type u → Type u → Type w) where | |
comp (outer : A β γ) (inner : A α β) : A α γ | |
ofFunction : (α → β) → A α β | |
mapFirst : A α β → A (α × γ) (β × γ) | |
instance : Arrow (· → ·) where | |
comp := Function.comp | |
ofFunction := id | |
mapFirst arrow | (a, g) => (arrow a, g) |
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
import Lean | |
/-- | |
`(h : a) ∧ b`, the "dependent and" connective. This is a conjunction | |
just like `And`, but to even state the right hand side proposition, | |
we need the left hand side to hold. | |
Due to proof irrelevance, this is not actually quite as dependent as | |
it might look. | |
-/ | |
structure DAnd {a : Prop} (b : a → Prop) : Prop where |
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
import kotlinx.coroutines.channels.SendChannel | |
import kotlinx.coroutines.coroutineScope | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.channelFlow | |
import kotlinx.coroutines.flow.collectIndexed | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.suspendCancellableCoroutine | |
import kotlinx.coroutines.sync.Mutex | |
import kotlinx.coroutines.sync.Semaphore | |
import java.util.* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#include <stdio.h> | |
#include <type_traits> | |
#include <utility> | |
#include <new> | |
template<typename T> | |
void forget1(T &&value) { | |
union Forget { | |
~Forget() { } | |
typename std::remove_reference<T>::type t; |
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
#include <cstddef> | |
#include <iostream> | |
#include <string_view> | |
template<typename T> | |
static constexpr inline const char *helper1() { | |
// Must have the same signature as helper2(). | |
return __PRETTY_FUNCTION__ + __builtin_strlen(__FUNCTION__); | |
} |
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
// Note: calling fork() can be unsafe and dangerous, that | |
// is why Swift doesn't let you invoke it directy. Be very | |
// careful about how you use fork(). For some more details, | |
// see https://www.evanjones.ca/fork-is-dangerous.html and | |
// http://www.sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html | |
import Darwin | |
let RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: -2) | |
let forkPtr = dlsym(RTLD_DEFAULT, "fork") |
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
diff --git a/src/main.rs b/src/main.rs | |
index ac542de..e40605d 100644 | |
--- a/src/main.rs | |
+++ b/src/main.rs | |
@@ -16,12 +16,10 @@ use futures_timer::*; | |
use gio::prelude::*; | |
use gtk::prelude::*; | |
use librgs::ServerEntry; | |
-use static_resources::Resources; | |
use std::sync::{ |
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
#ifndef __OBJC2__ | |
#define __OBJC2__ | |
#endif | |
struct objc_selector; struct objc_class; | |
struct __rw_objc_super { | |
struct objc_object *object; | |
struct objc_object *superClass; | |
__rw_objc_super(struct objc_object *o, struct objc_object *s) : object(o), superClass(s) {} | |
}; | |
#ifndef _REWRITER_typedef_Protocol |
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
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) Backtrace: | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 0: /usr/bin/Xwayland (OsLookupColor+0x139) [0x5909c9] | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7ffae328d5bf] | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 2: /usr/bin/Xwayland (os_move_fd+0x2ca0) [0x599b40] | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 3: /usr/bin/Xwayland (dri3_send_open_reply+0x6d) [0x4f123d] | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 4: /usr/bin/Xwayland (InitExtensions+0x657) [0x42ab17] | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 5: /lib64/libffi.so.6 (ffi_call_unix64+0x4c) [0x7ffae282ac58] | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 6: /lib64/libffi.so.6 (ffi_call+0x32a) [0x7ffae282a6ba] | |
Mar 05 12:35:43 org.gnome.Shell.desktop[1659]: (EE) 7: /lib64/libwayland-client.so.0 (wl_log_set_handler_client+0x1c9e) [0x7ffae506e80e] |
NewerOlder