Hacker News new | past | comments | ask | show | jobs | submit | ortuman's comments login


Why another serialization format? What are the advantages over TOML/YAML?


Cool. We're also planning integration with push notifications services, including SNS.


Sure! Future integrations with advertising APIs is in our roadmap.


To finish the implementation of an XMPP server written in Go (Golang) https://github.com/ortuman/jackal


Curious, why not instead contribute your valuable Go expertise towards matrix (specifically the homeserver called Dendrite)? Certainly don't want to take away any of your passion for xmpp...but if you haven't read up on on matrix in general, I encourage you to do so.

For matrix in general, see: https://matrix.org/

For diff. between matrix and xmpp, see: https://matrix.org/docs/guides/faq.html#what-is-the-differen...

For Dendrite - matrix's homeserver written in Go - see: https://github.com/matrix-org/dendrite

Cheers!


Awesome stuff, though it's a pity autolayout cannot be used along with this framework. Anyway, it's worth to take a look.


You can use autolayout (see my NSLondon talk, which discusses this in the Q&A). However, there's no way to make autolayout run asynchronously, so you won't be able to reduce main thread stalls caused by autolayout-driven calculations.


Seriously, is autolayout actually used by a lot of people? I tried doing something semi-complex a few weeks back and I spent hours fighting with it. Then I spent 10 minutes writing 10 lines of code and it worked.

When you finally grok it, does it become worth it?


Once you "get" doing AutoLayout you will never want to go back. I'm speaking as a guy who swore up and down to frames. All it takes is doing some adaptive stuff for 3.5, 4, 4.7 and 5.5 inch screens to make you want to jump out your window.

By the time you create a good system to get the frames to work with an adaptive layout, you just implemented a poor man's version of AutoLayout.

Just my $0.02. I think it saves me a lot of time. I try to avoid AutoLayout in IB and just use code, either a third party DSL or apple's own visual format language.


How do you do animations with autolayout? Isn't it kinda hard compared to frames?


It's actually easier depending on the animation you want to do. You can set an NSLayoutConstraint to an IBOutlet and then change it's constant in an animation block.


You just have to store the constraint in your VC or custom view. You still need to use frames sometimes though. I have found that scrollviews and AutoLayout are arch-nemesises.


you can just set the constraint constant. I'd say it's much easier.


I recently learned and used Autolayout to design a few different apps. It has its pros and cons. For relatively simple UIs, it's great, especially if you use Interface Builder. It really lets you express what you mean when you lay something out, and it automatically works with all screen sizes. On the other hand, if you're doing anything that requires lots of little views laid out in an orderly way — a keyboard, for instance — it's more trouble than it's worth.

I think for Autolayout to have more general appeal, it needs two things. One, an easier way to use it programmatically. (Creating NSLayoutConstraints all the time is annoying.) And two, a better way to define equal spacing between views. (Creating spacer views is incredibly boilerplate-y.)

Also, the more constraints you have, the harder it gets to conceptualize things like intrinsic contents sizes, priorities, and inequalities.


Have you tried Masonry? It might be right for you if you want easier programatic use than NSLayoutConstraints provide. https://github.com/Masonry/Masonry


Masonry works great! I've used it in every project since discovering it. I highly doubt I'd be using Autolayout without it or something similar.


Just superficially looking at the syntax, that looks like a great improvement over Autolayout! I'll have to check it out.


Of course it does. I admit it can take a few long to get used to it, but once you do, turns out to be kind of a mechanical process that saves you a lot of time. Above all, when combined with the interface builder. I'm quite sure those 10 min. wouldn't have been more than just 5 using IB + AL.


Well, it's certainly encouraged by Apple, and it's getting to the point where they aren't interested that "supporting all these sizes without using AutoLayout is hard."


How do you optimize for 3 different device sizes? Hardcoding it?


You can perform manual layout in the layoutSubviews method of any UIView. Simply calculate your positions with the current view size in mind, looking up the Size Class if necessary. (And don't use exact pixel positions, obviously.)


I know you can do that, but it just seems like less work and better results to set the proper constraints in IB.


It depends on what you're doing. For example, good luck creating a keyboard in IB (especially with all the spacer views you'll be needing).


No autolayout? Sounds like a feature, not a bug...


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: