#development

1 messages · Page 238 of 1

timid furnace
#

Also I didn't update my main

native dune
#

Yeah definitely

timid furnace
#

Aria2

wooden yarrow
#

oh

light owl
native dune
light owl
#

U did nothing here twin

native dune
#

i dont care

light owl
#

All u did was clean up the code

wooden yarrow
#

hm

timid furnace
light owl
#

@native dune Apple Developer Program - Membership for one year
Enrolment Complete
Order Placed(Completed)Electronically Delivered(Completed)
Thanks for being a part of the Apple Developer Programme.

native dune
#

Is it done

wooden yarrow
light owl
wooden yarrow
fading shell
rocky oriole
#

And the average user can typically not even know how to clone a github repo...

wooden yarrow
#

i know there are adjacent ones but not directly

last merlin
wooden yarrow
robust radish
faint timber
cosmic briar
#

how do you get in

fading shell
#

Mainly for devs

faint timber
#

Helps to participate in chats

fading shell
cosmic briar
#

pwease 🥺

robust radish
rocky oriole
fading shell
radiant idol
#

it's not even only for orange names

#

channel name is a lie

hasty ruin
#

yeah unfortunately nightwind was let in

radiant idol
#

true

sonic totem
odd ivy
#

iPhone 16pro. In lost mode. Is there any hope of recovery.

kind herald
#

!t icloudbypass

faint lionBOT
# kind herald !t icloudbypass
icloudbypass

Discussion of iCloud/Activation Lock/passcode/MDM (Mobile Device Management) bypass, asking how to do it, or posting about it is not allowed. No, it doesn't matter if the phone is yours or not. We will not help you with it. If you do own it, it’s recommended to use the links below.

If you forgot your Apple ID - Apple Support

If you forgot your Apple ID password - Apple Support

How to remove Activation Lock - Apple Support

If you forgot the passcode on your iPhone, or your iPhone is disabled - Apple Support

lime pivot
#

never worked that many hours (paid) but rn I'm missing being in an office and working consistent hours

#

always working 8 hrs

#

working from home I do either a lot more or a lot less

jagged willow
timid furnace
#

There are 692.8 TiB of stuff in AppleDB: 77.3 TiB of IPSWs, 98.7 TiB of full OTAs, 511.2 TiB of delta OTAs

#

wait

#

that's just iOS/iPadOS/macOS/tvOS/audioOS/visionOS/watchOS

#

696.7 TiB of stuff: 77.4 TiB of IPSWs, 98.7 TiB of full OTAs, 511.2 TiB of delta OTAs

#

pre 2015 was just like 5.8 TiB of stuff

faint timber
#

no way

magic hazel
#

swift 1 is so bad

