Search
15 results for “pointfreeco”
-
@bok @tonyarnold Do you have any examples you can share of where type inference was impacted? Also worth noting that you can always write SQL strings still in a schema safe manner: https://github.com/pointfreeco/swift-structured-queries/blob/20db4a2a446f51e67e1207d54a23ad0a03471a7b/Tests/StructuredQueriesTests/SQLMacroTests.swift#L10-L18
That still leverages the static symbols of your schema but in a safe SQL string.
The type-safety and schema-safety in our query library has its tradeoffs. We want people to be able to write safe SQL queries, but it often seems like Swift's variadic generics are not up for the job.
Also worth noting that SwiftData's #Predicate breaks down even sooner and more spectacularly from our experience. It's just a hard problem to solve, and that's why we expose an API for safe SQL strings.
-
I'm loving the new @pointfreeco SharingGRDB framework! It's so much better to work with value-type models than reference-type models.
In the code below I'm migrating from SwiftData to SharingGRDB. First I put the creation of the Weight.Draft inside the async block below. This gave me an error because the SwiftData models are not sendable. The SharingGRDB models are so the fix was so simple :)
#swift #swiftlang #swiftdata #sharinggrdb #structuredconcurrency
-
Wondering if you can share your data with SQLiteData from @pointfreeco Well wonder no more. It just works!!!!!
Fantastic #CloudKit #Swift #SwiftUI #SQLite -
Someone told me after my talk that it "felt like a @pointfreeco episode, but live on stage". I have to say, this is the best compliment I can imagine! 🫠
Those guys rock, after all. 🤘
Here’s the talk:
https://youtu.be/SEwI6vjC1Bw?si=zRzxN7xkt_soA-4v -
I’ve suffered from slow snapshot tests with pointfreeco’s swift-snapshot-testing for quite a while. Investigated and isolated the slowness to this loop over the image byte buffers. Takes several seconds on my local machine, and even longer on Xcode Cloud.
Turns out there is a PR sitting there which is about exactly that, and the fix does work for me. And it also points to an open Swift bug. https://github.com/pointfreeco/swift-snapshot-testing/pull/664
-
#Swift #SwiftUI #XCTest #SnapshotTesting
I’m having trouble with Pointfreeco’s snapshot testing. Tests run and complete fine, but there’s a delay at the end of the test process. I can’t figure out where it’s coming from or what causes it. Reduced to a very simple fully reproducible example in my environment.
Anyone have any ideas?
https://github.com/pointfreeco/swift-snapshot-testing/issues/752
-
1,932 files for about 38 MB… now sure we tested all the cases for our design system. All the cases, for today.
Happy to use the swift-snapshot-testing library for these UI tests :yay:
-
To my iOS Dev Bubble here: I‘m starting to modularize a big app in 2 weeks and want to prepare with best practices. We want to use the composable architecture by @pointfreeco and if possible also use SPM Modules to make sure we have no unwanted dependencies between parts of our code.
I‘m happy to hear about your experience, tutorials, videos and resources in general. Especially on how to organize stuff and where best to start.
#iOS #swift #composableArchitecture #spm #modularArchitecture
-
Do you know about Swift 6.2’s “nonisolated(nonsending)”?
You may be benefiting from it and not even realize! You’re even already using it if you turned on “approachable concurrency.”
It helps you avoid a whole class of concurrency errors that plagued earlier versions of Swift.
Learn all about it in our video on “approachable concurrency”: https://www.pointfree.co/episodes/ep365-isolation-approachability
-
#PointFree released their #ComposableArchitecture today! This system seems very wordy, but I’m going to find a personal project to try it out to see what it unlocks
Congratulations to all of the contributors!
-
#HowToThing #029 — One for the #Forth friends: Minimal livecoding playground for animated 2D geometry generation (incl. SVG export) using a Forth-like DSL (domain-specific language) based on https://thi.ng/pointfree, https://thi.ng/pointfree-lang and various geometry related operations using https://thi.ng/geom. A short screen recording is included to demonstrate overall usage. This is a cutdown version of a prototype tool, originally from 2019...
Even though the language is "Forthy", the underlying thi.ng/pointfree implementation does _not_ use a VM, but instead compiles words to vanilla JavaScript using normal functional composition (or reductions) and each word is passing data & state via a single shared stack context object (with the usual dual data & return stacks and an environment object with var bindings). The language supports quotations, local variables, combinators etc.
I _highly_ recommend consulting the detailed readme docs for the above packages to familiarize yourself with the basic principles & language features/syntax. If you do have some prior #Forth knowledge, many aspects should feel familiar (apart from the geometry DSL terms)...
Also worth pointing out that the editor/interpreter in this small example is not super forgiving re: error handling and might easily crash when live coding. The point of this demo is not about providing great UX, but to illustrate how the basic thi.ng/pointfree language infrastructure can be easily extended/adapted/integrated...
Demo:
https://demo.thi.ng/umbrella/pointfree-geom/Source code:
https://github.com/thi-ng/umbrella/tree/develop/examples/pointfree-geom/src(Note: The source code of the actual language bindings for the geometry operations is not shown here, but available in the `lang.ts` file, linked above...)
#Forth #Pointfree #Concatenative #Programming #Geometry #Graphics #SVG #GenerativeArt #GenerativeDesign #TypeScript #JavaScript #ThingUmbrella
-
@akkartik Here's a small example using my #Forth-like DSL & livecoding REPL for 2D geometry generation with SVG export. The example source code is stored in the URL hash, but not sure how Mastodon handles it (let's try):
A commented alt-version of this example (same URL minus the hash fragment):
https://demo.thi.ng/umbrella/pointfree-geom/Project/example homepage:
https://github.com/thi-ng/umbrella/tree/develop/examples/pointfree-geom/Made with these packages:
- https://thi.ng/geom
- https://thi.ng/pointfree
- https://thi.ng/pointfree-lang -
Over the past few days I've been working on extending & re-packaging the procedural text generation engine from one of the old examples into a new package and also just wrote/updated documentation for its various features:
- variable definitions, optionally with multiple value choices
- cyclic & recursive variable references/expansion
- variable assignments
- dynamic, indirect variable lookups (for context specific situations)
- optional preset & custom modifiers (i.e. pointfree/concatenative application of modifier sequences)
- controlled randomness during var expansionThe new package is called: https://thi.ng/proctext (6.5KB incl. all deps) The text format used relies on a simple parser grammar defined and processed via https://thi.ng/parse. The resulting document AST is then interpreted via https://thi.ng/defmulti
Please see readme for notes/examples, as well as the refactored example project below. The tool is very useful for complex source code generation, but also could be useful for bots, interactive fiction etc. The generator is stateful and variable state can be optionally retained/re-used over multiple invocations. Making all modifiers async is also providing a lot of flexibility (e.g. loading external data sources, generating secondary/expanded descriptions etc.)
Demo (incl. 5 examples and can be used as playground):
https://demo.thi.ng/umbrella/procedural-text/#ThingUmbrella #RewriteSystem #ProcGen #TextGeneration #CodeGenerator #Parser #DSL #Pointfree #TypeScript #JavaScript #InteractiveFiction
-
What do you prefer?
```
\a b -> (a, Just b)
```or:
```
(. Just) . (,)
```and why?