Jump to content

Umberto

Member
  • Posts

    93
  • Joined

  • Last visited

Everything posted by Umberto

  1. You can create a shortcut that takes a photo, adds a "IMG_0001" text overlay and then saves the photo to the files app as IMG_0001.heic You can add a loop that increments a variable for sequential naming.
  2. I don't know of any app that does this but you can quite easily create a shortcut to do this
  3. Why not use home sharing? https://support.apple.com/guide/tv/stream-content-to-apple-tv-atvbc876df1e/tvos https://support.apple.com/en-us/HT202190
  4. For what it's worth, I've never used any anti virus software during my 17 years as a mac user.
  5. wait, so Elon Musk promised something that ended up not happening? Wow, that's shocking.
  6. Oh, it's "Family purchases and payments" that is the culprit. If your sister disables that you will still be able to share subscriptions from apps that offers family sharing (all Apple services do), but purchases will be billed to each separate apple id.
  7. The cause for this is likely due to your apple id in the family sharing group is setup as a "child" account.
  8. Nova is by far my favorite. Could it possibly be the nicest text editor on any platform? It's not the most feature rich or has the biggest library of plugins/extensions, but it sure is nice. Special shout out to Smultron that I used for well over a decade but I never see mentioned anywhere.
  9. As far as I could tell, .ova is just an archive so try to tar the files together and rename it to .ova
  10. Look up f-strings What I mean is instead of doing this: if scoreboard.seconds<10 and scoreboard.minutes>0: if scoreboard.minutes<10: minuteLabel.set_value(str(scoreboard.minutes)) secondLabel.set_value('0'+str(scoreboard.seconds)) clockLabel.config(text=' '+str(scoreboard.minutes)+':0'+str(scoreboard.seconds)) mainminuteLabel.set_value(str(scoreboard.minutes)) mainsecondLabel.set_value('0'+str(scoreboard.seconds)) else: minuteLabel.set_value(str(scoreboard.minutes)) secondLabel.set_value('0'+str(scoreboard.seconds)) clockLabel.config(text=str(scoreboard.minutes)+':0'+str(scoreboard.seconds)) mainminuteLabel.set_value(str(scoreboard.minutes)) mainsecondLabel.set_value('0'+str(scoreboard.seconds)) elif scoreboard.minutes==0: if scoreboard.seconds<10: minuteLabel.set_value('0'+str(scoreboard.seconds)) secondLabel.set_value(str(scoreboard.tenths)) clockLabel.config(text='0'+str(scoreboard.seconds)+'.'+str(scoreboard.tenths)+' ') mainminuteLabel.set_value('0'+str(scoreboard.seconds)) mainsecondLabel.set_value(str(scoreboard.tenths)) else: minuteLabel.set_value(str(scoreboard.seconds)) secondLabel.set_value(str(scoreboard.tenths)) clockLabel.config(text=str(scoreboard.seconds)+'.'+str(scoreboard.tenths)+' ') mainminuteLabel.set_value('0'+str(scoreboard.seconds)) mainsecondLabel.set_value(str(scoreboard.tenths)) else: if scoreboard.minutes<10: minuteLabel.set_value(str(scoreboard.minutes)) secondLabel.set_value(str(scoreboard.seconds)) clockLabel.config(text=' '+str(scoreboard.minutes)+':'+str(scoreboard.seconds)) mainminuteLabel.set_value(str(scoreboard.minutes)) mainsecondLabel.set_value(str(scoreboard.seconds)) else: minuteLabel.set_value(str(scoreboard.minutes)) secondLabel.set_value(str(scoreboard.seconds)) clockLabel.config(text=str(scoreboard.minutes)+':'+str(scoreboard.seconds)) mainminuteLabel.set_value(str(scoreboard.minutes)) mainsecondLabel.set_value(str(scoreboard.seconds)) Where each set_value method is duplicated 6 times, you can remove all of that using f-strings and calling each method once. For minuteLabel it would look like this: minuteLabel.set_value(f'{scoreboard.seconds:02d}' if scoreboard.minutes==0 else str(scoreboard.minutes)) Edit: This would reduce 39 lines of code down to just 5.
  11. Obvious duplicate code is : minuteLabel.set_value(str(...)) secondLabel.set_value(str(...)) clockLabel.config(text=str(...)) mainminuteLabel.set_value(str(...)) mainsecondLabel.set_value(str(...)) That you call 6 times. Use f-strings: f'{scoreboard.seconds:02d}' returns the desired formatted string
  12. There's very little difference in performance between the Air and the Pro so that shouldn't be a factor. It's the other factors that you should consider (brighter screen, bigger trackpad, touchbar etc). I went from a 13" Intel Pro to an M1 Air because I couldn't justify the higher price tag for the pro and I don't regret my decision. It doesn't get hot.
  13. It's not a file; it's a folder. Right click on your library and select "Show Package Content", et voilà.
  14. The instructions are wrong, you need to run python3 run-all-tests.py -vv python is version 2.7, and the instructions call for version 3.6 or later.
  15. http://dreamlo.com/lb/(your super secret very long code)/add/Carmine/100 Nice API... I don't know of anything like that but all the big guys offer free tiers, google cloud is what I prefer https://cloud.google.com/free But you have to write it yourself though.
  16. To clarify, the feature-richness of iOS/iPadOS I talk about are not features like "window-snapping" but specifically security and reliability features. System features. It's not something a regular user would notice or care about, but they are important and they do affect the user experience. Talking about macOS specifically, the last generational leap from Classic Mac OS to Mac OS X gave us, as I mentioned earlier, protected memory and preemptive multitasking. Protected memory is not a feature like "window-snapping", but it's very important nonetheless. Without protected memory, a process can access other processes' memory, which obviously isn't very secure. It could potentially corrupt memory belonging to other processes, which would cause crashes which obviously affects the reliability of a system. However, while having protected memory is more restrictive, more locked down, having it also makes for a more secure and reliable system. It's a feature. The next generational leap from Mac OS X to iPhoneOS (that became iOS and iPadOS) puts even more restrictions on apps. Not only are they restricted to what memory they can access, they are also restricted to which files they can access thanks to the strictly enforced sandboxing on iOS. Just like before we had protected memory and no restrictions on memory access, the desktop app has few restrictions on file acees and can read other apps' files, which isn't very secure, and potentially corrupt them, which isn't very reliable. Some apps use files for inter-process communication which can cause race conditions and all sorts of problems, just like some apps before protected memory would pass pointers between them for the same purpose. Sandboxing is more restrictive, just like protected memory, but it also makes the system more reliable and more secure. It's a feature. On Classic Mac OS, preemptive multitasking didn't really exist and a process could greedily hog all system resources and prevent other processes from doing work. With Mac OS X and preemptive multitasking, the system decides how resources are shared between processes. This is more restrictive, more locked down, but it also increases reliability. It's a feature. The next iteration on this idea is present in iOS. The app lifecycle in iOS can be simplified in the following states: Foreground -> Background -> Suspended. When an app is in the foreground it has "full" access to system resources but once you hit the home button or switch to a different app, the first app will enter a background state. In the background state the app has limited time to finish up whatever it was doing and unless it explicitly calls any of the provided background APIs (like audio playback, location service etc) the app will be suspended and the system can reclaim it's resources at any time. So the game you opened on your iPhone last week that you still can see in the app switcher, is not running or doing anything, but on the mac the app would just continue to run for a week unless I quit it and if after a week the app hits a bug that makes it use 100% cpu it will ramp up my fans and drain my battery. This scenario is obviously worse in terms of reliability. Restrictive management of app states is a feature, a reliability feature, just not a "window-snapping" feature. And they added features on top of macOS to make iOS. That's my point. iOS is macOS with new added things to replace the old (cocoa touch instead of cocoa), removal of old legacy stuff (like carbon) and new security and reliability features. iOS launched in 2007 with all these features already in place, and slowly over time they have added new capabilities and new APIs without breaking the security model. The model never changed. It is special to iOS/iPadOS, macOS has been playing catch up ever since and slowly added features like sandboxing, notarization, file access restrictions etc but the fundamental model is different. The mac might get there at some point though but there is a big challenge to migrate the mac app ecosystem to this new model. It might be easier to replace it with apps from the iOS ecosystem (which could be one explanation for mac catalyst). I have never called it a desktop operating. Desktop doesn't mean better necessarily, it just means old. The underlying technologies are more feature rich, yes. The security model is clearly the future as evident by the fact that the mac is slowly implementing similar features. I need xcode and it doesn't exist for the iPad. That doesn't mean that it can't exist without breaking the security model, it just doesn't yet. The features I'm missing out on on the mac are the security and reliability features that I mentioned. That's not how it works. There are APIs for persistent state preservation so that's an app-problem, not a system problem.
  17. I see this opinion a lot that iOS/iPadOS is not a "real" operating system and that it's just a stripped down version of macOS. But the reality is actually the opposite: Apple hasn't removed features from macOS to make iPadOS -- they have added features on top of macOS to make iPadOS. Just like the last generation of operating systems created "restrictions" like memory protection and preemptive multitasking, this new generation of operating systems expanded on those ideas with sandboxing and more restrictions on running processes' access to system resources. It's a further improvement on the same ideas. It's extra work. More code. So, iPadOS is not a lesser "toy" system but a more feature rich and more advanced system than its predecessor macOS. It's just not features in the same sense that youtube tech reviewers think. However, if users feel that they are too restricted on an iPad then obviously the available APIs are not enough and need improvement. And as a heavy macOS user I look to the iPad with envy of the features that I'm missing out on. But! Next generation or not, there are things I just can't do on an iPad so I'll just have to wait.
  18. I have the same model as you except 16gb of ram and currently Im running: 20 tabs in 5 windows in safari 3 tabs in chrome 3 projects in xcode + 1 simulator octave-cli slack 2 pdfs in preview 13 files in sublime (18 days uptime) And this is pretty much what's running on my macbook at any given time, except I don't always have chrome running and usually I have like twice as many safari tabs opened. I can't say I feel held back by my measly dual-core cpu (I wasn't even sure what cpu I had to be honest, I had to check before writing this post). I do incremental builds in xcode for the most part so performance there is not a problem but when I do a clean build it will take a while and the fans will go on full blast, but I can still watch youtube or whatever in the meantime. Very rarely do I have to do a clean build though. Out of curiosity, I just did 2 clean builds of two projects that took about 10 minutes to complete in total and I didn't notice any difference from doing just 1 project, except that it took longer obviously. Test number 2: Clean build of the same projects while also recording the screen. This took 18 minutes, most of which I spent playing a 12 minute youtube video and web browsing. Chrome was a lot more laggy than usual but safari worked pretty much like normal, spotlight took a lot longer than usual to show search results. No UI issues or anything like that. I also had all that other crap I mentioned above running while doing these tests. Lessons learned: Use native apps, there is some software stuff going on here. Also, for certain workloads (like gaming) where timing is important, this isn't really helping you because if it takes 80% longer to render each of your frames you will have a pretty bad experience. But for most other workloads it doesn't affect the experience much, except that it takes longer to complete the task (~4 minutes for 1 project clean build, ~10 minutes for 2 projects clean build, ~18 minutes for 2 projects clean build + screen recording) while still leaving the rest of the system in a good usable state. Just looking at the core count and drawing conclusions seems like a very simplistic approach.
  19. Any progress? Here's how you start. Open Xcode and go to file > new > project. Select iOS and "Single View App". Name your project and choose where to save it. Xcode has now created the project for you with a bunch of different files, but the only one that really matters for now is ContentView which is the root view. Currently it looks like this: import SwiftUI struct ContentView: View { var body: some View { Text("Hello, World!") } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } In the preview to the right of the screen, you'll see a preview of your app and it will display the text "Hello, World!". Unsurprisingly, its this line of code that produces that output: Text("Hello, World!") Now then, change the code in ContentView.swift to this: import SwiftUI struct ContentView: View { @State var x = 10 @State var y = 5 @State var showAnswer = false var body: some View { VStack { Text("\(x) * \(y) = ?") HStack { Button(showAnswer ? "Hide Answer" : "Show Answer", action: { self.showAnswer.toggle() }) Button("Next Problem", action: { self.x = Int.random(in: 1...12) self.y = Int.random(in: 1...12) self.showAnswer = false }) } if showAnswer { Text("\(x * y)") } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } Let's go through what the code does. This creates three variables: x, y and showAnswer. x and y are integers with an initial value of 10 and 5, respectively, and showAnswer is a boolean set to false. Why we need "@State" in front of the variable declaration is not something you need to care about for now. @State var x = 10 @State var y = 5 @State var showAnswer = false Just like "Hello, World!" displays that text, "\(x) * \(y) = ?" displays "10 * 5 = ?". \() is a way to escape the value of a variable and convert it to a string. If we didn't escape the values and only did "x * y = ?" we would display the text "x * y = ?" instead of the values of x and y. Text("\(x) * \(y) = ?") There are two components to a button: what it does, and what it looks like. This button: Button(showAnswer ? "Hide Answer" : "Show Answer", action: { self.showAnswer.toggle() }) Displays the text "Show Answer" when the variable showAnswer is false. if showAnswer is true, it will display the text "Hide Answer". The way it's written is called Ternary Conditional Operator and uses the format: question ? action if true : action if false. See the link. The next part of the button is its action which toggles the showAnswer variable. The next button: Button("Next Problem", action: { self.x = Int.random(in: 1...12) self.y = Int.random(in: 1...12) self.showAnswer = false }) Displays the text "Next Problem" and performs the following actions: Sets the x variable to a random integer between the values 1 and 12 Sets the y variable to a random integer between the values 1 and 12 Sets the showAnswer variable to false This code calculates and displays the answer x * y, but only if the variable showAnswer is true if showAnswer { Text("\(x * y)") } Lastly, VStack and HStack stands for Vertical Stack and Horizontal Stack, and arranges its content (child views) in a vertical line, and horizontal line, respectively. The view structure of our app is: VStack { Text() HStack{ Button() Button() } Text() } Which means that we stack three views vertically: a Text, an HStack and then another Text. Within the HStack we place two buttons, and they will be placed side by side because they are in a horizontal stack. Play around with the code and see what happens. Change the code to calculate the sum instead of the product. Change to code to calculate the product of two random integers between 1 and 10 instead of 1 and 12. And so on. You'll get the hang of it.
×