#
Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in
    UIView.animate(withDuration: 1.0) {
        self.view.backgroundColor = self.colourChanger()
    }
}```

WHY CANT I DO THIS
#

😭

#

its all obj c based

#

atp idek if i should just learn obj c

#

i mean i like not having to memory manage stil

#

and i like that my code is actually readable

#

but still

#

this is painful

#

getting what i have rn would literally take me like 8 lines in swiftui

#

its not even funny

#

all of this just for a button and text

#

thats it

wooden yarrow
#

does it not have any constructors

magic hazel
#

err idk

#

i think it does

#

why

wooden yarrow
#

using one might save you a couple lines

#

but also given that you're working in iOS 6 i think this is just the normal amount

magic hazel
#

how would it save any amount of lines

#

i am yeah

#

im thinking of attempting to rewrite the discord classic app via uikit and swift so its a universal app

#

bcus swift 1 runs on everything

#

ios 6-26

#

the only upside

wooden yarrow
magic hazel
#

yes

#

well

#

technically swift MIGHT work on ios 5

#

its just missing something

#

if someone can fix it

#

then ios 5

#

but ios 6 is the oldest that'll work out of the box

wooden yarrow
#

tbh if there were to be a rewrite i would rather it support iOS 5.0 and below rather than iOS 8 and up

magic hazel
#

ios 6 and up

wooden yarrow
#

but a rewrite is entirely your work so i shalln't interrupt

magic hazel
#

also technically there's no reason this couldnt work on lower versions unless the uikit api calls don't exist

#

bcus swift is bundled with the app

#

there's just some oddities on older versions

wooden yarrow
#

does it not require a runtime?

magic hazel
#

thats the thing

#

well

#

the obj c and swift runtime are the same

#

at least for swift 1.0

#

it was one of the headlining features

#

idk if its still the case

#

i doubt it is

harsh junco
magic hazel
#

yeah idk how to do that

radiant idol
harsh junco
#

if there is even a source for swift 1

magic hazel
#

idk if there is

wooden yarrow
radiant idol
#

he's working on iOS 6 iirc

wooden yarrow
#

i guess technically there was the autorelease method

harsh junco
magic hazel
#

obj c is also archaic and is bogged down by C

#

i much prefer swift syntax

#

much more readable

harsh junco
#

swift is pure mental illness

magic hazel
#

im tempted to write a library to get rid of all the NS prefixes and swift 1 oddities tho

harsh junco
#

i’d take objc

magic hazel
#

sounds like a C programmer to me

#

i mean i have nothing against any language except C

#

every language serves a purpose

radiant idol
#

I would just use objc in this case, you're making your project more difficult if you actually want to do something with this instead of just experimenting
for a modern app I would use Swift though

magic hazel
#

last time i tried learning obj c it went worse than learning C++, probably the closest to the C experience i had

#

some of the obj c leftovers in swift 1 are killing me

radiant idol
# magic hazel

well looking at this I would tell you that this is very close to the theoretical objc version of this code

magic hazel
#

it is except that it's syntax is nicer

let index = Int(arc4random() % UInt32(self.count))

at least i can write some helper functions to avoid using disgusting code like this

vivid dew
#

for a long time every app would just ship its own copies of the swift libraries

magic hazel
#

Yeah

#

That's why ios 6 works

radiant idol
#

I think you're more frustrated at how UIKit compared to SwiftUI, not Objective-C

magic hazel
#

Nah i got over that

#

once i figured out constraints

#

the whole thing made sense

radiant idol
radiant idol
magic hazel
#

at least with swift 1 70% of the job is done for me

magic hazel
#

then again im using ancient uikit

#

there's no good autolayout

#

that came in ios 9

radiant idol
#
NSInteger getRandomIndex(NSInteger count) {
    return (NSInteger)(arc4random() % count);
}
#

seems simple enough

#

idk what exactly this is but

magic hazel
#

yeah idk why but that syntax really throws me off

#

its too close to C

#

anything close to C throws me off

radiant idol
#

that's because it is a C function

magic hazel
#

i deeply dislike C

#

it's archaic and should've been abandoned for anything but low level uses

radiant idol
#

What do you dislike about it? The syntax or the actual handling of stuff, for example memory management?

magic hazel
#

both

#

literally everything about it is so old you basically have to do everything yourself which is fine bcus its a low level language but the fact that it's used for anything but that frustrates me

#

there's so many better languages for high level stuff

harsh junco
timid furnace
magic hazel
#

i dont think

#

they ditched it

radiant idol
# magic hazel both

Interesting, I get the impression that a lot of modern programming languages are still inspired by the C style syntax actually
A Swift freefloating function (not tied to a struct, class, enum) would be very similar:

func getRandomIndex(for count: Int) -> Int {
    return Int(arc4random() % UInt32(count))
}
magic hazel
#

from memory

timid furnace
#

oh

radiant idol
timid furnace
#

funny because i need a backport to macOS 13

magic hazel
#

just built in

#

commonly used functions are just there for your convenience

radiant idol
#

I see, that's your frustration then - the fact that in C you don't have as much stuff built in
That's a fair criticism, if you want to use C in a higher level program - for example one with a GUI

magic hazel
#

(parameters)

#

literal arrow

#

output

radiant idol
#

That's fair, but as you can see it is inspired by C

magic hazel
#

100%

#

its inspired by obj c

#

which is inspired by c

#

but its 2 levels removed

#

thats enough for me to be okay withit

#

obj c is a bit too close for my liking

#

and straight c is so painful

harsh junco
#

@magic hazel what do you think about c++

magic hazel
#

c++ is the prime form of c

#

its c for a modern day

#

i still dont like using it for most things

#

but its actually modern

#

and while yes

harsh junco
magic hazel
#

they serve diff purposes

radiant idol
# magic hazel its inspired by obj c

I would say it's inspired by both independently, Objective-C methods (not C functions) have a different syntax:

- (NSInteger)getRandomIndexFor:(NSInteger)count {
    /// ...
}

If I were to look at all three combined, I would say the Swift function signatures are way more similar to the C signatures than the Objective-C ones

magic hazel
#

maybe you're right i think i prefer even the C syntax

#

obj c syntax makes NO sense

harsh junco
radiant idol
#

And that's a fair argument for not using Objective-C, but there are uses for it in certain occasions - e.g. legacy software

magic hazel
#

yes i agree

#

however

#

this is why im excited about swift 1.0 for ios 6

#

its a modern language for legacy devices

#

its still not modern swift

#

but its much more modern that obj c

radiant idol
#

Great to hear that then

magic hazel
#

only thing that actually sucks ass is old uikit

#

its so dogshit

#

idk how app developers did it

#

well i do

#

they used storyboard

#

no wonder it was such a big thing back then

#

apple pushed it really hard

#

but storyboard is bad

radiant idol
#

Same with SwiftUI nowadays, pretty much - it's an easier way to build an app than using UIKit directly
But SwiftUI is also more of a philosophy of itself because of its approach to programming (imperative vs. declarative) - that's why you originally struggled with the UIKit aspect after moving from SwiftUI

magic hazel
#

except that swiftui is actual code

#

and can be reused

#

and redone

#

easy to pass around

#

its easier to upgrade and modernise and refactor

#

storyboard is fucking awful

radiant idol
#

Oh yeah I agree, just noting the similarities

magic hazel
#

yk what the biggest joke is in uikit

#

i didnt even know this existed until now

#

i started cackling when i saw it

#
let views = ["button": myButton, "label": myLabel]

let horizontalConstraints = NSLayoutConstraint.constraintsWithVisualFormat(
    "H:|-20-[label]-10-[button(100)]-|",
    options: [],
    metrics: nil,
    views: views
)
view.addConstraints(horizontalConstraints)
#

what in the goofy ahh fuck is this

#

this has got to be the shittiest thing i have ever seen

radiant idol
#

Oh yes, that exists

magic hazel
#

who at apple thought this was acceptable

#

this is genuinely the worst way of laying out elements ive seen

#

you're basically writing a storyboard manually

#

its the worst of all worlds

#

i cannot see any case where anyone would want to use that

#

how does it have ANY applications

#

the second your ui gets more complicated than text and an image

#

you're completely fucked

#

i wish i had anchors and uistacks tho

#

instead i have to use manual constraints 😭

radiant idol
#

It's really weird yeah, but maybe that's the solution they came up with back then - clearly as you can see they were trying many different things, today the constraints API is quite soldified so it seems like common sense to us, but back then it was not figured out yet

magic hazel
#

man i miss Vstack and hstack tho

#

😭

#

i didnt realise how much i relied on them

#

and in uikit on ios 6 theres NOTHING you can use like it

#

at least in ios 9 there was like uistackview ithink

#

which is close

#

but on ios 6 you get nadda

magic hazel
#

but like cmon aint no way a single programmer who actually has to work on something serious looks at that and says "yup thats how ima do my ui"

#

ima draw it in like it's ascii art

#

I wonder if there’s any possible way of getting my app onto the App Store

#

Maybe I can find someone who already has an app supporting iOS 6 and then buy it and they can transfer and I’ll refactor into mine since you can’t make new submissions

vivid dew
#

you should see the leviathan autolayout setup

magic hazel
#

WHAT

magic hazel
hasty ruin
magic hazel
#

That’s just how the syntax is

#

That’s like saying why does obj c do functions with - ()

#

Nothing else does bur that’s just how it is

gentle grove
#

what the hell does an in block like that do

#

oh in is just a closure

#

but what the hell is the braces after the function call

magic hazel
#

okay i have an idea

gentle grove
#

This is called trailing closure syntax. If the last parameter of a function is a closure, it can be placed in curly braces immediately following a closing parenthesis around the previous parameters.

what in the fuck

magic hazel
#

yeah trailing closure

#

one of the great parts of swift

#

it makes sense when you see how it would look without it

#

not everyone will like it but i think it's great, it only really makes sense when you learn it tho, i found it super confusing at first

gentle grove
#

so is it the same as

Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true, _ in
    UIView.animate(withDuration: 1.0) {
        self.view.backgroundColor = self.colourChanger()
    }
)
magic hazel
#

yes

#

exactly

gentle grove
#

why

magic hazel
#

but cleaner

gentle grove
#

what makes it better

magic hazel
#

its cleaner

#

also

gentle grove
#

that's horrible

magic hazel
#

its better becuase its like a function

#

its executing something

gentle grove
#

i'm only focused on the trailing closure part

magic hazel
#

yeah the trailing closure allows it to look more like a function

#

which is kinda what it's doing

gentle grove
#

rust has almost as bad of closure syntax so i can't make fun of swift

magic hazel
#

it's executing code as if it were a function

gentle grove
#

it makes 0 sense

magic hazel
#

anyways if ur coming from like pure C or c++ then i'd get it being confusing

gentle grove
#

why is there a function parameter outside of the parameters list

#

it's a logic issue

#

why is there a feature for that

#

this is exactly what mai was talking about

magic hazel
#

bcus that's the syntax ig

gentle grove
#

i found something worse

magic hazel
#

it's not objectively worse or better it just is

#

lmao

radiant idol
#
UIView.animate(withDuration: 1.0) {
    self.view.backgroundColor = self.colourChanger()
}

This is also a trailing closure, just with no args - if we were to write it without using trailing closure syntax it would look like this:

UIView.animate(withDuration: 1.0, animations: {
    self.view.backgroundColor = self.colourChanger()
})

simply a stylistic choice, but in certain cases, especially if you're writing SwiftUI, it does make stuff cleaner

gentle grove
#
let lowerCasedWords = arrayOfWords.map{ $0.lowercased() }
#

$0

magic hazel
magic hazel
#

thats first element tho

#

from memory

gentle grove
#

i bet it's old syntax

magic hazel
#

errr

#

no

gentle grove
#

if this is still a thing then that's insane

magic hazel
#

wait maybe

#

most ppl dont use swift 6

radiant idol
#

This is not an old feature, I think it's somewhat new

gentle grove
#

i think swift users have stockholm syndrome

#

that's my point

magic hazel
#

err not really

radiant idol
#

Not Swift 6 new, but still new-ish

magic hazel
#

i tried multiple languages before landing on swift

#

swift just made sense, its diff for diff people

#

thats why there's multiple languages that have similar tasks

#

lmao

#

anyways back to my plan, even tho apple removed ios 6 as a TARGET in beta 4, there's not a real reason to think the actual binary that gets outputted isn't compatible somehow

#

unless xcode does funny stuff

#

so my plan is try xcode 6 stable

#

and change minimum in info.plist to 6

#

and hope to god it launches

#

so i can get off this beta

radiant idol
#

I personally don't really understand language wars, most languages are industry standards in their own respective industries
unless you're experimenting for fun, you should use the language that's designed for the platform you're running for, so Swift/Objective-C for iOS/macOS/whatever
There's some people who legitimately want to write an iOS app in C or C++ or Go or something and unless you are just experimenting, it's a massive waste of time to go against the industry standard

gentle grove
#

there is definitely an objectiveness to it

#

but i don't care enough to talk about it

radiant idol
#

There is definitely an objective aspect to it but a lot of it is subjective

magic hazel
#

i mean there's some objectiveness but most is subjective

#

yeah

radiant idol
#

Yeah

gentle grove
#

i was only talking about objective parts

magic hazel
#

objectively you shouldn't write an ios app in pure c

#

like objectively that is a poor decision

#

if its basic

#

like a basic app that could be done in a few lines of swift and swiftui would take you probably 100 in C with no libraries

#

but theres no reason you shouldnt use obj c to write an older app over swift

#

thats just a choice of what do you prefer

radiant idol
#

Same with a Windows app or something, unless you're experimenting, using Swift for that instead of C# or something would be ridiculous

magic hazel
#

yeah

#

well

#

depends

#

unless you're writing a unified app

#

since swift runs on everything

#

and you REALLY dont like c#

#

but idk who falls into that camp

#

i'd never write a windows app in swift

#

swift is built for apple devices through and through

#

alr ima take a bit of a risk and go for xcode 6.4

#

swift 1.2

#

pretty far removed from swift 1.0 beta 3

#

but who knows

#

honestly ios 7 and ios 6 really aren't that far off

radiant idol
magic hazel
#

is there any real difference that would make running a newer swift version with old api calls problematic

magic hazel
hasty ruin
radiant idol
gentle grove
#

whats missing

radiant idol
gentle grove
#

how is it supposed to be written

magic hazel
#

C# is microsoft's baby

#

swift is apple's

radiant idol
#
Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true, block: { _ in
    UIView.animate(withDuration: 1.0) {
        self.view.backgroundColor = self.colourChanger()
    }
})
gentle grove
#

you can't just tell me "that's correct" but then have it actually be completely wrong 😭

radiant idol
gentle grove
#

idk about the braces being around the entire closure though

magic hazel
#

yeah i prefer trailing closure it's so much cleaner

hasty ruin
#

this still feels weird but not as bad as the original

radiant idol
#

Yeah I mean it's a stylistic choice

magic hazel
#

yeah it is

#

they're the same thing

#

so

gentle grove
#

for some reason i read icraze as parentheses

magic hazel
#

it's really up to what do you prefer

#

but i very much prefer trailing closure

radiant idol
#

the _ is there because the closure has a timer parameter and we're not using it so we can just mark it as _

gentle grove
#

yeah i get that

magic hazel
#

way less indentation makes it easy to read when it's in the context of a larger body of work

#

and it's less nesting

gentle grove
#

it's the same amount of indentation

#

it just is worded to have more obvious syntax

radiant idol
#

the in is a strange choice of a word, but after writing it I've gotten used to it
it doesn't really make sense but anyway

magic hazel
#

yeah in is odd but like i said before thats just how it is

#

like anything else

#

i find the fact that obj c has functions like - (void) super super odd

#

but thats just how it is

gentle grove
#

just because that's how it is doesn't mean i can't make fun of it

magic hazel
#

mm xcode 6.4 is not liking launching on this devie

gentle grove
#

i think the problem is that the aesthetics of the syntax mean nothing to me

#

i just want it to say what it does

#

that's what the best language does

magic hazel
#

i like my language to be readable and understandable without having to think too much about everything else around it and swift does that really nicely

#

the closer i get to C the more things become like machine code and the less readable they are to me

#

but that's definitely subjective

hasty ruin
gentle grove
magic hazel
#

they're optional tho

native orbit
magic hazel
#

you pick whether you want to have it or not

#

most swift devs like it

#

obj c devs probably don't

gentle grove
#

you read other people's code all the time

magic hazel
#

the more used to C you are the less you'll like swift imo

gentle grove
#

the language has to have uniformity

magic hazel
#

it's a headline feature of the language

#

it's expected

hasty ruin
magic hazel
#

so it's pretty consistent

light owl
#

@native dune Is it working

gentle grove
radiant idol
gentle grove
#

idk if you have amnesia or something

magic hazel
#

idk if you're talking about you not liking how it looks or other people not being able to read it

gentle grove
#

it means that then i can use this feature as something to criticize swift

#

not just "bad" swift

magic hazel
#

bcus other people can read it just fine

gentle grove
magic hazel
#

right

#

so yes

native orbit
magic hazel
#

most ppl write the code like that therefore most ppl can read it

gentle grove
#

no i think you've lost my point again

magic hazel
#

lmao this is a pointless argument anyways bcus syntax is one of the most subjective parts of a language

gentle grove
#

none of anything i was trying to criticize is subjective

#

maybe if i worded it wrong then it comes off like that

magic hazel
#

you took shots at trailing closure but all that is is a way of presenting code, it's purely syntax and not only that, it's optional. most people who use swift like the syntax, therefore it does it's job effectively, i don't really see swift devs complaining about trailing closure, and the ones who don't like it just don't use it

#

i see this as a win win for everyone

gentle grove
#

what i'm complaining about is the inclusion of a redundant feature, which is essentially just for the visual looks, which by result makes the language more complex and harder to understand as it's adding more features that don't do anything different

#

it's not about whether it "looks bad"

#

i'm being purely utilitarian here

magic hazel
#

it's incredibly useful when you consider swift's main libraries though

#

the biggest being swiftui

quaint rain
#

holy shit development channel talking about development

magic hazel
#

swiftui without trailing closure would be much messier

gentle grove
#

I think that's the problem with swift

native orbit
#

i think the problem is swift

gentle grove
#

it's domain specific to like 1000 different domains

magic hazel
#

lmao

#

i mean at the end of the day, don't like it, don't use it

#

however being a modern iOS dev and using obj c would not be very fun

#

hence why barely anyone does

gentle grove
#

you just debunked your statement immediately

magic hazel
#

what point

gentle grove
#

i mean at the end of the day, don't like it, don't use it

however being a modern iOS dev and using obj c would not be very fun

hasty ruin
#

peak syntax 🔥 🔥 (🤢 🤢 🤢 🤢)

magic hazel
gentle grove
hasty ruin
radiant idol
#

I mean the weak self thing is a bit more ugly in Objective-C, tbh

magic hazel
#
- (void)startDownload {
    NSURLRequest *request = [NSURLRequest requestWithURL:self.url];
    
    // Async download using NSURLSession
    NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request
        completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
            if (data && [self.delegate respondsToSelector:@selector(didFinishDownloadingData:)]) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    [self.delegate didFinishDownloadingData:data];
                });
            }
        }];
    [task resume];
}```
gentle grove
#

