Does anyone know of popular platforms / CMSes that do not have built-in #RSS support? 🤔
9.3.2024 19:43Does anyone know of popular platforms / CMSes that do not have built-in #RSS support? 🤔@jensimmons Hello! Several people pointed me to ask you about webkit-related issues, would this be correct?
Currently in SvelteKit we are facing a webkit top-level await bug filed here: https://bugs.webkit.org/show_bug.cgi?id=242740
We are currently working around it by removing the top-level await: https://github.com/sveltejs/kit/pull/11601
Is there some path forward to progress on a fix now that native ESM is becoming more common?
17.1.2024 16:31@jensimmons Hello! Several people pointed me to ask you about webkit-related issues, would this be correct?Currently in SvelteKit we are...Pausing the SwiftUI course atm to focus on studying for a Japanese test tomorrow.
14.1.2024 12:23Pausing the SwiftUI course atm to focus on studying for a Japanese test tomorrow.🎉 Day 22 of the #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/22 by @twostraws
Accidentally did 2/3 of the challenges yesterday, and adding a game over state wasn't too difficult.
Quick day, I suppose.
🎉 Day 21 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/21 by @twostraws
Implemented the scoring ahead of time, and also made the app tell the user which flag they picked when they get the answer wrong.
🎉 Day 20 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/20 by @twostraws
Today had buttons, images, and stacking, so I implemented a Swap Units button into my challenge app from yesterday.
The function is very simple as in any language with tuple/list deconstruction:
func swapUnits() {
(sourceUnit, targetUnit) = (targetUnit, sourceUnit)
}
8.1.2024 12:17🎉 Day 20 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/20 by @twostrawsToday had buttons, images, and stacking, so...🎉 Day 19 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/19 by @twostraws
Today is a challenge day, so I made a conversion app for... a particular way of measuring time.
#hololive
Not even going to try replicate the picker wheel in the #Svelte 5 Runes version, but at least it was very easy to achieve the functionality of a tip range.
6.1.2024 06:10Not even going to try replicate the picker wheel in the #Svelte 5 Runes version, but at least it was very easy to achieve the functionality...🎉Day 18 of #100DaysOfSwiftUI at https://hackingwithswift.com/100/swiftui/18 by
@twostraws
I thought 0...100
has better clarity than 0..<101
for this case, and that .pickerStyle(.wheel)
has better ergonomics than .pickerStyle(.navigationLink)
for this usage, so I did those for my version.
Tried my best to replicate functionality and UI in #Svelte 5 Runes!
Note that SwiftUI does even more heavy lifting both on the UI end, the internationalization end, and the accessibility end that I have to make do with in this version.
🎉 Day 17 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/17 by @twostraws
This part:
let peopleCount = Double(numberOfPeople + 2)
doesn't quite address the core issue.
It was cleaner to make sure the ForEach
had a id: \.self
to avoid the + 2 in the first place:
Picker("Number of people", selection: $numberOfPeople) {
ForEach(2..<100, id: \.self) {
Text("\($0) people")
}
}
Then you can avoid needing a random-looking + 2
in the code.
🎉 Day 16 of #100DaysOfSwiftUI at https://hackingwithswift.com/100/swiftui/16 by
@twostraws
It's striking how similar the #SwiftUI code looks to #svelte 5 runes.@State
≈ $state
ForEach
≈ {#each}
block
SwiftUI goes further and requires an identifier for each element, whereas most web frameworks make that optional with a warning.
🎉 Day 15 of #100DaysOfSwiftUI
Refresher of Days 1-14. "Corrections" to earlier days:
let
is only immutable when dealing with struct instances, not class instanceslet
and var
array[index] ?? "default"
🎉 Day 14 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/14 by @twostraws
Covered all the different ways you can handle optionals:
if let
guard let
(reverse if let
, useful for early returns)nil
coalescingtry?
guard let
is just another point for the already long list of Swift QoLs, and it really adds up.Today's checkpoint also got me to realize arrays already have a builtin .randomElement()
which returns an Int?
- another QoL due to treating optionals as a first-class concept.Does anyone know of something like regex101 (which has unit tests) for #postgres flavored #regex?
Apparently it has stuff like \y
instead of \b
, because apparently \b
is backspace in #postgresql
like it's kind of mindblowing someone can write
extension Collection {
var isNotEmpty: Bool {
isEmpty == false
}
}
and all types that implement that protocol just... gain a new .isNotEmpty
computed property you can use, including but not limited to arrays, sets, and dictionaries.
🎉 Day 13 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/13 by @twostraws
So protocols are like traits/interfaces, but protocol extensions let me ascribe behavior across all implementors of that protocol - even if I didn't write the original protocol. This is really neat!
🎉 Day 12 of #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/12 by @twostraws
Swift classes reintroduce back the referential concepts of classical OOP systems like Java, as opposed to prototype inheritance you'd see in JavaScript or Python.
This referential copy behavior seen in class instances, vs struct instances which are copy-by-value, is my biggest takeaway.
🎉 Day 11 of #100DaysOfSwiftUI at https://hackingwithswift.com/100/swiftui/11 by
@twostraws
Loving the clarity that Swift enforces, private(set)
, mutating
are all "unnecessary" in other languages, but give you confidence here.private(set)
only privates the setter of the variable, letting you read the variable via instance.currentGear
.
When I write let
I can be confident in deep immutability. At first, I actually wrote
let car = Car(model: "Vroom 9000", numberOfSeats: 4)
car.gearUp()
Until the compiler reminded me Cannot use mutating member on immutable value: 'car' is a 'let' constant
.
⬆️
⬇️