Skip to content

Instantly share code, notes, and snippets.

View omochi's full-sized avatar
🏠
Working from home

omochimetaru omochi

🏠
Working from home
  • Qoncept, Inc
  • Yokohama
View GitHub Profile
protocol Middleware<Input, Output, NextInput, NextOutput> {
associatedtype Input
associatedtype Output
associatedtype NextInput
associatedtype NextOutput
}
protocol Routes<Input, Output> {
associatedtype Input
associatedtype Output
import { Auth } from "@firebase/auth";
import * as firebaseui from "firebaseui";
import { ReactElement, useEffect, useRef, useState } from "react";
import { Random } from "../../components/Random";
import { Box, BoxProps } from "@chakra-ui/react";
export type FirebaseAuthViewProps = {
auth: Auth;
config: firebaseui.auth.Config;
} & BoxProps;

slidenumber: true autoscale: true

Swift6のprotocol

わいわいswiftc #36

@omochimetaru


slidenumber: true autoscale: true

SwiftSyntaxを

うまく使おう

わいわいswiftc #35

@omochimetaru


extension YearMonthDay: PostgresDataConvertible {
public static var postgresDataType: PostgresDataType {
.date
}
public init?(postgresData: PostgresData) {
guard let date = postgresData.date else {
return nil
}
self.init(date: date, calendar: .gregorian, timeZone: .gmt)
import NIO
extension EventLoop {
func chain<V0>(
_ v0: @escaping () throws -> EventLoopFuture<V0>
) -> EventLoopFuture<V0> {
self.tryFlatSubmit { try v0() }
}
func chain<V0, V1>(

slidenumber: true autoscale: true

今から使える

SwiftとC++の

新しいinterop手法

わいわいswiftc #29

@omochimetaru


class BracketQueryEncoder {
private result: [string, string][] = [];
encode(json: any): [string, string][] {
this.result = [];
this.encodeStep([], json);
return this.result;
}
encodeStep(path: string[], json: any) {

main

commit 0cd0cbc02adf2f794570cf102fde08089d7fdae2 (HEAD -> main, origin/main)
Merge: e65ae80172a 474aa2ed03a
Author: Doug Gregor <dgregor@apple.com>
Date:   Tue Jun 8 19:46:20 2021 -0700

    Merge pull request #37794 from DougGregor/isolated-parameters
    
import Foundation

enum E: Codable {
  case a(Int???)
}

let encoder = JSONEncoder()
encoder.outputFormatting = .prettyPrinted
let value: [E] = [