Arkadiusz Świętnicki 🇨🇳 I HAVE MOVED
I have moved. Now you can find me at @nuno_nuno@mastodon.social
I found an extremely interesting and fun #Mac #app called #soundpaste. The idea is that you watch a video and if you hear something interesting you press the hotkey at the beginning of this thing and then you press the hotkey again and the audio is automatically copied to your CLipboard, ready to paste in Protools or whatever other DAW. It can record system audio without system driver, so that's a plus.
https://apps.apple.com/pl/app/soundpaste/id6471012328?l=pl&mt=12
I really love #Programming but I feel I am still too stupid to land a proper #job. I have no idea how to search, how to apply, how to introduce what I know and how to prove that I am willing to learn. I wish to work professionally as a programmer mainly to learn from colleagues to be stronger as a programmer. Money is less important factor.
#Swift is a very expressive programming language. Many of us seem to overlook a very interesting method that is available to us on sequence types. That method is `forEach` don't mistake it with the `ForEach` view of the #SwiftUI framework. The `forEach` method executes a given closure on *every* elemnt of the sequence in same order as a for loop does. The closure takes one parameter, and that parameter is, obviously the element ofthe sequence that is currently iterated over. So for an array defined as so
```
let countries = ["Russia", "Poland", "belarus", "China"]
```
something that most programmers would do would be
```
for country in countries {
print("\(country) is a very interesting country.")
}
```
Using the array's forEach methdo we can simplify this code to that
```
countries.forEach {
country in
print("\(country) is a very interesting country.")
}
```
There is a way we can simplify our code. It is shorthand parameter names for closures, where we can omit `country in` part and replace it with $0 in our print statement,
There are two important things to consider when thinking of using the forEach over a traditional forr loop.
1. We should really interpret the name name literally in this content. There is no break or continue statements here. The forEach method will iterate through *every* element of the collection, essentially stripping us from all the control we have over the execution flow.
2. It is pretty obvious but can make some people frustrated: when our closure returns, we return only from the current iteration, ski pping to the next one. It cannot be used like break.
#swift #apple #programming #tip
I think I have made something actually useful this time lol. A little backstory though: when I was younger and I was speaking with my friends and playing games I was screaming a lot. This was due to me wanting to scream over the chaos in my headphones. That annoyed everyone in my house so I put headphones and lower and lower volume overtime. When I grown up, the games I played were much calmer and so the problem solved itself. But, after returning to my family house after six months of apsence I discovered that my younger brother is doing an exact same thing! So I have build a session with #AudioHijack from @RogueAmoeba@mastodon.social that automatically ducks the whole system when a signal is detected from the microphone. Oh boy, neighbors will thank me hopefully. Here's the download link
https://www.icloud.com/iclouddrive/08aAQh5ngXmEVoNJykK99r5SQ#Microphone_Ducking
Say what you will about #MacOS but the professional software landscape is unparalleled. Today I have discovered Devon Agent which basically is a software which can search the web, but it can A: Save your searches in so called sets, so you can keep all your research in one place. B: searches many sources. C: Supports cross-source boolean operators, like and/Or. All of that for 50 euros for the pro version, absolutely mind-blowing, and #blind #accessible. Great work guys
There are 3 #Swift relatedt things i wanted to explore but I never had time to do so. They are
- Swift Argument Parser: a library for elegant and nice parsing of command-line argument
- SwiftSoup: a library used for web scraping
- Creating a full Swift utility as an SPM package rather than Xcode project. I was forced, or rather motivated to do all 3 thanks to my Chinese university studies. In order to download audio material for the official #HSK #book, one needs to go to a website, click a link for the file, and confirm whether you want to download it, for sure! Tage into account that the server is slow, and every such operation takes a minute or something like that, multiply that by the number of tracks and by the number of books. I have discovered that the HSk sites have the exactly same structure, hence I want to build an utility that will scrape the website and download the files for me and my teachers. I want to publish my work to Github so yall can roast the unstructuredmess it is heh. There's always room for improvement.
I am playing with the NaturalLanguage framework in #Swift and I am having some interesting results. Here are the most similar words to the word „Dictatorship”. The left column are the words, the right is the distance. The more distant, the less similar the word is.
dictator 0.7791867852210999
autocracy 0.7871801853179932
dictatorial 0.7904724478721619
regime 0.7980139851570129
democracy 0.8397299647331238
totalitarian 0.845069408416748
repressive 0.8523193001747131
oligarchy 0.8619794845581055
despotism 0.8681145310401917
despot 0.8691430687904358
Here is the code I used.
import NaturalLanguage
guard let embedding = NLEmbedding.wordEmbedding(for: .english) else {
print("Nic z tego nie będzie.")
fatalError()
}
let words = embedding.neighbors(for: "dictatorship", maximumCount: 10)
for word in words {
print("\(word.0)\t\(word.1)")
}
#apple #swift #programming #CodingFun #iOS #macOS
I have to explore that use of DT further as it seems pretty niche and obscure (people on the forum didn't make such a topic before) but I am confident it can be done and it can help. 4. Paperwork: I have many invoices, serial numbers, contracts, acts and many other legal stuff. Everyone does but the problem with me is that I am helping some others with their paperwork. With advanced organization capability of DT I can very easily see which paper belongs to whom and whether I have already filled it, whether its a template that I can reuse over and over to ask my dear government for a piece of bread or whatever else that comes to mind. Another awesome thing is the automatic OCR feature, I have set up a simple smart rule which automatically OCRs every non-textual PDF, and since DT interfaces with Finereader's engine the results is very good, I would dare to say its better than the official Finereader for Mac, but that is subjective, might be inaccurate or accurate only in certain scenarios, be ware. I have just wrote four things that came to mind otherwise this would become the second Bible, but the tool has endless use cases. Its not cheap and its not for everyone, but if you want to try it it has a very fair trial. If you have any questions, let me know. Let's learn DEVON Think together! #blind #accessibility #a11y #VoiceOver #Mac #software (2/2)
What I love about #Apple #programming interfaces and frameworks is that basic #CoreML is easier done right than basic remote playback of a live-streamed audio. Yet its still far ahead of Win32 IMHO.
A quick #MacOS #audio #tip. IF you want to fix the #YouTube lag when skipping forward or rewinding, go to audiomidi setup, choose your sound card, choose „Output” and change the sample rate to 192 or higher. Thanks the @RogueAmoeba@mastodon.social for their SoundSource manual that shown me that trick.
#Music #Appreciation
Slava, $russian brothers!
https://www.youtube.com/watch?v=o7aqxxt0e68&list=RDkD4SiKnEGO0&index=6
So I think I am actually suffering from #burnout or what the fuck it is. I have looked at a pretty large, major app for MacOS on Github and when browsing through its code I found many places where I was like „Oh yeah, it works but the code is messy" and I had a mental map of fixing it, yet, if someone asked me to sit in front of Xcode and fix, I would die, even thugh I really love #programming and I want to do much more of it. What can I do?
I have played Papasangre II in 2024. The game is 12 years old, yet is as impressive as ever, however I remembered it as much harder. Now I just treat it as a „point and walk” type of game, yet what they done with 3D sound and gyro movement was awesome on its own in 2012.