#development
1 messages Β· Page 239 of 1
π
2 minutes
alr its expanding
yeah its taking its time :/
and yep i cant run xcode 6 beta 3 anymore
sadge
oh shit
idek if i can run the sdk for ios 7
xcode 6 beta 3 just crashes
nearly done
its done
time to fire it up
installing components
sure as hell is taking its time
man its drawing this out
alright
time to put swift 3 code in
moment of truth
lool
god damn it
crashes?
yes
F
if you start patching those back in you're gonna fall into a giant rabbithole
ugh its expected in systemb.dylib
i am assuming i cannot just steal ios 7's
and have it work fine
replacing a system dylib?
good luck with that
you could try bundling it in with your app and then replacing the load command
what if i used an older sdk
how would i even do that
it's quite involved
yikes
I mean it's possible, but realistically that thing is probably gonna depend on another system thing and then you're gonna fall into that rabbithole
im gonan restore my iphone 4 to ios 7 and attempt to steal that dylib
i highly doubt replacing the ios 6 dylib will go dwell
just a quick google search
I suggest you don't do that
If I were you, I would stick with Swift 2, it seems to work great
i have like 30 legacy devices
im prolly gonna end up sticking w swift 2 but
if i can possibly get swift 3 to work
wheres this
not necessarily
the rest are all ios 5
i could try a dummy shim
you could try
okay
if i just include
a .c and .h file
will swift automatically find it
and use it
or do i have to do funni stuff
no, you need to also have a bridging header
but i'm not using it in my code
shouldnt the swift runtime just find it t hrough dyld
oh I see what you mean
uh, you can try that
Swift doesnt care about that, you just need to make sure Xcode bundles the non Swift code in
how can i tell if it is or isnt doing that
you'd probably need to put your bin in a decompiler
that would be the robust way to do it
or you can run nm <path/to/bin> and see if the function is there
alright im gonna go for it
im gonna replace the dylib
if not
ill try including in app
oh oh oh wait
i have a device on dev beta 1
that would be the closest to ios 6
i wonder if its included on that
how many legacy devices do you have wow
oh
lmao
pretty much all of them
except ipads
okay
update
doesnt work on 7db1
SHIT
ITS CALLING ANOTHER FUNCTION
"NSURLUBiqutoesitejmdownloaderrorkey"
idk what that is
is that seriously what it's called
NSURLUbiquitousItemDownloadingErrorKey
oh
that's the naem
that makes sense
not me tempted to yoink the libraries
first shim didnt even work
idk if theres a way to try and idk
force it
how does one force the swift runtime to use my shim
if i can make a packet of shims to fix the errors then swift 3 may be viable
well
it doesnt crash on 7.1.2
but its also a black scren
hold up
that dylib does not exist in ios 7
ah but libdispatch.dylib does
oooh
the folder isnt even there on ios 6
exciting stuff
libdispatch.dylib doesnt exist on ios 6
from what i can see
meaning i am not overwriting anything
hmm
having issues transfering
alr time to transfer over
rebooting
grr
it can't find it
alr
ima try swift 2.2
oooh
i could try a swift 3 beta as well
wait i cant i dont have betaarchive access
HA someone archived it
beta 1 in fact
MAYBE itll be early enough to work
who knows
yikes
nah, normal waking hours for me
thats what started this
lol
alr torrenting the 8.0 beta while download swift 2.2
i will find the absolute limit
LMAO i just started torrenting on both my mac and my desktop and i was like damn desktop is faster BEFORE REALISING IT WAS TORRENTING OFF MY LAPTOP
LMAO
thats wild
god i hope its not swift 2.2
wdym
i hope its not swift 2.2 that ruins it
ah
my hopes rn:
swift 2.2 support
swift 3.0 db1 support
its possible they did something between release and db that stuffed it
like how they removed official swift support for ios 6 in db 3
and im very lucky i dont have to deal with the shithole website that is betaarchive
alr gonna try xcode 7.3.1 first
i wonder how new of a macos version can run that
also we havent really pushed swift 2.0
then again like you said as long as we're careful and stay inside the confines of obj c ios 6 apis
it really shouldnt have any issues
yeah okay so swift 3.0 is build 800 and 2.2 is build 703
so it is actually highly likely
that somewhere in there
WAIT WAIT
when was swift open sourced
I think it was always open sourced, no?
oh
2.2 WAS
so that means every single build
since then
is publicly avaliable
i could potentially replace the compiler
inside xcode
with an older version of 3.0
oh wait ill have to change back the 3.0 code
thats fine
actually technically you can use "older swift version" on xcode 8
THIS CAME BEFORE THE BETA ITSELF
fuck
no no
that's good
we don't want that
on iOS 6, at least from what you mentioned, that thing doesnt exist
WAIT THAT MEANS THERE MIGHT BE HOPE
FOR XCODE 8 BETA 1
YES THERE IS
theres 6 betas
theres 6 previews
holy shit
this might work
although
you should write a writeup about this when you get done lol
there was some other stuff
in corefoundation
then again
who knows
yeah maybe
idk what id put in there
alright time to test swift 2.22
still torrenting the other suff
it says that all the way up to beta 6 tho
oo
also idk if that means it doesnt contain it and it needs it
like you have to supply it
π€·ββοΈ
we'll see ig
anyways
2.2
sideloading now
heres to hoping at least it works
black screen but it works
no crash
okay thats good
so swift 2.2
a black screen is better than a crash, but still not as good as a working app
try verifying whether the code actually runs
yeah ima od that now
ill test onsim
i mean it was black on 7.1.2
so
i didnt even consider i only have 256gb of space
lmao
i might run out
so many xcode builds
black screen on the sim asw
lmao it was just app delegate
works in sim now
time to test on device
swift 2.2
so thats fully usable
5 mins left on the torrent
then i have to copy over usb to my hack
and then expand
WAIT
THE PREVIEW CONTAINS CORELIBS FOUNDATION
THERE ACTUALLY MAY BE HOPE
chatgpt is my biggest opp
"most likely will not work"
bled said that about swift 2
so did everyone on stack exchange and well
everywhere
so fair enough
honestly im in shock we got this far
how the fuck did nobody try this in like a decade
its legit nearly been a decade since swift 2.0 released
π
and nobody tried it
someone probably did and then forgot about it lol
maybe yeah
ill make a writeup so nobody forgets
im sure chatgpt will remember my conversation and ITS DONE
alr
time to stansfer
thats a pretty big improvement
Tuple splat syntax is deprecated example code from Swift 2.2
what in the world
lmao
gotta love the classic "omit needless words"
basically the entirety of swift 3 is contained in that 1 sentence
funnily enough those are the actual words apple used
i mean the progress i've made today is pretty big
swift 2.2 over obj c is huge
not just objc but obj c with ios 6 apis
honestly idk how much hope i have for swift 3.0
harddrive is crying
thats not even including all the extra shit xcode installs
alr copying beta over and ill expand
exciting stuff
ngl half of me hopes beta 1 works purely so i dont go down the rabbithole of literally testing every commit that came before it
to try and pinpoint which broke it
alr expanding
https://github.com/swiftlang/swift/tree/swift-3.0-preview-1-branch
at least they have a sep branch for it
way less commits to sort through
launching
i mean this is it
if this doesnt work i have to sort through commits
built
ngl kinda nervous
sideloading
its not gonna work
goddamn it
when the adderall hits
same error
UGH
NOOO