can't believe I'm on the same side as icraze on an issue right now

magic hazel
#

this looks just as ugly to me

gentle grove
radiant idol
#

it's not as straightforward, I would say - not that weak self itself is straightforward, anyway

native orbit
#

real ones just use objc_msgSend in C

radiant idol
magic hazel
#

yeah

#

i dislike that in a high level language

#

some people don't

gentle grove
#

real ones just disconnect their display connector?

magic hazel
#

i mean you can just not use either

#

use like c++ or C#

gentle grove
radiant idol
#

Writing an iOS app in C++ would be a nightmarish experience

magic hazel
#

pure c++ yeah

radiant idol
#

(not Objective-C++, C++ itself)

native orbit
#

xamarin app sounds awful too

hasty ruin
#

WinObjC

magic hazel
#

idk i just dislike the fact that you have to write so much to do so little in super c based languages

#

it irks me that in 2025 we wouldn't have found better solutions

raven zephyr
#

hi

cosmic briar
magic hazel
#

swift for me is good because it takes a lot of the "well of course that can work why wouldn't it" and actually does it

cosmic briar
#

in pure cpp??

magic hazel
#

well yeah

#

unity apps get transpiled to pure c++

hasty ruin
radiant idol
native orbit
#

ive done it asm

gentle grove
#

