|
I've gotten away with it more often than not. Whose anecdata wins? Honestly, if someone is parsing a limited set of something like (rgba?\((0-9){1,3},(0-9){1,3},(0-9){1,3}\)|#?([a-fA-F0-9]{3}){1-2}), chances are they're dealing with data that is either normalized at some level, or somewhat controlled/validated. Writing a proper parser won't cause problems but it could be time poorly spent in terms of opportunity cost.
|
# ? Apr 21, 2019 06:56 |
|
|
# ? Jun 5, 2024 05:30 |
|
Doctor w-rw-rw- posted:I don't doubt that that approach is super fast, and nice for compilers, but it sounds like overkill for a typical iOS app (assuming the developer is not already familiar with writing recursive descent parsers) To me writing a little parser like this is the sort of that a lot of people seem to think is hard because they just haven’t done it. Give it a try, it should be pretty easy.
|
# ? Apr 22, 2019 04:31 |
|
Doctor w-rw-rw- posted:I've gotten away with it more often than not. Whose anecdata wins? And when you discover that the data isn’t as normalized as you think it is, and someone put in a comment or an extra space, and you have to start tweaking the regex, you’ll wind up having to spend the time you thought you were saving anyway. If you’re going to argue opportunity cost, argue about the utility of spending a week on something, not a couple hours.
|
# ? Apr 22, 2019 04:35 |
|
eschaton posted:And when you discover that the data isn’t as normalized as you think it is, and someone put in a comment or an extra space, and you have to start tweaking the regex, you’ll wind up having to spend the time you thought you were saving anyway. Of course the compiler writer (not exactly clear on whether you work on clang/llvm or Xcode or what) would see a lot of different pathological input and corner cases, and know *exactly* what to do to write the best parser off the top of their head. In any case, decent unit tests would catch those problems, and not *every* problem needs to handle messy input. As long as the unit tests are filled out with reasonable input, most programs and apps will fare fine with a "parser" built out of string functions in a handful of minutes. It's because a lot of developers haven't written a "real" parser that it will take time to learn to do that, or realistically to google around for stackoverflow posts which describe. You are paid to know this stuff - a lot of it must be second nature, but I certainly can't rattle off the top of my head what a "real" parser would be (parser generator? recursive descent? something dumber?) even though I probably could relearn it without much trouble. But going the easy route and then going the easy-but-less-familiar-route-that-takes-time or hard route as needed still sounds like the natural course of action to me.
|
# ? Apr 22, 2019 12:16 |
|
Is anyone going to WWDC? I didn’t get a ticket but decided alt-conf and layers both look interesting so I’ll be in the area. I might be a bit jetlagged but a meetup would be cool as hell. Flying in from Stockholm on Sunday and out on Friday so down whenever.
|
# ? Apr 22, 2019 12:20 |
|
Doctor w-rw-rw- posted:Of course the compiler writer (not exactly clear on whether you work on clang/llvm or Xcode or what) would see a lot of different pathological input and corner cases, and know *exactly* what to do to write the best parser off the top of their head. Just admit you don't know something, dude. It's okay. This mental gymnastics of "well OF COURSE I know this and require only the minimum of refreshing to be back to doing it flawlessly, but for the benefit of others..." gets old fast.
|
# ? Apr 22, 2019 17:54 |
|
eschaton does not work on compilers in any way. He's still right, though: you should really just write a simple recursive-descent parser on top of a simple lexer like this:Swift code:
rjmccall fucked around with this message at 23:48 on Apr 22, 2019 |
# ? Apr 22, 2019 23:39 |
|
Dirk Pitt posted:Is anyone going to WWDC? I didn’t get a ticket but decided alt-conf and layers both look interesting so I’ll be in the area. I might be a bit jetlagged but a meetup would be cool as hell. Flying in from Stockholm on Sunday and out on Friday so down whenever. I’ll be at WWDC.
|
# ? Apr 23, 2019 17:07 |
|
Gonna get a job at Apple just so I can go to WWDC every year
|
# ? Apr 23, 2019 18:05 |
|
A recursive descent parser is not some fancy-pants thing that you need to learn how to write. It's basically what you get if you set out to write a parser with no knowledge of how a parser should work. Realizing that you're writing a recursive-descent parser just helps you skip a few steps and get to something working faster.
|
# ? Apr 23, 2019 21:24 |
|
Doc Block posted:Gonna get a job at Apple just so I can go to WWDC every year
|
# ? Apr 23, 2019 21:31 |
|
JawnV6 posted:wait what I am not being serious
|
# ? Apr 23, 2019 22:05 |
|
Froist posted:You have my interest - in the last week my work’s latest update (which introduces UDP connections) has had issues with IPv6 UDP on some Android forks (obviously unrelated), but the iOS version hasn’t released yet because we’re stuck in rejection limbo. Not sure the report link, one of the other guys filed it. The issue seems to have something to do with multicast and IPV6. We've moved on. The hardware devices we talk to don't support IPv6 anyway. Also I'm really really growing to dislike Realm. Ran some stats over our git repos and we spend about 60% of our debugging time knocking stupid realm bugs on the head. Never was my choice to use it, and I'm really starting to think the benefits don't match the stupid costs. This , by the way applies to RX type libraries too. I'm sure theres a use-case for this poo poo, but I haven't encountered one yet. Its a big ol' mess of buzzword tech. duck monster fucked around with this message at 05:35 on Apr 24, 2019 |
# ? Apr 24, 2019 05:28 |
|
I would be interested in hearing what stupid issues you have with Realm since I'm probably responsible for half of them and the other half are probably things I've spent the last two years wishing I could find time to improve.
|
# ? Apr 24, 2019 06:39 |
|
Isn’t Realm the “not Core Data” ORM that used to market itself as “Core Data doesn’t support threads, we do” when that’s been incorrect since day one?
eschaton fucked around with this message at 04:59 on Apr 25, 2019 |
# ? Apr 24, 2019 08:34 |
|
The marketing's always been pretty dumb and off.
|
# ? Apr 24, 2019 15:07 |
|
eschaton posted:I’ll be at WWDC. What a surprise, I'll be there too! I figured I'd get up on stage and say a few words at some point.
|
# ? Apr 25, 2019 05:31 |
|
Plorkyeran posted:I would be interested in hearing what stupid issues you have with Realm since I'm probably responsible for half of them and the other half are probably things I've spent the last two years wishing I could find time to improve. Speaking of, how’s it going?
|
# ? Apr 25, 2019 15:42 |
|
rjmccall posted:Speaking of, how’s it going? I'm using it for a small app at the moment and it's working fine, fwiw.
|
# ? Apr 25, 2019 15:48 |
|
rjmccall posted:Speaking of, how’s it going? Well I still have a job, I'm getting some figgies in 6 months and there's a 9 month roadmap that involves good things for the stuff I work on. After that who the gently caress knows.
|
# ? Apr 25, 2019 17:54 |
|
Yeah, I was seeing some speculation that it was an acquihire, so I'm glad they're not blowing up your engineering group, at least immediately.
|
# ? Apr 25, 2019 18:46 |
|
The server stuff is a big question mark (there is a plausible path to it sticking around, but...), but all of the conversations around what happens with the client database have been around things like what roles we should hire people for now that we can actually afford to do so again.
|
# ? Apr 25, 2019 19:54 |
|
Thanks for the parser comments. I ended up finding a parser on github that met my needs so crisis averted. Now another question - is there a straightforward way to draw rounded rectangles in CoreGraphics that have different horizontal and vertical radii? Basically implementing this. WPF has a handy ArcSegment which allows you to specify both a x and y radius for the arc. All the arc functions I see in CoreGraphics only take a single radius and I'm hoping I'm not doomed to try and piece-wise approximate using bezier curves - although if someone knows a handy reference there please let me know!
|
# ? Apr 26, 2019 23:23 |
|
https://stackoverflow.com/questions/11365775/how-to-draw-an-elliptical-arc-with-coregraphics ?
|
# ? Apr 27, 2019 00:22 |
|
Plorkyeran posted:The server stuff is a big question mark (there is a plausible path to it sticking around, but...), but all of the conversations around what happens with the client database have been around things like what roles we should hire people for now that we can actually afford to do so again. Realm Sync might go extinct? Will there be a replacement? I've been a cloud customer for the last few months and built a lot of my app around it, would suck for me and my app if that was all wasted time/dreams. Realm just seemed so promising.
|
# ? Apr 29, 2019 23:29 |
|
Oh, I specifically meant the current server codebase and not the whole "mobile platform" thing. Upselling people on server things is the whole point business-wise, since it's the only thing anyone will actually pay for. Because of that, there will presumably always be an option to pay money for data sync, but it might involve a different backend in the future. I have no idea what practical implications that will have for you, if any.
|
# ? Apr 30, 2019 06:05 |
|
Doctor w-rw-rw- posted:https://stackoverflow.com/questions/11365775/how-to-draw-an-elliptical-arc-with-coregraphics ?
|
# ? Apr 30, 2019 15:51 |
|
Finally heading off to a new job after being at my current place for about 4 1/2 years. Excited as I'm getting a bit more back into actual iOS development as I've been doing higher level management for a while now Speaking of which - anyone use Apollo yet? I'll be navigating some GraphQL decisions that have already been made so curious to hear other people's experiences with it (if any).
|
# ? May 9, 2019 16:25 |
|
Doh004 posted:Finally heading off to a new job after being at my current place for about 4 1/2 years. Excited as I'm getting a bit more back into actual iOS development as I've been doing higher level management for a while now This is minimally helpful, but I have a number of coworkers who've used Apollo on (JS) projects and had nothing but good things to say about it. I don't know any more than that, but it sounded promising!
|
# ? May 10, 2019 17:17 |
|
Are there any good resources on functional design patterns for Swift? As I understand it, functional programming has obsoleted a lot of the design patterns as they were presented in the Gang of Four book, but when I look for Swift design patterns online, they tend to be OOP implementations of the GOF patterns that don't take advantage of Swift's functional capabilities.
|
# ? May 12, 2019 17:04 |
|
SaTaMaS posted:Are there any good resources on functional design patterns for Swift? As I understand it, functional programming has obsoleted a lot of the design patterns as they were presented in the Gang of Four book, but when I look for Swift design patterns online, they tend to be OOP implementations of the GOF patterns that don't take advantage of Swift's functional capabilities. obj-c.io has an app architecture book that covers TEA(The Elm Architecture) that allows functional programing. TEA is only one out of 5 architectures covered.
|
# ? May 16, 2019 14:33 |
|
BusError posted:This is minimally helpful, but I have a number of coworkers who've used Apollo on (JS) projects and had nothing but good things to say about it. I don't know any more than that, but it sounded promising! So far not so bad. No complaints but I haven't had to change much with our implementation client-side yet. Now server side? That's a different story but that ain't GraphQL's fault...
|
# ? May 26, 2019 15:25 |
|
If I were looking for something like an iOS for Fuckin Dummies class or book, where would I go? I'm doing more iOS design lately and I'm in a place where I don't really know what's possible. I did design/html/css for years, and so when I design something for the web I know whether it's buildable, but in iOS I just don't know the rules. I'm looking for something that'll let me build prototypes without any data or real functionality - I'm basically looking to make the app equivalent of an Invision prototype. Something like what Codepath does but my work isn't going to send me to SF for two months.
|
# ? May 30, 2019 14:46 |
|
I don’t know of a great tutorial or class, but the app equivalent of an InVision prototype is storyboards in Xcode. With segues, collection and table view controllers, Auto Layout, etc. you should be able to get pretty far without writing a line of code. You can run it on your device or in the simulator for free and with little effort. Sending it to others is more of a pain: you’ll need an Apple Developer membership and you’d want to look into sending out builds via e.g. TestFlight. You can also get a lot done in an actual shipping app if you’re somewhat comfortable with storyboards (and if your developers put in a little bit of effort to enable you), so it might come in useful after the prototype phase too.
|
# ? May 30, 2019 15:45 |
|
Also read the HIG a few times if you haven’t already. It’s a great inventory of what’s available out of the box, and tells you when it’s generally (un)acceptable to use a particular control.
|
# ? May 30, 2019 15:46 |
|
The HIG. Always the HIG. The best UX/Designers I've worked with know it like the back of their hand.
|
# ? May 30, 2019 19:00 |
|
Doh004 posted:The HIG. Always the HIG. pokeyman posted:I don't know of a great tutorial or class, but the app equivalent of an InVision prototype is storyboards in Xcode.
|
# ? May 30, 2019 20:57 |
|
Anyone meeting up at WWDC? I’m hitting Vegas on my way in to see family but am free starting Monday.
|
# ? May 30, 2019 20:57 |
|
jackpot posted:Actually I don't mind Invision for things it's appropriate for, but what I want to learn to do is poke around and see what's possible, for real. A lot of the things I'm designing are only a few pages, and it would be cool - not necessary, but cool - to be able to mock it up in a working app to show folks. This button opens the share sheet? So do that. The items in this list all open a drawer, or that link opens another site in the app using a webview? Figure out how to do that. All of this can be faked in various prototyping tools, I know, but it wouldn't hurt to know more about how all this is done when it's done for real. Makes total sense. I’m saying you can get pretty far jumping into Xcode yourself and seeing what you can do. Here’s some random video I found that looked alright when I hastily scrubbed through it, to give you some idea: https://www.essentialdeveloper.com/articles/s01e01-swift-app-idea-and-prototyping-with-storyboards Things like opening the share sheet or a web view might need a couple of lines of code, totally doable.
|
# ? May 30, 2019 21:34 |
|
|
# ? Jun 5, 2024 05:30 |
|
Dirk Pitt posted:Anyone meeting up at WWDC? I’m hitting Vegas on my way in to see family but am free starting Monday. I’m up for it
|
# ? May 30, 2019 23:00 |