nah i cant let this go
im going commit sorting
swift 2.3 exists
SWIFT_CC(swift) DISPATCH_RUNTIME_STDLIB_INTERFACE
extern "C" dispatch_block_t
_swift_dispatch_data_destructor_munmap(void) {
return _dispatch_data_destructor_munmap;
}
there is it
it was the final commit
but the final commit kinda added a fucktonne
okay so
thats that bit solved
now i need NSURLUbiquitousItemDownloadingErrorKey
okay im gonna build the swift toolchain
ima use my more modern hackintosh for this
π
lmao im putting way too much effort into this π
not to mention there could be so many problems that arise from using an older commit
also this is probably going to take hours to compile
only for it not to work
Ugh this is not building
Couldn't find cmark source directory.
./utils/build-script: command terminated with a non-zero exit status 1, aborting
blud
its right there
building
nvm
still finding dependencies
this is such a pain
all this purely to compile
maybe someone more skilled with this stuff could compile for me i'm having a pretty hard time i've never been good with cmake
FINALLY COMPILING oml
itll prolly fail
failed
i hate this
im compiling cmake now
imgetting a headach
idek if its worth the effort atp
KJSAHDKJSAh
im doing the whole thing again
oh my god
yet anothe freaking version of cmake
im going ot crash out
all this just for swift ππ
@magic hazel send commit
alr
nvm
β¦esn't show up for code-completion. (#2915)
rdar://26642818
?
fr
mfs forgot about kotlin (for the first part)
if weβre hating, lets add Go to the fire
Go is objectively less of a pain than rust
I canβt objectively compare, Iβve never gotten passed the toolchain setup part of rust
LOL
$5 to anyone who can show me how to target iOS armv7 from an apple silicon Mac host (with rust)
With rust ended my hope
π
Why are you targeting iOS with rust though π
Every time I look at Rust code it seems 10x more complicated than C and unnecessarily so
I remember there being rumours Apple would rewrite XNU in Rust 
my friend made a jb for old iOS in rust for fun. he used an x86 mac
I tried for hours to build it from my m1 machine and eventually gave up
"unnecessarily" let me introduce you to memory safety
lol only 1.3% is rust actually. but I could not compile that 1.3% of the project
Think about how much nicer this would look in Python
I believe if you installed rust with rustup you could
rustup target add armv7-apple-ios
and then cargo build --target armv7-apple-ios
let mut bro just use var
auto
are you sure that toolchain exists?
think about how much slower it would be in python
fwiw my friend (that made it) couldnβt get it working on m1 either π€£
admittedly this was like 2y ago and I havenβt revisited it
https://blog.rust-lang.org/2023/09/25/Increasing-Apple-Version-Requirements/
armv7-apple-ios (Target removed. The oldest iOS 10-compatible device uses ARMv7s.)
seems like anything < 1.74 supports it then
think about how much faster it would be in C
????
Time to attempt recompiling the swift 3.0 pre beta 1
This time on macOS 10.11
On my haswell hack
All in the name of getting swift 3 support on a single extra version
iOS 6 swift 3 is the dream
think about how much faster it would be in asm
But would it 
@magic hazel i have a better idea
If it involves objective c then no
ub*ntu 17.10 chroot
Nah
The build is based around Xcode
Itβs easier that way
cmakeβ¦
It uses xcodes sdks lmao
You can change this
I donβt care Iβll just use Xcode
Why go to all the effort
not only that but linux builds are barely supported on swift 3
Why go to all the effort
no way you said that
looks like ub*ntu is supported enough
okay fair
i am already going to a tonne of effort
again though, i'll just use the environment it's designed for
i already have 10.11 fired up
i have all the kinks worked out for the build
i'm not about to go through a whole new set of issues
not to mention it wants an ancient version of ubuntu
yet more problems
also i'm going to the effort for good purpose!!
swift 3 on ios 6
very cool
swift 2.2 on ios 6 is already pretty great
and here's the best part, i reckon it'll work on ios 5 with some dylib patching and shims
atp idek how ima document all this
ima try
chatgpt is really pulling me through this build process ngl
and for swift 1
there's no documentation for it
somehow it knows
ugh i have to install homebrew on this old ass machine
there is no winning here
why am i putting myself through massive pain
i couldve just used swift 2.2....
nah its so i can give a big fuck you to apple for "dropping" ios 6 support
they CLEARLY didnt need to
swift 2.2 is extremely stable on ios 6
and i have a feeling i can get a version of swift 3 not far off the first preview that works fine
thatβs a lot of messages
Slow code better than ugly code
Okay not that true but it supports my point
depends on context but i tend to agree. maintainability > performance. Not everything has to be as fast as possible
ye
not my haswell hack compiling whatever you're forced to compile with homebrew sounding like an actual wind turbine
heavily depends on use case imo
quake 3 fast inverse square root does not need to be very maintainable
shouldve seen my rant earlier
holy 
lmao
the rant came after
i deeply dislike ugly code
hence my dislike of objc
not as bad as C tho
what
c code is disgusting
C may be confusing but objc is a lot uglier imo
no
Task* createTask(int id, const char* desc) {
Task* t = (Task*)malloc(sizeof(Task));
t->id = id;
strncpy(t->description, desc, 99);
t->description[99] = '\0';
t->print = printTask;
return t;
}
C is disgusting
damn are yall dissin me rn
have you seen the objc block syntax
yes i have
it doesn't get much uglier than that
int main() {
int n,i;char d[100];Task**t;
printf("How many tasks? ");scanf("%d",&n);
t=(Task**)malloc(n*sizeof(Task*));
for(i=0;i<n;i++){printf("Task %d desc: ",i+1);scanf(" %[^\n]",d);t[i]=(Task*)malloc(sizeof(Task));t[i]->id=i+1;strcpy(t[i]->description,d);}
for(i=0;i<n;i++){printf("Task %d: %s\n",t[i]->id,t[i]->description);}
for(i=0;i<n;i++){free(t[i]);}free(t);
return 0;
}
try me
I donβt like slow code, but if my code is ugly I wonβt keep working on it
wow, without proper intendation, it looks ass
Yeah
I love that
hating. I like c and objc
A good Darwin block function
not about objc++ though. I think Saurik killed that for me
i mean... you better, given your name
Literally any language is better
alr ima compile tmrw
here's the commit
if anyone wants to
feel free to compile so i dont have to
much appreciated
gn
what happened to #development
why is there swift discussion
isn't swift banned here
It is
@aaron please filter it
Wtf it wonβt ping
Alfie pov
developers should have ban perms against people who talk about swift here
Isnβt shijima swift ??? π π
no ??
The WII is saved
I need to properly learn ojbc
Any other recommendations except https://uroboro.github.io/Learn-Objective-C-in-24-Days-Clone/ ?
This project was created with the intention of preservation
Trial and error is probably the best thing
Maybe use https://learnxinyminutes.com
Fair 
if you know C and object-oriented programming Objective-C is very simple
it just becomes syntax at that point
Bit of a long shot: If anyone here has any knowhow on ZK SNARKS/STARKS and roll ups, dm me.
rust fans unable to use any argument other than "muh performance"
rust haters unable to use any counterargument other than contrived, unidiomatic, and nonstandard rust code looking ugly
This channel is the best in the server
Why would it be banned what
Itβs a perfectly fine language
lies
mods please warn for misinformation
Dude there's like close to 5 million people who use the language just fine
π
Idk why ppl dog on Swift so much when so many people can use it just fine
Sounds like a skill issue ngl or just hating bcus tryna force a language to do something than it's meant to
I mean it's definitely imperfect but Swift 6 is pretty awesome
It's an attempt to give a C power language the simplicity of Python
It's not an easy task
bro pulled the 5 million out of their ass
and chrome has a global user base of 3.5 billion users
what's your point
that's my point exactly
chrome is a great example
not the best browser
but its perfectly fine for a lot of people
it does it's job
if it's working for the people who like using it why shit on it
(except C, C is archaic)
i only shit on swiftui
honestly i don't understand shitting on anything that works for those who it's designed for
if you like objective c and c based languages and you dislike the more simplistic and hands off approach swift is going for then yes no shit you won't like it