You can do anything in anything

magic hazel
#

ehh

cosmic briar
#

yeah I seen that function when decompiling apple frameworks

magic hazel
#

not with apple

gentle grove
#

that should be a bumper sticker

magic hazel
#

idk why apple hates non statically compiled languages

gentle grove
gentle grove
magic hazel
#

windows android and linux all allow them wdym?

gentle grove
#

there seems to be a trend towards static linking today

radiant idol
magic hazel
#

well yeah but there's a difference between prefering and allowing

#

apple just says fuck you

gentle grove
magic hazel
#

the others just say rather not

magic hazel
gentle grove
#

some programs will even bundle the visual c++ runtime

gentle grove
#

Idk what thing you're talking about specifically

magic hazel
#

i was talking about ios

cosmic briar
#

I bet that was torture to make

gentle grove
#

On android you'll find the same as iOS

magic hazel
#

fym

native orbit
#

you can dynamic link on ios

radiant idol
native orbit
#

just needs to be in the container

magic hazel
#

i can run java applications on android no questions asked

gentle grove
#

What do you think static linking means

magic hazel
#

errr library inside code

#

so there's no need to have it there at runtime

#

?

radiant idol
#

I think one of you misinterpreted the other, one of you mentioned static typing and the other was typing about static linking I think

gentle grove
magic hazel
#

