Skip to content

Instantly share code, notes, and snippets.

View InfRandomness's full-sized avatar
🐈

InfRandomness

🐈
View GitHub Profile
public protocol SIMDStorage {
associatedtype Scalar : Decodable, Encodable, Hashable
var scalarCount: Int { get }
init()
subscript(index: Int) -> Self.Scalar { get set }
}
@InfRandomness
InfRandomness / test.swift
Created June 22, 2022 11:29
ZIPFoundation basic code
import Foundation
import ZIPFoundation
let fileManager = FileManager()
let currentWorkingPath = fileManager.currentDirectoryPath
var sourceURL = URL(fileURLWithPath: currentWorkingPath)
sourceURL.appendPathComponent("file.txt")
var destinationURL = URL(fileURLWithPath: currentWorkingPath)
destinationURL.appendPathComponent("archive.zip")
do {
running 12 tests
test concurrency::range_object_map::tests::boundaries ... ok
test concurrency::range_object_map::tests::perfectly_overlapping ... ok
test concurrency::range_object_map::tests::empty_map ... ok
test concurrency::range_object_map::tests::no_overlapping_inserts - should panic ... ok
test concurrency::range_object_map::tests::straddling ... ok
test eval::tests::windows_argv0_no_escape ... ok
test range_map::tests::basic_insert ... ok
test intptrcast::tests::test_align_addr ... ok
test eval::tests::windows_argv0_panic_on_quote - should panic ... ok
rm -rf "prefix/x86_64-unknown-redox/relibc-install.partial" "prefix/x86_64-unknown-redox/relibc-install"
cp -r "prefix/x86_64-unknown-redox/rust-install" "prefix/x86_64-unknown-redox/relibc-install.partial"
rm -rf "prefix/x86_64-unknown-redox/relibc-install.partial/x86_64-unknown-redox/include/"*
cp -r "prefix/x86_64-unknown-redox/rust-install/x86_64-unknown-redox/include/c++" "prefix/x86_64-unknown-redox/relibc-install.partial/x86_64-unknown-redox/include/c++"
cp -r "prefix/x86_64-unknown-redox/rust-install/lib/rustlib/x86_64-unknown-linux-gnu/lib/" "prefix/x86_64-unknown-redox/relibc-install.partial/lib/rustlib/x86_64-unknown-linux-gnu/"
rm -rf prefix/x86_64-unknown-redox/relibc-install.partial/lib/rustlib/src
mkdir prefix/x86_64-unknown-redox/relibc-install.partial/lib/rustlib/src
ln -s /root/redox/rust prefix/x86_64-unknown-redox/relibc-install.partial/lib/rustlib/src
cd "/root/redox/relibc" && \
export PATH="/root/redox/prefix/x86_64-unknown-redox/relibc-install.partial/bin:$PATH" && \
@InfRandomness
InfRandomness / cmake-irix.patch
Last active June 10, 2021 20:11
Patch to make CMake 3.20.3 build on SGI-IRIX
Index: Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
--- a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c (revision 13d112ea03f2b068da1f7ac3239a42a6cff94eda)
+++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c (date 1623343720115)
@@ -2526,7 +2526,7 @@
tree_current_lstat(struct tree *t)
@InfRandomness
InfRandomness / clang-cl.patch
Created June 10, 2021 16:26
Patch to make CMake 3.20.3 compile with clang-cl
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 6adc9cf6a8..e147951dd2 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -80,6 +80,12 @@ if(CMake_BUILD_DEVELOPER_REFERENCE)
)
endif()
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ if ("${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")