is it at all perfect not a change swift is deeply flawed but so is every other language
except C but C is archaic and that's it's flaw
Itβs memory-safe!!!
βοΈ
ugh i have to compile cmake from source again
why
because cmake 3.15 is nonexistent
precompiled
this shit gonna take forever
also not me setting my ca certificate to be a downloaded pem file sitting in my downloads folder
bcus macos flipped out
current steps
cd swift
git remote add origin https://github.com/swiftlang/swift.git
git fetch --depth 1 origin 6a0fb2b1888b158fd6cf73893564d6f5dc46349d
git checkout FETCH_HEAD
./utils/update-checkout --clone --branch swift-3.0-preview-1-branch
cd
curl -LO https://cmake.org/files/v3.15/cmake-3.15.7.tar.gz && \
tar -xzvf cmake-3.15.7.tar.gz && \
cd cmake-3.15.7 && \
mkdir build && cd build && \
../bootstrap --prefix=/usr/local && \
make -j$(sysctl -n hw.ncpu) && \
sudo make install && \
cmake --version```
ill probably make one long chain of commands that users can copy paste for ease of use
thats not done yet i still have to include all the build commands
ill get there in the end
ay its actually building faster than on my more modern hack
thats crazy
maybe bcus lighter toolchain and lighter os
welp it seems that my mac hates my certs
so i manually downloaded ninja
finally finally compiling
Rust is only used by transgenders
Thats why @native dune is using it for nocturned
@native dune Is it working btw
Aaron removed our manage messages perm just pretend i deleted that
WHAT
I hope he removes all your permissions
it's because the manage messages permission got updated and separated out the pin permission so aaron only gives pin perm now
also for geniuses :/
THIS IS THE FIFTH TIME IVE RECOMPILED SWIFT TO GET AN ERROR OMG
okay so
i think it really was that final commit
it added 18k lines
and both errors i got, ios 7 and 6 were related to a method referenced in that commit
its bcus it was a huge conversion
they moved away from NS types
to swift types
public var ubiquitousItemDownloadingStatus : URLUbiquitousItemDownloadingStatus? { return _get(.ubiquitousItemDownloadingStatusKey) }
i think i might finally be getting into the final stages of the build
after so much trial and error
Dyld Error Message:
Symbol not found: __TMps10SetAlgebra
Referenced from: /var/mobile/Applications/89DE44C5-10CC-466A-A504-20D61ACCEC75/Colour Snap Legacy.app/Colour Snap Legacy
Expected in: /private/var/mobile/Applications/89DE44C5-10CC-466A-A504-20D61ACCEC75/Colour Snap Legacy.app/Frameworks/libswiftCore.dylib
in /var/mobile/Applications/89DE44C5-10CC-466A-A504-20D61ACCEC75/Colour Snap Legacy.app/Colour Snap Legacy
Dyld Version: 212.3.2```
whats causing this errro
WAIT WAIWT AUIDT ASDUSAYHD
I THINK IVE FIXED IT HOLY SHIT
HOLY FUCKING SHIT
I GOT SWIFT FUCKING 3 ON IOS 6
I DID IT
IT IS SO JANKY
BUT IT SO WORKS
OH MY GOD
π
THIS TOOK SO SO MUCH WORk
I AM SO HAPPY IT WORKS
HOLY SHIT
THIS IS ACTUALLY FREAKING INSANE
working on streamlining the process
ngl idk if i want to use swift 3 anymore tho the setup is kinda jank
@radiant idol i got swift 3 working!
its kinda mid tho
its not full swift 3
ima ditch it, it's DEFINITELY not production ready LOL
BUT it does work
and it's closer to swift 3 than 2.2 is
so
that's cool
on what iOS ?
ios 6
Seek help
hehe
this took 2 days of shit
not fun at all
idk how many times i had to rebuild the toolchain
how many issues i had
its kinda cooked
import UIKit
class ViewController: UIViewController {
let button = UIButton(type: .system)
let colors: [UIColor] = [.red()]
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", for: [])
button.frame = CGRect(x: 0, y: 0, width: 160, height: 50)
button.center = self.view.center
// Add target with #selector
button.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside)
self.view.addSubview(button)
}
// New-style selector method
@objc func buttonTapped() {
// Change background color
currentColorIndex = (currentColorIndex + 1) % colors.count
self.view.backgroundColor = self.colors[self.currentColorIndex]
}
}```
notice anything odd?
there are some oddities compared to swift 3
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
window = UIWindow(frame: UIScreen.main().bounds)
window?.rootViewController = ViewController()
window?.makeKeyAndVisible()
return true
}
}
same here
its the methods
main() instead of main
its quite odd
I mean it's just faster to just use objc atp
nah swift 2.2 works natively
idk why nobody tried it
you dont have to do shit
it just works
Thank objc message system π
Every line end up being a objc_msgSend of some sort π
bcus obj c syntax makes me wanna puke
And it's also slower
not really
its pretty similar
its basically negligible icl i ran some stress tests
at least on an a5
maybe its worse on a4
the overhead is basically meaningless
Well, you probably don't notice it, but all of the data types (eg. strings) have to be converted from swift strings to NSString
yes i know all too well what happens in the background prior swift 3/5

ive tried every swift version now from 1-6 including swift 1 developer betas
HOWEVER
who gives a shit
its easier to code in
okay now i get to choose
do i want a shitty swift 3 lookalike
thats buggy and hard to build for
OR
stable swift 2.2
but worse syntax
That's your first mistake
its overcomplicated and slow
its not a mistake
its a choice
an active choice
its my preference
there's no objectivity here
they will both do exactly the same task
like you said, swift will literally end up translating down to objc
i just prefer how swift looks
i stop working on projects when i stop enjoying reading my code
i lose interest when using obj c extremely quickly
:///
the only ACTUAL downside to using swift is my builds will be 20mb bigger
but thats pretty much it
there's no other objective difference
its actually the best part of swift
it includes the dylibs
thats the secret sauce
thats how it can run on ios 6
(I won't talk about the build time which is probably huge)
it stopped doing that in swift 5
oh no
its quick asf
in fact its quicker than obj c LMAO
That's called static linking
no it's just an included dylib
You can do that in every language
in the app bundle
wtf you got me confused
except that swift is including it's entire runtime
anyways
i think i should make a writeup
for any interested devs
swift 2.2 is super viable
swift 3.0 will be avaliable if you're desperate
yeah i put way too much effort into this to not do one
ive never done one before tho
so im not really sure how to
same. i tried to do a blog-style writeup on iOS' rendering pipeline and it turned into like 20 page of just boring documentation
surely i can get dev role for this 
ππ
contact modmail
@hollow scaffold
should i do it before or after i make the writeup
After
alr
should i include the struggles of building swift
bcus i really doubt anyone will ever go to the trouble of doing this again
it was utter hell
i had to build every single dependency from scratch on specific versions and literally do source edits to get the thing to compile
the struggles make it engaging to read
mike ash's friday blogs on objc 
its the best technical content i've read fr
but perhaps more applicable to you, exploit writeups? like siguzas stuff
nvm he's pointing out flaws in objc
he owns the objc runtime now
he's the DRI @ apple for it
ngl one thing i hate in c based languages is pointers
Should probably start reading a bit of it
in the big 25 the language should be able to figure it out on its own
nshipster has good technical content too, but it's not very "writeup-y". mattt is an OG
yeah
i knew it his syntax is rather odd tho
eh nr
just using custom types
okay ive seen writeups like this
but mine is a bit less technical
well
the post is more about a programming concept (originally published as a research paper with a c# impl), and he translated it into a swift impl
kinda
half of it is differences between swift versions
and half is the build process
and why swift can run on ios 6 at all
writeups are hard. i would start with including anything and everything, then start trimming and organinzing to make it approachable
@robust radish how long have you been around iOS ?
for now as much as i wanna switch back my toolchain ima keep it on swift 3
in case i need to test more for writeup
15y
oh
lol yep
ios 4 sdk was such a big improvement over the ios 3 sdk
it was crazy when we got wallpapers
i remember watching every single keynote
apple keynotes used to be engaging
now they're corporate slop
#bringbacklivekeynotes
i am a certified https://ios.pro
π how much are you paying for that domain
too much
disappeared with the advent of COVID-19 but office workers still need to go back to office π
yeah i suspected as much π
ik
its sad
they were so much better
hearing the audience reaction makes the keynote feel more tangible
plus you don't really get the gravity of stuff like "one more thing" anymore
http://namesilo.com/marketplace/domain/ios.pro
im tryna get rid of it tbh lol
LMAO
10k hell no
thats wild
aint nobody paying 10k π
how much are you paying for it rn?
not 10k
hidden reserve
grr
whats the reserve
ima forget in 2 days anyways
lmao
i dont need a domain
i already have one
.org π
its dirt cheap
How many do you own π
your credit card bills are probably horrifying
a lot lol
I guessed so
hold on lemme get into namecheap. my domain list is crazy
π
I whois'd to get the domain registrar, then checked the price of a .pro domain for 3 chars. It's between 512-3.5k
π
holy fuck
per month??
year
They all don't even do anything π
for me its like $10/y
damn i'd pay that much
LMAOOOO
Who are the domains through btw
cloudflare, namecheap, and namesilo
Cloud flare?? Which is libswift
libswift is namecheap
Aw man
cloudflare is a registrar now, they're π₯
libswift gets like 1k unique visitors a day
Damn
yeah they're fine
Thatβd be really good for my write up itβs such a perfect fit for the idea
i got it last november for $16
A year? Iβd pay that much
Wait itβs usd tho
25 aud
Iβd probably still pay that
shoutout fat joe https://www.youtube.com/shorts/wPk5-uw2syQ
@robust radish you might like this
bsd / gnu/linux desktop environment written in objc with gnustep libs
Whatβs NeXT? i like that lol
I have some NeXT stuff. everything it runs written in objc π₯
you'd be surprised at how familiar the APIs on these are. the origins of Foundation. NSString, NSArray, all that
Objc is such a cool language
i think ima backport swift 3 syntax into swift 2
You have too much free time
Ooooo
lol hi aussie
that's crazy. what do they think they're finding
wsusscn2.cab gets only 107 uniques a day
I wonder if anyone actually depends on this for real
I made non-browser user agents redirect to the actual Microsoft file
This is how debugging with gdb feels
QRT: orikron
π¨π³ A man in China lost a game of Xiangqi. He spent 4 hours analyzing his loss despite the heavy rain and the protestations of his wife.
I have a massive scholarship so I donβt need a job
How tf do you pay for food without a job
Indeed. I think I am going to just back port some swift 3 syntax though, this build is quite annoying to work with
Iβm in uni my college provides food my college is 20k a year and my scholarship is 27k a year
Surely thereβs other expenses
No?
Like what
My board and food is taken care of
I donβt drive
Everything is walking distance
Cool
No one said it wasnβt
//
// Extensions.swift
// Learning UIKit
//
// Created by JWI on 28/08/2025.
// Copyright (c) 2025 JWI. All rights reserved.
//
import Foundation
import UIKit
//Swift 3 Timer
class ClosureTimer: NSObject {
let block: (NSTimer) -> Void
init(block: (NSTimer) -> Void) {
self.block = block
}
@objc func fire(timer: NSTimer) {
block(timer)
}
}
extension NSTimer {
// Swift 3-style API
class func scheduledTimer(withTimeInterval interval: NSTimeInterval, repeats: Bool, block: (NSTimer) -> Void) -> NSTimer {
let closureTimer = ClosureTimer(block: block)
return NSTimer.scheduledTimerWithTimeInterval(interval,
target: closureTimer,
selector: #selector(ClosureTimer.fire(_:)),
userInfo: nil,
repeats: repeats)
}
}
typealias Timer = NSTimer
class ClosureSleeve: NSObject {
let closure: () -> Void
init(_ closure: () -> Void) {
self.closure = closure
}
@objc func invoke() {
closure()
}
}
//Swift 3 Button
extension UIButton {
func addAction(for controlEvents: UIControlEvents, _ closure: () -> Void) {
let sleeve = ClosureSleeve(closure)
addTarget(sleeve, action: #selector(ClosureSleeve.invoke), forControlEvents: controlEvents)
// Store sleeve to retain it
objc_setAssociatedObject(self, String(format: "[%d]", arc4random()), sleeve, .OBJC_ASSOCIATION_RETAIN)
}
}
extension UIColor {
class var red: UIColor { return UIColor.redColor() }
class var green: UIColor { return UIColor.greenColor() }
class var blue: UIColor { return UIColor.blueColor() }
class var black: UIColor { return UIColor.blackColor() }
class var white: UIColor { return UIColor.whiteColor() }
class var gray: UIColor { return UIColor.grayColor() }
class var yellow: UIColor { return UIColor.yellowColor() }
class var orange: UIColor { return UIColor.orangeColor() }
class var purple: UIColor { return UIColor.purpleColor() }
class var brown: UIColor { return UIColor.brownColor() }
class var clear: UIColor { return UIColor.clearColor() }
}
func withAnimation(duration: NSTimeInterval = 0.25,
delay: NSTimeInterval = 0,
options: UIViewAnimationOptions = [],
repeatAnimation: Bool = false,
animations: () -> Void) {
var finalOptions = options
if repeatAnimation {
finalOptions = finalOptions.union(.Repeat)
}
UIView.animateWithDuration(duration,
delay: delay,
options: finalOptions,
animations: animations,
completion: nil)
}```
thats actually a swiftui method
actually nvm i can use the uikit one
import UIKit
class MainMenuViewController: UIViewController {
let startButton = UIButton(type: .Custom)
let gameTitle = UILabel()
override func viewDidLoad() {
let viewHeight = view.frame.height
super.viewDidLoad()
let colors: [UIColor] = [.red, .blue, .green, .orange, .purple]
self.view.backgroundColor = .clear
let backgroundView = UIView(frame: view.bounds)
backgroundView.backgroundColor = colors.randomElement()!
view.addSubview(backgroundView)
let _ = Timer.scheduledTimer(withTimeInterval: 1.5, repeats: true) { _ in
withAnimation(1.5, animation: .CurveEaseInOut) {
backgroundView.backgroundColor = colors.randomElement()!
}
}
gameTitle.text = "Colour Snap!"
gameTitle.backgroundColor = .clear
gameTitle.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(gameTitle)
view.addConstraint(NSLayoutConstraint(item: gameTitle, attribute: .CenterX, relatedBy: .Equal, toItem: view, attribute: .CenterX, multiplier: 1, constant: 0))
view.addConstraint(NSLayoutConstraint(item: gameTitle, attribute: .CenterY, relatedBy: .Equal, toItem: view, attribute: .Top, multiplier: 1, constant: viewHeight*0.15))
startButton.setTitle("Play", forState: .Normal)
startButton.translatesAutoresizingMaskIntoConstraints = false
startButton.backgroundColor = UIColor.gray.colorWithAlphaComponent(0.4)
startButton.layer.cornerRadius = (self.view.frame.width * 0.25) / 2
startButton.layer.shadowRadius = 5
startButton.layer.shadowColor = UIColor.black.CGColor
startButton.layer.shadowOpacity = 0.5
startButton.adjustsImageWhenHighlighted = false
startButton.addAction(for: .TouchUpInside) {
let gameVC = GameViewController()
gameVC.modalTransitionStyle = .CrossDissolve
self.presentViewController(gameVC, animated: true, completion: nil)
}
view.addSubview(startButton)
view.bringSubviewToFront(startButton)
view.layoutIfNeeded()
view.addConstraint(NSLayoutConstraint(item: startButton, attribute: .CenterX, relatedBy: .Equal, toItem: view, attribute: .CenterX, multiplier: 1, constant: 0))
view.addConstraint(NSLayoutConstraint(item: startButton, attribute: .CenterY, relatedBy: .Equal, toItem: view, attribute: .CenterY, multiplier: 1, constant: 0))
view.addConstraint(NSLayoutConstraint(item: startButton, attribute: .Width, relatedBy: .Equal, toItem: view, attribute: .Width, multiplier: 0.25, constant: 0))
view.addConstraint(NSLayoutConstraint(item: startButton, attribute: .Height, relatedBy: .Equal, toItem: startButton, attribute: .Width, multiplier: 1, constant: 0))
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
startButton.titleLabel?.font = UIFont.systemFontOfSize(startButton.frame.width*0.25)
gameTitle.font = UIFont.systemFontOfSize(view.frame.width*0.1)
}
}
swift 3 syntax on swift 2.2
as i code, if i run into issues with stuff i could usually do in swift i'll patch it into my extensions.swift helper library
eventually i will probably attempt to replicate nearly all of swift 3's renamings in that library
@kind herald
GIR is thinkingβ¦
backporting part of swift 4 as well
π This application did not respond
i implemented this:
UIColor(red: .random(in: 0.5...1), green: .random(in: 0.5...1), blue: .random(in: 0.5...1))
i also implemented withAnimation properly
βSwift 3-5β code running through my SwiftCompatKit for swift 2.2 on iOS 6
Ive decided Iβm re implementing as much as swift 3-5 as I feel like
Itβs really not that hard
Itβs just a bunch of api changes and closures
Modern Swift APIs are so much better than the obj c based swift ones
I hate selectors
Some APIs Iβll change slightly
One I needed was button.addaction
Itβs usually button.addaction( UIAction { your code }, for: .whatever)
I made it so itβs button.addaction(for .whatever) { your code}
Closure based
Much more swifty
That api doesnβt even come until iOS 14 though so
And the button api is add target, yet again selector based
Too many options to fill out just for a simple button to run code
Phone bills?
my monthly phone bill is close to Β£120 rn
$162 freedom units
Going out somewhere with friends
Trips?
Hello Developers please troll your fellow developers by letting grok read their codebases and then suggest improvement then open issues on their GitHubβs with AI imagined BS
I have none
I go on none
15 a month aud
Howβs that even possible
Contract?
I buy every phone I own outright
I loathe contracts
And I always buy second hand
Is that a VPN replacement?
in what circumstance would you need that many lines
dual standby not enough for you you need multistandby
many devices
i travel a lot
Each device has 2 lines
wtf
One with each carrier
for redundancy?
kinda
its because theyre the top 2 in the coutnry for coverage
and they often have coverage where the other doesn't
oh so you're using the same 2 carriers across devices
ergo, have both, pretty much covered everywhere
hm
mhm
im not counting the 10 or so lines i got for signal reborn
turns out you really can just email carriers asking for "free trials' and they send you a payg sim
with a few Β£ on it
is there any real reason for you to have 2 lines for each device that are all different though apart from the fact that you need those devices connected to signal though
but it ends up at 8 lines
like theoretically would a cloned sim suffice
honestly, not really
some of them are cloned
but uhh
while uk carriers didnt care
german did
@native dune @gleaming niche Hey im gonna do this with all of our repos
how on earth do you clone sims nowadays
without having access to the NSA's list of Kis
so i go on the carrier website
and press
"request new esim"
and it doesnt invalidate the old one
both can actively make data connections
huh what the heck
my carrier invalidates the sims π
true
so the non-clones are in things not in the eco system
such as work devices on a different icloud or the humble twinkpad
makes sense
which runs arch linux (btw) so sadly does not benefit from the apple ecosyst4em
and the moment apple ships a macbook with cellular im copping
and im hoping that will actually happen now we got the apple modem
choosing to believe the only reason macs didnt have cellular is not wanting to pay qualcomm a royalty
yeah that tracks
i rmemeber reading years ago it would happen
and im hoping those "it would happen" were reasons apple started modem dev