i said you can't use non statically compiled languages on ios

gentle grove
#

it's when you make libraries linked into the single binary instead of found at runtime somewhere on the system

magic hazel
#

thats what i just said

gentle grove
#

It's when you choose how to connect the program to its libraries

magic hazel
#

what are you talking about there's no such thing, statically compiled languages have the compiler convert code into a binary with no runtime interpreter

#

C is statically compiled

#

C++ is statically compiled

gentle grove
#

oh I see what the issue is

#

that's compiled vs interpreted

magic hazel
#

yes

#

that's what i'm talking about

gentle grove
#

its just called a compiled language

#

no static word in it

magic hazel
#

idk every time i've had it come in a convo it's "statically compiled"

#

anyways

#

irrelevant

#

back to my actual point

#

apple says big fuck you on ios to interpreted languages

#

very sad

native orbit
#

not rly

magic hazel
#

yes really

native orbit
#

just the entry needs to be compiled

magic hazel
#

that's not always possible

gentle grove
#

I can't find any reference to people calling it statically compiled other than getting confused between static typing

radiant idol
#

React Native exists, if you write JS there, it's interpreted

#

well, it's prob more complicated than that but at a high level

gentle grove
native orbit
#

jsc the goat

gentle grove
#

V8 is bigger

magic hazel
#

eh maybe i got confused

gentle grove
#

bigger is better. At least with normal (car) engines

#

@magic hazel are you thinking of not being able to use JIT maybe

#

like for emulators

magic hazel
#

well that's one of the results

#

not just for emulators

#

for anything

#

my previous example of java

gentle grove
#

Are they stopping you from interpreting languages?

magic hazel
#

kinda

#

not entirely

#

you can't dynamically generate code but you can interpret existing code iirc

#

its been a while since i read the guidelines

gentle grove
#

what if I write the interpreter in rust so it's impossible for it to have bugs

