Leo Dion (host): Welcome to another episode of Empower Apps.
I'm your host, Leo Deanne, and today I'm joined by Nathan Rolnick.
Nathan, thank you so much for coming on the show.
Natan Rolnik (guest): Hey.
Hi Leo.
Thank you for having me.
Leo Dion (host): Before we begin, let you do your own introduction.
Natan Rolnik (guest): Alright so I'm Nathan.
I've been doing iOS for a while, since iOS three four.
I learned to program in objective C and that, that's mostly my passion.
Along the way I've learned other stuff and.
Nowadays I work at as a senior iOS dev at monday.com.
And in my free time, I also write content mostly around the
tooling and server side Swift, in my, website, swift toolkit.dev.
That's really like a passion of
Leo Dion (host): Have you written?
Have you written for code?
Go?
Natan Rolnik (guest): Yeah.
In the past, I also I wrote some articles for Kodeco.
Leo Dion (host): So Monday
Natan Rolnik (guest): That's how I started writing also,
Leo Dion (host): okay, so Monday has two Israeli CCO Kodeco.
That's pretty awesome
Natan Rolnik (guest): month, yes.
Yeah, we have a few more in here in the country we have a few more people
that contributed to Kodeco, but
Leo Dion (host): But previous guests, we were just chatting before the show,
previous guest Shai is also at Monday.
A pretty, sounds like a pretty great place,
Natan Rolnik (guest): Yeah, we have,
Leo Dion (host): people.
Natan Rolnik (guest): Yeah.
I can't say that about myself, but yeah, we have a growing team.
Leo Dion (host): Yeah.
Natan Rolnik (guest): It's a, it's an interesting product.
Leo Dion (host): Yeah.
It is an interesting product.
We we were just talking a lot online and you've been posting a lot of great
stuff that I wanted to chat about on the
We've been talking a lot online about.
Some of the stuff you've been working on and some of the stuff on your blog.
I wanted to maybe let you introduce what you've been talking about
and what you've been working on lately when it comes to Swift.
Natan Rolnik (guest): What I've been, my, my goal of this website was to
produce some content that I feel that the community lacked a little bit with
good tutorials, practical tutorials, and and even sometimes interactive
stuff on the web of content focused on, on tooling and server side.
For example, one of the things that I did was a package
swift syntax file cheat sheet.
That, that was one of the, that was actually one of the first posts.
Another one that I'm really proud about it was a.
The Swift argument parser interactive guide, so we co like it.
This is divided in three sections and explaining options
and flags and arguments.
What are the difference between them and option groups and how to handle errors.
So I built a little terminal simulator where people can actually run commands
that run executables that are in the sample code so they can see the
result of how, what that code means.
So mostly it's been content around CLI stuff a little bit about the
server side that I wanna write more about it now that we just had
Hummingbird two released by Adames,
Leo Dion (host): Yeah, you just
Natan Rolnik (guest): yeah, I just published,
Leo Dion (host): of the recording.
So people should definitely check that out.
Hummingbird is fantastic.
I
Natan Rolnik (guest): Yeah, it is.
There, I think both, both Vapor and Hummingbird, they are, they're amazing.
And I think that connects a little bit to, what I wanted to say is that
I, I think that Swift is, empowers us so much in ways that 10 years
ago we couldn't as iOS developers that you had to learn other errors.
You still have, and I don't think that you shouldn't learn other
stuff but it gives so much power.
Cons in comparing to where we were 10, 15 years ago.
Leo Dion (host): Could you imagine this stuff in objective C, like
Natan Rolnik (guest): Yeah.
I actually, I.
Leo Dion (host): or command line objective C?
It's just I'm sure it's a possible, right?
Natan Rolnik (guest): but Swift is great in so many ways.
You can talk about that later,
Leo Dion (host): Yeah.
Natan Rolnik (guest): that makes it
Leo Dion (host): let's I wanna talk.
Go ahead.
Sorry.
Natan Rolnik (guest): I know that makes it much more of a fit.
I'm sure like you could write all these things with objective C, but
not only the verity, but language features and that SWIFT allows us.
I, in one of my talks that I gave recently about, was like
a quick introduction to Vapor.
I actually had a screenshot of a service that was called Objective Cloud.
I'm not sure you remember that.
Gave a framework.
They gave a framework that you could write.
servers just like vapor, but not just like vapor, but in, in the
same sense that vapor or express.
So you could write objective stuff and they had a cloud that ran on
Mac and could help with deploying.
So Swift is may, maybe that the vision is the same, that you can
share code may, that you can use knowledge or models and deploy
that on the cloud and have that as part of your app in another place.
Leo Dion (host): Let's deep dive a little bit more into the CLI part yeah.
What, why do you think SWIFT is a good option?
Just let's start particularly when it comes to CLI tools.
Natan Rolnik (guest): Yeah.
I like to divide that in three or four areas where I see the advantages.
And the first one is the language itself.
Like it has so many great features.
It has all the foundation, API that we already, we are used to
date and gets improved and like date formatting and whatnot.
Like all foundation.
We have I don't know, e enums, like the associated values, like all
this can live inside a CLI tool.
We have macros.
You can use macros from your own, from your tools.
You can use as in Kuwait, which is.
For CLI tools, they're super helpful as well.
Like all the time you have to do either network requests or disc operations
that they are, they might take some time, so writing them with as in Kuwait,
is much, much better than completion blocks or promises and futures.
And ma many things like that.
The language is, we all are used to it, right?
So that's number one.
Number two I think is if you're running on a Mac, you can access UI kit and
app kit, APIs, and even Swift ui.
If you wanna draw some stuff you can generate images.
That's a second advantage.
The third one is the whole ecosystem, right?
We, you, we can use packages that run on Linux, but they also run on Mac.
And they are packages that maybe you are already familiar with and
you can also share code with your own I dunno, within your team and
iOS app and CLI and maybe a server component that uses the same models.
And I think that the most important of them, like the fourth one is that
if you have a team of iOS developers, they all are gonna know swift.
Like one, one person might know more, no, the other one might know Python,
the other one might know Ruby and Rust.
But if it's a team of mobile developers and iOS developers, they all should know
Swift and they could be able to jump in and improve and fix and add features
and stuff like so I think that there, like there are four different, these
are four different advantages that.
They're very powerful.
Leo Dion (host): do you think it's easier to go from being an iOS developer
in SWIFT to a CLI tool developer in Swift, or is it easier to go from a
node or Python developer of CLI tools to a SWIFT developer in CLI tools.
Does that make sense?
Natan Rolnik (guest): It makes, I think that's, I think that maybe
I'm not sure about the answer, but I think that because the node ecosystems
started more from the backend, like end point, like from the backend view.
So they probably started off with more tooling around that.
And
Leo Dion (host): Did it though, like Node is JavaScript based?
It was
Natan Rolnik (guest): Yeah.
Oh
Leo Dion (host): is actually all browser.
Browser base.
So technically
Natan Rolnik (guest): No, but let's say Ruby.
Leo Dion (host): mean it's node but
Natan Rolnik (guest): Yeah, but let's
Leo Dion (host): it is more, yeah.
Yeah.
Okay.
There we go.
Natan Rolnik (guest): like they're by definition they have this more purpose
of, I'm not sure about the purpose, but if you say Ruby, you're probably
gonna think about Ruby on Rails, or if you say no, you're probably gonna
think about Express or other framework.
So that, that's basically where I wanna go.
So I think that as a consequence that their ecosystem is much
more robust in that sense.
And they're good options.
They might be a better option from, I dunno if you are a programmer
that knows both languages, but.
You are not specifically coming, like from a, focusing on a team
of five OS developers or might be probably that no is a better choice.
I don't know, maybe.
Leo Dion (host): right,
Natan Rolnik (guest): but but I think that the ecosystem is
growing and the, there's been a lot of evolution and work on that.
So I think that time makes, it makes it roll here as more and more
efforts are invested and we have more packages around it, I think it's a
matter of time and, the community realizes that this is a really
good option and as it grows, right?
How do you see this?
Leo Dion (host): Yeah.
I think as we'll talk about later, I feel like the ecosystem when it comes
to CLI tools has really seen like a big.
It seems like there's been a lot going on lately in the last six
months as far as what's out there.
Obviously we've had argument par parser which has been a big benefit and I've
even given a talk at, it was like five years ago, I think I gave a talk on it.
But it's like there's a lot you can do.
Let's talk a little bit more about argument parser specifically.
What so you, what did you learn when you built that interactive tool?
As far as how it works or how the mechanics of it work or
what are some quirks about it that people don't realize?
When you built the interactive tool that you don't think most people know.
Natan Rolnik (guest): The interactive guide actually made me learn other
things about Lambdas and 'cause they actually run, they run in a lambda
and I just returned the result.
I actually learned more in the last few weeks.
I had the chance to give it a try to Swift Cloud by Andrew Barber, which
I also wrote a little bit about it.
And the argument parser is it actually has it, it does a few things.
It's not only parsing, it does parsing of commands and translates
the them into structs that you can that where code lives.
Sorry, but, and, but it also does all the handling of the main, of
like the entry point of your tool.
Like you don't need to, you don't need to write the main function, right?
You just mark your str your, like your root command with at main
and possible possible command takes care of getting the inputs
translate, like doing the parsing, calling the validate function first.
First it validates, then it runs and it wraps that in a dual catch block
in a look at statement and if it errors, it also outputs there, error.
It, so it does a lot around it.
So that's what I learned in more in the bit in, in the last few weeks.
I.
And it's great.
I just felt that it's a bit limited if you want a bit more control.
And if you want
Leo Dion (host): do you mean exactly?
Natan Rolnik (guest): If you wanna add colors and displayers with with
styling or I don't know if you wanna add loaders or interactive input.
we were just talking about Node, right?
Like it they support this.
They have packages that they do this right away.
And let's say we have console kit from the folks at Vapor that it
does some sort of of interactive stuff, but it's not in the same
package as the Arwin parser.
So I'm also not sure if that's their goal.
Leo Dion (host): Like it makes sense that argument pars are, is
good about the front end part, but I do agree that there's like
something missing when it comes to.
Not the front end part.
The, they, they've, they have a tool that's really good at parsing
arguments and just running a thing.
And what I do agree is missing is some of the pieces that you mentioned.
So let's go over what you mentioned.
You said loaders.
What do you mean by loaders?
Exactly.
Natan Rolnik (guest): In the same way that you, when you have a UI
on, on an app, that you'll see a loader and then data shows.
Sometimes you, let's say you wanna authenticate with some service or you
wanna run a service that takes a while.
I don't know.
It's gonna build a docker image or download a docker image.
It's nice to see some output in the same way that you don't wanna
see a blank screen on an app.
You also don't wanna see in the terminal that it's stuck 'cause
you dunno what's going on.
So another thing that I learned recently is like how, let's say loaders work.
They actually in CLI tools, they, they actually print stuff
and delete and update that.
And it, it keeps changing the output without pre, without adding more.
It just replaces the current state.
So
Leo Dion (host): What we're talking about is the like VT 100 commands
basically, where you can do control commands to say, move the cursor
to the left, move the cursor
Natan Rolnik (guest): yeah our printing stuff.
Leo Dion (host): Colors, printing, all that
Natan Rolnik (guest): yes.
And console kit has a lot of that stuff but
Leo Dion (host): Oh, really?
Okay.
Natan Rolnik (guest): console, kt they have manuals and there's
also a great a great package.
It's called Swift, TUI, with a capital t.
That it has a similar
Leo Dion (host): about that in this show.
Natan Rolnik (guest): Yeah.
And
Leo Dion (host): UI.
Natan Rolnik (guest): yeah and you can use that for terminal apps, CLI apps.
And, I don't think that's the goal of the argument parser.
Like it's so good at parsing and the way they designed all
the property wrappers options, option groups, flags, arguments.
It's super powerful.
But in the same way so let's say I, I was looking for interactivity
in the argument parser, and I found that there's a branch that it's
1-year-old it's been stale and it's a bit of a bu bummer 'cause we have
no idea what, where that's gonna hap, like where it's headed and
what's the direction and what's.
Leo Dion (host): how is argument parser working with?
When it comes to Swift six type stuff
Natan Rolnik (guest): that's a good question.
Leo Dion (host): You know if there's no issues with like
Sendible or anything like that?
Natan Rolnik (guest): I'm not sure they're marked with it.
It's worth checking.
I'm not a hundred percent sure
Leo Dion (host): Yeah, it's fine.
I figured I'd ask.
I, the other thing you had on here was Specter kit.
Did you look at that as well?
Natan Rolnik (guest): I didn't try it yet.
It's in my wishlist of posts that I wanna, of, packages
that I wanna highlight.
I want to play around with it and see, but it's, yeah it, I don't
think it's similar to swift ey to the other package we mentioned.
It's also nice for building UIs and borders and tables and things like that.
Leo Dion (host): Okay.
Yeah, I'm looking at this stuff.
It's amazing what people have done and
Natan Rolnik (guest): Oh yeah.
It's incredible.
'cause like
Leo Dion (host): I think, I don't know, I've started three or four
different projects where I played with a VT 11 a hundred stuff in the codes.
And it's all, it's just like a rabbit hole for me.
I think what for me is missing and we've, me, I, maybe I've mentioned
this on the previous podcast, but is more stuff hooked up to observable.
I know that's what's going on with Swift two E, but with the new
change from combine I'm not sure that it's compatible with the new
Yeah, the new observable stuff.
So that's really what I'd like to see is something like that.
The other tool I'm gonna
Natan Rolnik (guest): I think that all this is eventually they're gonna arrive.
But I I'm not sure if disappointing is the word, but I would be
nice to see more efforts on those areas from everyone.
And I include myself there
Leo Dion (host): If only we had infinite time.
Natan Rolnik (guest): Yes.
Leo Dion (host): I wanted to mention that I use a lot.
It's not swift based, but it's definitely used in my iOS development
and that would be Fast lane.
It has a really nice terminal interface where it doesn't try to
do everything, but it tries to do enough that I feel like there's a
lot of great ideas there that we in the SWIFT community could use when
Natan Rolnik (guest): Yeah.
I think that they also have.
Leo Dion (host): an interactive app
Natan Rolnik (guest): Yeah, they have the advantage that in Ruby they, they
can do all the plugins stuff and it's like much more dynamic and they plays
together much more nicer than Swift it, it's super, it's much harder to do
that in Swift, if you wanted to have plugins for cli and I know that Ruby is
much more friendly on, in this aspect.
Leo Dion (host): Anything else you wanna talk about when it comes to CLI Tools?
Natan Rolnik (guest): I just think that ui and experience of
CLI tools, they're, there's an.
Even when we write for ourselves, like we could do better in, in terms
of explaining what's available, like what commands are available
and help and things like that.
And like dividing dividing s commands and sub commands into sections
like in, of different of different different areas or different domains.
And also output, like being able to control output and instead
of like just excode build, like just spitting out information and
That's why there are many parser or I think it's XY pretty or X, that does
Leo Dion (host): Yeah.
XY pretty, yep.
That's a big one.
Natan Rolnik (guest): Yeah.
So I think that's, I.
It's worth, like in general, tooling investing time in tooling and in tooling
UI and in tooling experience is one of those things that you never regret.
' cause in the end of the day it's a tool that it's gonna help you.
So I've, and anytime you spend on it, you're gonna, you're gonna get a, get
it back pretty quick once you use it.
Leo Dion (host): So there was a really interesting article you had out a
few weeks ago about this kBox idea.
Explain what that means exactly and why you built a macro
Natan Rolnik (guest): no I, that was, that's not mine actually.
The macro itself is written by Rick Vanden.
is he's from la.
No it's fine.
So all credits go to him.
'cause I actually, I met him and I saw this him, I saw him presenting about
it in, in a conference and before that I actually, I didn't invest
time in really understanding what copy on the right means and all the
consequences and how, and what's the impact it, it can have in your in apps.
And so basically this goes back the basics of reference
types and value types.
And copy and write goes to the concept that when you use value
types, whenever you copy those types, they actually take memory.
And instead of, differently than reference types
where just copy a pointer.
But the memory is the same.
The memory address of all the copied objects are the same.
When you use value types, you actually use more ram memory, right?
So if you copy thousands and thousands of STRs that have many
integer and strings and other primitives, it actually takes
more space on all of these.
So copy and write is actually a, it's not a new concept in computing.
It's like from the eighties that says you just copy if you're
gonna change, you just copy the value if you're gonna change it.
If you're not gonna change it, just use a pointer.
So instead of replicating this this value types everywhere and having
them redundantly in many places in the memory, just keep a pointer.
Like you, you usually use a storage, like you use a class, internal
class that is storage and you only really copy it in the memory if
you are gonna modify the value.
So that's actually what copy on the right means.
It's copy whenever you're gonna do a right, if you're not gonna
change or if not gonna do a right.
Don't copy it.
So in Swift you can do that using the function that is called is
unique is uniquely referenced.
Leo Dion (host): Is known, uniquely referenced.
Yep.
Natan Rolnik (guest): known, uniquely referenced.
Yeah.
So you can do that in your own properties.
And you can write a storage and it's fairly easy.
Like it's a few lines of code to do this for properties but whenever you
have more and more properties that you wanna include in this copy and write
pattern, it gets more, it's more work.
And then if you have a lot of STRs with a lot of properties that you
wanna support this, it gets really it's a lot of boilerplate code.
So what Rick wrote is, yeah, go
Leo Dion (host): I just, sorry, I had a couple of questions.
So why use obstruct if anyways?
If you're just gonna use pointers in the long run?
Natan Rolnik (guest): Because you still wanna be able to wait.
Let me think a little bit more about it.
Leo Dion (host): No
Natan Rolnik (guest): No that, that's a good question.
' Leo Dion (host): cause somebody's gonna be like, okay, why do
I have to add all this cruft?
Why not just use a class anyways and call it good?
Natan Rolnik (guest): right, because Oh, okay.
So when we added to, we could keep that part out.
But so the problem is that when you have classes everywhere,
whenever you change a property of one object, it's gonna change all
Leo Dion (host): all of 'em.
Natan Rolnik (guest): for all of them.
Leo Dion (host): Okay.
That makes total
Natan Rolnik (guest): so with STRs you keep with copy and write,
you keep the best of both words.
That's what I used in my article explaining it.
Leo Dion (host): Yeah, that's a really good point.
Natan Rolnik (guest): You use
Leo Dion (host): So basically it's a struct.
It's a
Natan Rolnik (guest): wraps a class,
Leo Dion (host): right?
And then this
Natan Rolnik (guest): you share memory.
When I, whenever it's the same, you share the
Leo Dion (host): same thing.
There you go.
Natan Rolnik (guest): Change, you copy that
Leo Dion (host): Okay.
Natan Rolnik (guest): and that macro does it in a really smart and short way.
You just declare you, you attach the macro to your struct and you declare
which properties you want to be supporting, you want to support copy
and write and it'll do all the code generation behind the scenes for you.
Leo Dion (host): yeah, where I've seen this is and you mention it here,
is Swift Neo, but specifically like Vapor, a lot of the Vapor Storage stuff
uses this kind of idea where they have it's a struct, but then the properties
are all like with a class inside it.
That's where I've seen this a lot.
And is it like, is this something you should be doing when you're
building an iOS app or is it more useful on the server
Natan Rolnik (guest): No, I actually think it's very relevant
to iOS and Mac OS apps because it can, this can affect performance.
Not only you waste more memory, but you also waste computing processing
for copying all this stuff.
So if you pass around a lot of data between views, like between view
models or between different objects.
If you are in the scale in like in high scales and property and these
drugs, they are big, it might also like, it might be very relevant, but
it, but you also need to take into account some considerations that.
When using copy and write in, in, in some place, like in some conditions it
can lead to performance issues as well.
Leo Dion (host): It has to do with the check or what specifically is
Natan Rolnik (guest): yeah.
Be because if you're, like, let's say you have a, an array of values
and you're iterating over them, and inside a for loop, you have,
you are modifying something.
And so let's say you, you're gonna have you, you're gonna be at every, right?
You're gonna be copying stuff.
And this is inside for loop, so you can that's called accidental quadratics.
It's a concept that I mentioned in the, in that blog post that I also
had no idea that existed before learning about copy and write.
And I linked there some to some talks about performance in Swift.
They're very they explain this concept in a more friendly
way than just a scary name.
So it can actually lead to issues if you don't know what you're
doing, like it needs to be used with not knowing what you're doing.
Like just don't throw it everywhere.
And I think it's also worth mentioning the, in the cowbox repo, they have
another repo that they link to another repo of benchmarks and it shows data
how much data is consumed and how much memory is consumed and what
the real impact can be in an app.
And I think it you can run them both, the food truck sample
app from from the last DD.
So what Rick did, Rick took that project, and he applied the Carbox macro
in some, in, in some of the str there.
And he compared that performance and memory and pro, he did
profiling and he explains everything in the in, in that ripple.
So if you, if for people who are into this kind of into this kind of work
and analysis and getting into the lower levels of how your code performs,
that's definitely like a, that's a feast for people who like this.
Leo Dion (host): And we'll put a link to that in the show notes as well.
Of course, your article and the repo.
What do you think is, what do you think is missing when it comes to
Swift Package Manager right now?
Natan Rolnik (guest): There's one thing that really annoys me is
whenever I wanna spin off a new project that I know exactly what I
want that I don't have the option to get a template and start using that.
For example, if you wanna start a new vapor project, you probably
should use the vapor CI It's gonna ask you a few questions.
Do you want fluent, do you want, do you wanna use which database do you want?
Do you want Leaf, which is a template, temp, templating engine.
And then it's gonna, it's gonna take all that and create
for you a starter project.
And for people who worked with NPM, that's, let's say I, my website
is built on in, I just like you do N-P-M-N-P-M create and it follows all
the instructions that template has.
And that's also an interactive thing that you interact with the questions
and based on our, on your answers, it's gonna create your template.
So I feel that for these projects so I want to create a lambda.
Okay.
Where do you start from in Swift?
Okay.
There's a.
I go to the Swift AWS Lambda run runtime repo.
And then I read the, read me and I copy where with whatever
package dependencies I need to add.
Then I create, I go to the terminal and I do swift packaging.
It there just type executable and I start manually doing stuff.
So e even if there were templates for this, I would need to go manually
and clone the repository and remove the gate remote and do a lot of,
there's a lot of repetition and things that in other ecosystems, they
already solved that with templates.
Leo Dion (host): well, Nathan, can't you just use Xcode to
create your Swift Pro package?
Won't that do everything?
Not really.
Natan Rolnik (guest): Yeah.
Not really.
So well, we could all write a tool that would do this, but let's say NPM
has this built in do NPM create and I feel that some of these, this things
we're still not sure if limited or
Leo Dion (host): already talked about like a, we have
a terminal front end, right?
What would you we're, let's just say we had that right where it could
ask you questions, like you're just talking purely about creating a swift
package through the terminal and like asking certain questions, right?
Natan Rolnik (guest): Based on, yeah, based on a template that some
organization or some individual put it out there to help, to ease.
Leo Dion (host): How, yeah, I wouldn't be, would you want something to where
you had like NPM install save where it actually adds the dependency for you?
Natan Rolnik (guest): Do you know what I learned not
recently that SPM supports that?
There was a great article we can link to that.
I'm, I don't remember.
I'll send you later.
Verwer mentioned it in iOS that weekly, a few weeks ago, I think.
Leo Dion (host): Okay.
Natan Rolnik (guest): I think it was two
Leo Dion (host): work like pretty well or like I do now?
I re I'm actually remembering what you said.
Yeah.
Natan Rolnik (guest): But with n pm it's much easier, right?
You just do.
'cause in, in SPM we have a few layers.
We have there's the package dependency and there's the target dependency.
So first you need to add your package dependency to your package,
and once you have that, you can add two different target dependencies.
With NPM, I don't think that you can have multiple targets or you just
add there's, there are dependencies and they have dependencies, but you
just run one command and it installs.
Leo Dion (host): So you had an episode with them a few weeks ago,
Natan Rolnik (guest): Yes.
Was a
Leo Dion (host): they?
Is that what he was talking about
Natan Rolnik (guest): No, I think he published it.
Someone else who published this second I could find it.
Leo Dion (host): yeah, we'll put a link to that in the
Natan Rolnik (guest): We'll put a link to that.
Yeah.
Leo Dion (host): Yeah.
Yeah, no, I agree.
A hundred.
I've gone down that rabbit hole too.
So I'm looking for something where I can create a package and be like, do
you want to build a command line tool?
Do you want to build a server?
Do you want to build a Lambda?
And then.
Just gets it started for you.
'cause I do feel like that's missing a lot.
Yeah, totally.
Though let's, let me just be devil's advocate, even though I agree with you.
But there are tools out there no problem.
There are tools out there like Vapor, CLI essentially for
JavaScript, stuff like that's not.
Unreasonable that you build a custom command line tool for your I agree.
It's not great, but like I've used V
Natan Rolnik (guest): it's,
Leo Dion (host): I've done I've done stuff with React native
where it's like basically you run the command and it creates a
whole package, Dutch a for you.
So there, there is a lot of stuff in the JavaScript community out
there specifically for this case where it's what I'm trying to say
is like the vapor CLI is not totally unreasonable approach to that.
Even though I wish it was more
Natan Rolnik (guest): No, for sure.
But what I mean is that I feel would be very helpful to the H ecosystem is
having this baked into, like having a standard that whoever wants to
offer a template that, that is SPM compatible would be helpful and nice.
Leo Dion (host): So I would like to do that.
So I've published my own DSL for SWIFT packages that I use now for
server side and iOS applications.
And like for me, it wouldn't be that hard to go take the next
step and like basically turn it into a command line tool.
That's what I'd like to do with it, to where there would be a lot,
I don't know if you've looked at package DSL, but basically the
idea being like, yeah, no problem.
But like the idea being is you create, you put all your dependencies
and stuff in separate files and use like a SWIFT ui, DSL to
Natan Rolnik (guest): Nice Results builders.
Leo Dion (host): yes, lots of result builders.
And that would even make it easier.
'cause all you have to do is create a new file or remove
a file and there you go.
So yeah, that's you're motivating me.
Thanks.
'cause I need more stuff to do right now, obviously
Natan Rolnik (guest): Yes.
Could just publish it in using Homebrew.
Leo Dion (host): Yeah.
Natan Rolnik (guest): You know what maybe this could be swift evolution
proposal, especially if maybe the Swift Server work group could
Leo Dion (host): I do think the package dot Swift is a bit dated for a lot of
reasons, so I wouldn't be surprised if in the next year or two we get a new
Natan Rolnik (guest): new one.
Leo Dion (host): Yeah.
Just 'cause there's a lot of stuff to it that's awkward.
Natan Rolnik (guest): Standards are hard to replace.
One can hope.
Leo Dion (host): What else did you wanna talk about before we close out?
We had a few other topics on the doc, but I want, what are you most interested
in talking about before we close out?
Natan Rolnik (guest): no, I think we covered a lot.
What my main message with this with my website is basically we can
much easier than five, not even 10 years ago, five, four years ago.
We can build tools and even server stuff in a much more
easier way than a while ago.
And they help us.
Like I I've done stuff that I'm happy, I invested time on them and.
And it pays off.
It's worth investing it.
We have tons of opportunities for automating processes
or improving processes.
But if you're like just focused on, on the app itself we don't, like if
we leave this little box of getting things done and thinking more about
this processes and how you can, like, how you can help your team and
how you can help your future self like that's the main message is.
You can go out and build stuff for you and for our team and it's gonna be worth
it and it's gonna be maintainable think that again, we are in a different place
that we were not five, four years ago.
So I think that everyone should try to familiarize themselves with these
tools and this giving, at least giving a try for, I dunno deploying
a little function or deploying stuff even for personal stuff for fun.
Leo Dion (host): Do you think any of the stuff that you've
picked up is applicable?
Specifically to the typical, 99% of us are Swift UI iOS developers.
What do you think you've picked up in your development tools that has
helped you when it comes to just your day-to-day iOS development stuff,
I do think like you get a greater appreciation of the language and what
you could do with the language and understanding it's for versatility
and how so I actually give you an ins example is when I was at the server
site Swift conference Franz gave a really good talk on this width pattern
that he used with non sendable objects.
And this was specifically for the server, right?
And it occurred to me that this is a, this is this issue while
it's more applicable to the server is something I've run into when
it comes to certain non sendable types stuff concerning swift data.
And it was like a eureka moment for me of something that I could directly
apply to my Swift UI work that's not even server related, but it's
oh wow, yeah, this is really cool.
And.
That's a specific instance, but there's little things where you
pick up on stuff in the server.
Like I've seen, like the stuff you talked about the copy on, I'm sure
that's more on the server, but it's definitely, like you said, applicable in
Natan Rolnik (guest): Oh, it's totally, yeah.
Leo Dion (host): Yeah.
Natan Rolnik (guest): I think that, let's say
Leo Dion (host): I think that's the thing that grew out of, that's a thing
that grew out of the server community, I'm sure, but it's definitely, like you
said, applicable for iOS development.
So there's things like that I find when it comes to to,
to working on this stuff.
Natan Rolnik (guest): No, I think even if you learn other languages, you can
learn things that are relevant to like concepts or even limitations, like
some languages they have limitations that with those limitations you learn
new techniques or new patterns that in some more advanced you cases you
don't have to use or but I don't know.
But I think that, answering to your question, maybe, I don't know the
concept of fu futures and promises, I.
I learned a little bit of js and a little bit of vapor
Leo Dion (host): Sharp and js.
That was it for me.
And then going into Vapor, it was like, yeah, I get totally what's going on?
And then I was like, man, I wish they had async weight though.
And then Eureka, here we are.
Yeah.
Natan Rolnik (guest): And so I, even though I had never used promises
in, in, in the iOS domain, it's it's good to know more techniques
and more patterns and more you think about things as streams.
So for example, if you are gonna work with reactive stuff or com combine and
even async, async sequences it's the same, it's the same thought, right?
It's the same way of thinking like that every, everything is a stream.
I think that even talking about swift concurrency, on the server.
You also have you, you have to deal with sandal, maybe non copyable,
maybe all the strict concurrency.
And maybe it's gonna be easier to learn there than in, on
the, on an iOS app case.
And from there you could start applying.
Or maybe you have a smaller app on the server that's easier to
start migrating to start migrating to, to the SWIFT six strict mode.
And once you're ready and you understood how it works you could apply that to
a bigger scale iOS app or framework.
Leo Dion (host): exactly.
Exactly.
100%.
Nathan, thank you so much for coming on the show.
This is really
Natan Rolnik (guest): Thank you for reaching
Leo Dion (host): Where can people find you online?
Natan Rolnik (guest): I'm on both X and Mastodon as Nathan Ron without an H.
We can leave the link and I've been, so the website we mentioned it's Swift
Toolkit, do Dev also on X and Masteron.
I've been posting weekly for a little bit more than four months.
The, there's, I've, again, I've been focusing on on content that is
not sure if different than, but I try to make stuff that's sometimes
interactive, sometimes with tutorials.
So if you're interested in this domain, I'll definitely.
Go there.
Yeah, these are the places I can, I'll be happy to chat with anyone that
Leo Dion (host): I definitely check out the articles on
their, on Nathan's website.
There's a lot of good stuff.
And subscribe or follow 'cause yeah.
People can find me on Twitter at Leo g Dion.
My website is bright digit.com.
I'm Leo GD on at C Im on Mastodon.
Yeah, if you're watching this on YouTube, please and subscribe.
And if you're listening to this on a podcast player, please put a review.
If you have any requests for topics let me know.
Reach out to me.
I'd love to hear what you think.
Join our Patreon to get early access to episodes like this and subscribe
to the newsletter so that way you can catch some more content as well.
Thank you everybody, and have a good rest of your week.
Bye.
Natan Rolnik (guest): Bye-Bye.