Live data from Hacker News

Stevia: Human-readable auto-layout in code

github.com

21–30 of 60 posts

Re: Stevia: Human-readable auto-layout in code

#21
post #3

I find it strange that something akin to markdown-style syntax sugar is more user-friendly than a visual designer. Do the tools for developing a UI for iOS this way not include a WYSIWYG editor to set things such as contraints?

Do you also find it strange that WYISWYG website editors are not more widely used?

Re: Stevia: Human-readable auto-layout in code

#22
post #13

It's not really on-topic, but why do people name their projects with names that are very difficult to find via search engine? I really don't understand this mindset.

I guess they don't understand how search engines work, like that dumb company that created the unsearchable programming language Go.

Re: Stevia: Human-readable auto-layout in code

#24
post #13

It's not really on-topic, but why do people name their projects with names that are very difficult to find via search engine? I really don't understand this mindset.

I guess they don't understand how search engines work, like that dumb company that created the unsearchable programming language Go.

Which would have been a terrible name if they weren't simultaneously controlling the bully pulpit.

Re: Stevia: Human-readable auto-layout in code

#25
post #7

There is also SnapKit which I really like: https://github.com/SnapKit/SnapKit box.snp_makeConstraints { (make) -> Void in make.width.height.equalTo(50) make.center.equalTo(self.view) }

And Masonry, if you're still on Obj-C (like me):

https://github.com/SnapKit/Masonry

    [box mas_makeConstraints:^(MASConstraintMaker* make) {
        make.width.height.equalTo(50);
        make.center.equalTo(self.view);    
    }];

Re: Stevia: Human-readable auto-layout in code

#26
post #3

I find it strange that something akin to markdown-style syntax sugar is more user-friendly than a visual designer. Do the tools for developing a UI for iOS this way not include a WYSIWYG editor to set things such as contraints?

I think it's really a question of audience. A textual DSL for visual layout is popular to the HN audience, because most of us are more comfortable writing code and interacting with computers on the command line. While we love having a DSL that we can use our favorite tools on (like diff, grep, ack, etc.), the majority of other folks (read: non-HN users) probably find a WYSIWYG editor much nicer.

Re: Stevia: Human-readable auto-layout in code

#27
post #7

There is also SnapKit which I really like: https://github.com/SnapKit/SnapKit box.snp_makeConstraints { (make) -> Void in make.width.height.equalTo(50) make.center.equalTo(self.view) }

And cartography, which is my preference:

https://github.com/robb/Cartography

    constrain(button1, button2) { button1, button2 in
        button1.right == button2.left - 12
    }

Re: Stevia: Human-readable auto-layout in code

#29
post #7

There is also SnapKit which I really like: https://github.com/SnapKit/SnapKit box.snp_makeConstraints { (make) -> Void in make.width.height.equalTo(50) make.center.equalTo(self.view) }

Or while we're sharing, here's mine in Obj-C++ (although I never managed to extract it into a separate package):

https://github.com/viewfinderco/viewfinder/blob/master/clien...

    [self addConstraints:box.anchorWidth == 50];
    [self addConstraints:box.anchorHeight == 50];
    [self addConstraints:box.anchorCenterX == self.view.anchorCenterX];
    [self addConstraints:box.anchorCenterY == self.view.anchorCenterY];

Re: Stevia: Human-readable auto-layout in code

#30
post #13

It's not really on-topic, but why do people name their projects with names that are very difficult to find via search engine? I really don't understand this mindset.

I guess they don't understand how search engines work, like that dumb company that created the unsearchable programming language Go.

I think this has hugely influenced the number of people who refer to it as 'golang' instead of just 'go'.

If a query comes up with junk I usually replace 'go' with 'golang'.

Post reply on HN