magic hazel
#

still not allowed

#

it's about "safety"

gentle grove
#

rust is safe

magic hazel
#

no i dont mean that

gentle grove
#

that's its tagline

magic hazel
#

their argument is that because the app can make code on the fly it could be malicious code

#

its dumb as fuck

gentle grove
#

I think its pretty real actually

magic hazel
#

not really, every other platform allows it with little to no problems

gentle grove
#

I mean its sandboxed so the app only hurts itself

magic hazel
#

macos is sandboxed

gentle grove
#

not really

magic hazel
#

i wish ios was more like macos

gentle grove
#

well

magic hazel
#

macos is a much better compromise

#

it has safety and freedom if you want to have it

#

you can disable security features

#

because it's your device

gentle grove
#

Macos isn't super safe to be completely honest

magic hazel
#

you should be allowed to do that on ios

gentle grove
#

its the safest desktop you have

#

but I think its still possible to make malware do bad stuff

magic hazel
#

dude its possible on ios

#

its possible on everything

#

its about how much compromise

#

how much safety

#

the worst part is you can't turn anything off on ios tho

#

i wish you could

gentle grove
#

its safe

magic hazel
#

IT WORKS

#

HOLY SHIT

#

SWIFT 1.2 WORKS ON IOS 6

#

I KNEW IT

#

time to see how far i can go

#

i wonder if swift 2 works

#

holy crap i hope it does

gentle grove
radiant idol
#

cool stuff lol

magic hazel
#

holy shit i wonder how far this goes

#

obviously you can't like use new apis

#

and you'd have to be careful

#

like all my code is still swift 1.0 code

#

kinda

#

it has some changes bcus the compiler whined

gentle grove
#

What did you do

magic hazel
#

wdym

gentle grove
#

I didn't hear about this iOS 6 swift project at all

magic hazel
#

oh

#

uh

#

well

#

swift 1.0 beta 3 is natively supported on ios 6

#

so i started working on that

#

but i realised

#

just because apple removed 6 as a build target

#

doesn't really mean it won't work

#

bcus ios 6 and 7 are actually super similar

#

so literally just changing info.plist

#

for the first time in history

#

actually works

#

that shit NEVER works

#

im gonna try swift 2.0

#

if swift 2 works im gonna freak out the syntax is so much nicer

#

if swift 3 works its gamechanging

#

swift 3 working on ios 6 would make legacy development so much more accessible

#

again, you'd be limited by ios 6 apis

#

so you'd have to be REALLY careful

radiant idol
#

well if you use the iOS 6 sdk you wouldn't even be able to write code that's not iOS 6 compatible

magic hazel
#

oh thats trueee

#

well

#

ios 7 sdk

#

swift wont compile with the ios 6 sdk

radiant idol
#

oh, right

#

yeah ok

magic hazel
#

but yes

#

when did 7 get dropped

#

7.0

#

also is this not swift code?

#

why isn't it being coloured

radiant idol
#

Is this Xcode?

magic hazel
#

yes

radiant idol
#

Strange - what Xcode version?

magic hazel
#

6.4

#

itw as coloured in beta 3

radiant idol
#

yeah idk

magic hazel
#

this is huge tho

#

swift 1.2 is much better that swift 1.0

#

even still

#

if you're worried about 1.2

#

1.0 stable will work

radiant idol
#

how different is it?

magic hazel
#

less obj c

radiant idol
#

do show 👀

magic hazel
#

yeah no xcode really doesn't like this idk why

#

biggest is optionals

#

if let and guard let

#

very large

#

no guard let in swift 1

#

try and catch

#

swift 1.2

#

nothing in swift 1.0

#

better type inference

radiant idol
#

oh wow yeah those are big parts of the language

magic hazel
#

swift 1.0 -> for var i = 0; i < 10; i++ { ... }

#

swift 1.2 -> for i in 0..<10 { ... }

radiant idol
#

yeah ok I see

magic hazel
#

so like

#

its a pretty bigdeal

#

xcode was probably just processing shit

#

thats better

#

im actually so stoked

#

howveer

#

the real test

#

is seeing if that swift 1.2 code

#

runs on ios 6

#

bcus this is all swift 1.0 code

#

so while its great and all i dont have to use a beta version of xcode anymore

radiant idol
#

are you sure optionals don't exist? because I see you do self.navigationController!

magic hazel
#

no you can but optional unwrapping

#

they're really fucky

#

in swift 1.0

radiant idol
#

interesting

magic hazel
#

huh

#

guard let doesn't exist

#

wtf

radiant idol
#

in Swift 1.2?

magic hazel
#

ye idk

#

well

#

sets are new

#

so

#

ill test thos

radiant idol
#

NSSet exists so they probably exist there too

magic hazel
#

maybe

#

but its a swift set type

#

so

#

ig its worth trying

#

yeah works fine

radiant idol
#

neat

magic hazel
#

time for xcode 7.0

#

swift 2.0

#

aint no way this works

#

okay guard was 2.0

#

10 minutes to copy over xcode and then we'll be off

#

nah set uses a new data structure

#

so thats actually cool

lime pivot
magic hazel
#

yeah

lime pivot
#

and I used Swift 1.0 betas 😬

magic hazel
#

yeah its horrible

#

im glad i can get away from it

#

so my max version rn is 1.2

#

which is pretty freaking incredible

#

a stable modern language for older ios

#

