Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.is
As of August 28th, 2025, Expert LSP has been released: https://github.com/elixir-lang/expert
Although still a work in progress, the plan is for the other three LS implementations to be archived. I may try to come up with a new way to track Expert's featureset, but I would probably contribute that back to Expert as documentation.
As of August 15, 2024, it's been announced that the three projects bein compared here will soon merge! See the official Elixir blog post for more details: https://elixir-lang.org/blog/2024/08/15/welcome-elixir-language-server-team/
Swift's automatically provided memberwise initializer is a powerful feature. However, when an explicit initializer is present, Swift omits its memberwise initializer:
struct Person: Decodable {
let name: String
enum CodingKeys: CodingKey {
case name
This file contains hidden or 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
| # Clone llama.cpp | |
| git clone https://github.com/ggerganov/llama.cpp.git | |
| cd llama.cpp | |
| # Build it | |
| make clean | |
| LLAMA_METAL=1 make | |
| # Download model | |
| export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin |
This file contains hidden or 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
| /** | |
| * General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts. | |
| * | |
| * Note that this uses an older fork of stable-diffusion | |
| * with the 'txt2img.py' script, and that script was modified to | |
| * support the --outfile command. | |
| */ | |
| var { spawn, exec } = require("child_process"); | |
| var path = require("path"); |
This file contains hidden or 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
| // Taken from https://github.com/pointfreeco/swift-snapshot-testing/pull/628/files | |
| import Foundation | |
| import SwiftUI | |
| @testable import SnapshotTesting | |
| #if os(iOS) || os(tvOS) | |
| import CoreImage.CIFilterBuiltins | |
| import UIKit |
This file contains hidden or 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 SwiftUI | |
| /// A wrapper view that provides a mutable Binding to its content closure. | |
| /// | |
| /// Useful in Xcode Previews for interactive previews of views that take a Binding. | |
| struct Stateful<Value, Content: View>: View { | |
| var content: (Binding<Value>) -> Content | |
| @State private var state: Value | |
| init(initialState: Value, @ViewBuilder content: @escaping (Binding<Value>) -> Content) { |
This file contains hidden or 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
| public enum InputField<Value: Equatable> { | |
| /// The state of current input validation | |
| public enum InputValidation: Equatable { | |
| /// A value that has undergone validation and is found to be valid. | |
| case valid(Value) | |
| /// A value that has undergone validation and is found to be invalid. | |
| /// Optionally, a feedback message can be displayed to the user | |
| /// to let them know what the issue with their input is. | |
| /// For example: "Please enter a value between 10 and 100." | |
| case invalid(Value, feedback: String?) |
NewerOlder