why on earth didnt apple allow ios 6 build targets

#

im not tripping right ios 6 and ios 7 ARE very similar

#

swift 2 would be pretty big but the kicker here is swift 3

#

if swift 3 somehow works

#

this will actually be so fucking cooked

#

it means no more obj c for legacy development if you're targeting ios 6

#

swift 3 is basically modern swift

radiant idol
#

let us know how it goes

magic hazel
#

oh no

#

i think its gonna fail

#

the app is huge now

#

18mb

#

was 2mb

#

does not bode well

#

alr here goes nothing

#

KJHSJKDSAKDHAS

#

HOLY SHIT

#

SWIFT FUCKING 2 WORKS

#

HOLY MOTHER OF SHIT

#

THIS IS HUGE

radiant idol
#

whoaaa

magic hazel
#

THIS IS ACTUALLY SO HUGE

#

CAN WE ACTUALLY GET SWIFT 3

#

NO WAY

#

NO WAY IN HELL

#

IM GONNA GO FOR IT

#

oka

#

so

#

i need to push the boundaries

#

so im gonna ask chatgpt to write me a pure swift 2.0 application

#

and ima see if it launches

radiant idol
#

make it really simple

#

just like one label or something

magic hazel
#
import UIKit

class ViewController: UIViewController {

    let button = UIButton(type: .System) // Swift 2.0 style
    let colors: [UIColor] = [.redColor(), .greenColor(), .blueColor(), .yellowColor(), .orangeColor()]
    var currentColorIndex = 0

    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Set title
        self.title = "Color Changer"
        
        // Initial background
        self.view.backgroundColor = colors[currentColorIndex]
        
        // Setup button
        button.setTitle("Change Color", forState: .Normal)
        button.frame = CGRect(x: 0, y: 0, width: 160, height: 50)
        button.center = self.view.center
        button.addTarget(self, action: #selector(buttonTapped), forControlEvents: .TouchUpInside)
        self.view.addSubview(button)
    }

    @objc func buttonTapped() {
        // Change background color
        currentColorIndex = (currentColorIndex + 1) % colors.count
        UIView.animateWithDuration(0.3) {
            self.view.backgroundColor = self.colors[self.currentColorIndex]
        }
    }
}
radiant idol
#

sure but you need app delegate stuff too

#

idk if you have that yet

magic hazel
#

already there

radiant idol
#

cool cool

magic hazel
#

okay gonna test now

#

download xcode 8 as we speak

#

the very fact you can use newer xcode also means you can literally use newer macs

#

this is actually massive

radiant idol
#

that.. is true

magic hazel
#

this could be gamechanging

#

if swift 3 works

#

HOW HAS NOBODY TRIEDTHIS

#

I AM SERIOUS

#

HOW HAS ACTUALLY NOBODY TRIED DOING THIS

#

😭

#

HAHAHAHAH ITW ORKS

#

THAT SWIFT 2 APP WORKS BEAUTIFULLY

radiant idol
#

do show

magic hazel
#

wait pressing the button does nothing on even ios 9 sec

#

code is just broken

#

k code fixed

#

time to put on ios 6

radiant idol
#

what was the issue?

magic hazel
#

#selector is not athing

#

not on 2.0

#

later versions of 2

radiant idol
#

ah

magic hazel
#

but im using 2.0 methods

#

like

#

.red

#

instead of .redcolor

radiant idol
#

neat

magic hazel
#

and .redcolour

#

alr ill send a video in a sec sideloading now

#

YOU CANNOT MAKE THIS SHIT UP

#

IT ACTUALLY FUCKING WORKS

#

oh crap

#

i can't actually run xcode 8

#

aw man

#

well thats the end of that

#

errr

#

does anyone have an older mac

#

ykw

#

fuck it

#

i dont need yosemite anymore

#

i can go to el capitan

#

bcus xcode 7 runs on el capitan

#

i only needed yosemite for xcode 6

#

and i no longer need xcode 6 bcus it's useless

light owl
#

@native dune Is it working

native dune
#

@native dune Is it working

light owl
#

@gleaming niche Is it working

magic hazel
#

there's no way of backporting uikit apis is there

radiant idol
#

unless you rewrite them yourself no

magic hazel
#

Damn

#

Hmmmm

#

Okay so

#

I think there’s one issue

#

We can’t fo too far

#

Or else apis will be depreciated

radiant idol
#

you can still use deprecated APIs, it'll just give you a warning

magic hazel
#

Meaning sure swift but you can’t do anything w it

#

how lon was NSLayoutConstraint a thing

radiant idol
magic hazel
#

man i wish i could use modern uikit

#

i mean

radiant idol
#

iOS 6+

magic hazel
#

TECHNICALLY

#

the uikit gets better

#

bcus the syntax for using it

#

is cleaner

#

like buttons for example

#

UIButton(type: .Custom) vs UIButton.typeofblahblah(.Custom(

#

and then casting

#

as! UIButton

#

no longer needed

#

swift 2.0 is much much better than swift 1

#

ima update to el capitan my efi is made for el capitan anyways

#

so it should be very straightforward

#

then it'll be swift 3 time

#

if swift 3 works im actually gonna rewrite discord classic

radiant idol
#

you could very well do that in Swift 2.0 probably

#

assuming everything works

#

which itself is a bold assumption, but anyway

magic hazel
#

i could

#

but swift 3 is so much closer to swift 5

#

i may as well try it

#

there's no harm

#

i even have my yosemite installer usb so i can rollback

#

+, if swift 3 works, current ios devs could consider supporting ios 6 as a target if they're using UIKit

#

and more people can get into legacy ios development

#

albiet old uikit apis

#

but still

#

guess what else it means

#

libraries

#

you can use modern swift libraries

#

which could bridge the gap

#

of old uikit

#

i know of a few already

#

that would help immensely

radiant idol
#

with some effort you could make some convenience functions to make old UIKit easier to use

magic hazel
#

yes

radiant idol
#

new Swift won't work with old Swift

#

well, probably wont

#

I assume it wouldn't

magic hazel
#

no i mean like more modern

radiant idol
#

I see

magic hazel
#

older versions of modern swift libraries

#

nothing is made for swift 1

#

some stuff is made for swift 2

#

lots is made for swift 3

radiant idol
#

but as long as they use a single symbol that's present on iOS 7 and on, you're screwed

magic hazel
#

true

#

but then again

#

it just makes shit so much easier

#

obj c is so bothersome in old ios

#

its old objc

#

old objc + old apis is really bad code

#

swift 1.0 was nice step up but swift 2.0 is really nice

radiant idol
#

objc hasn't changed in a very long time, objc from the iOS 6 era and the objective-c now is very very similar

radiant idol
#

it's just the APIs that have changed

magic hazel
#

yeah

#

but its also obj c apis

#

obj c apis are annoying

#

hmm im gonna have ot be careful

radiant idol
#

you're still interacting with objc APIs in your Swift code

magic hazel
#

i think your idea of using the older sdk is good

#

idk if it will work

#

that way i'm limited

#

then again, older sdk could cause issues

#

if i can use a modern sdk i can also have other stuff

radiant idol
#

at this point you may consider making a custom SDK

#

just a thought

magic hazel
#

could be a lot of work tho

#
  • the apps wouldn't be accepted on app store
#

if you could use a modern sdk

#

you could potentially submit applications

#

but yes

#

it's a possibility

radiant idol
#

you could start by basing it off of the iOS 7 SDK and start removing things as you come across them that don't exist on iOS 6

magic hazel
#

updating to el capitan

radiant idol
#

you're bordering between actually usable territory and hacky territory so you might as well

magic hazel
#

ig thats fair

#

my hackintosh better not shit itself

#

i swear to god

#

it better pull through

#

alr this will take 25 mins according to my mac

#

thats rather annoying

magic hazel
#

when did swift become dependent on the OS

#

just so i know what my cap is

radiant idol
magic hazel
#

i am deadass rn

#

you edit info.plist

#

i truly dont know how nobody tried this

#

ios 6 and 7 are very similar

#

it just works

#

you change minimum required os from 6 to 7

#

and it deadass just works

#

there's nothing hacky about it

#

okay

#

development

radiant idol
#

oh well I guess that's not bad

magic hazel
#

swift 3.0 apparently only technically supports ios 8

#

but

#

apparently you can get it to work on ios 7

radiant idol
#

this is the strangest series of events

#

for reference I did not even know what version supported what before this

#

I am learning today

magic hazel
#

BRO PPL HAVE GOT SWIFT 4.2 WORKING ON IOS 7

#

if swift 2 works on ios 7 and 6

#

why would swift 4.2 not

radiant idol
#

let's go step by step

#

try swift 3 first

magic hazel
#

indeed

#

still 21 mins on my updater

#

if we can get to the ios 11 sdk ill be really happy

#

bcus that means the app will support iphone x type phones

#

meaning it wont look like shit

#

bro the thought of building an app for ios 6 with swift on the ios 11 sdk is actually so funny

radiant idol
#

it's now just a matter of "how far can we push this"

#

as long as the Swift code calls the underlying Objective-C APIs, stuff should still work

magic hazel
#

or have obj c backends that are shit

#

and you wouldnt use

#

but look nice in swift

#

and since the swift runtime is bundled into the app

#

ohhh shit

#

i forgot

#

another limitation

#

32 bit app building

#

when did that get cutoff

radiant idol
#

iOS 11 :/

magic hazel
#

FUCK

radiant idol
#

yes, beta 1

magic hazel
#

goddamn

radiant idol
#

I knew that was gonna be your next question lol

magic hazel
#

fuck

#

okay so cutoff is ios 10 sdk

#

well

#

hmm

radiant idol
#

that's ok we can still make to do with what we have

magic hazel
#

should i still try

radiant idol
#

try swift 3 first

magic hazel
#

i could build for arm64 ios 6

radiant idol
#

let's see what it does

magic hazel
#

even tho it wont work on any device

#

yeah

radiant idol
magic hazel
#

it is

#

but

#

PoC

#

?

#

orrrr

#

potentially using the older sdk

#

to target armv7

#

and then using newer swift

radiant idol
#

let's just do swift 3 first lmao

#

that's enough of a PoC as it is

magic hazel
#

true im just spitballing while i try and wait for this stupid update to happen

#

7 minutes

#

ugh and then i have to download and unzip

#

update successful!!

radiant idol
#

nice

#

frankly I'm surprised your hackintosh is handling all this

magic hazel
#

yep

#

same

#

good old haswell

#

its slower on el captian

#

oooh but my youchpad and keybaor dwork

radiant idol
#

oh nice

magic hazel
#

alr 12 ish minutes

#

to download