Hacker News .hnnew | past | comments | ask | show | jobs | submit | run-types's commentslogin

Here is a very useful generic type alias:

    type Maybe<T> = Some<T> | Error
Not sure why you'd want to disallow that.


Right, but I plan on including really fundamental stuff like this at the language level (I don't know for sure that it will look exactly like this, but there will be a story for this situation built-in)


I've basically never been taken to a recipe without a rambling preamble from Google. While food blogs may serve two audiences, a long introduction seems to be a requirement to appear in the top Google search results.


Personally, I think that has a lot more to do with the fact that Google killed the Recipe Databases. There did used to be a few startups that tried to be Recipe Aggregators with advertising based business models, that would show recipes and then link to source blogs and/or cookbooks, and in the brief period where they existed Google scraped them entirely and showed entire recipes on search results and ate their ad revenue out from under them.


Such databases would get battered by demands to remove content these days, if not already back then. No one want a database listing their stuff for ad revenue like that because many wouldn't follow the links so see their adverts or be subject to their tracking.

A couple of browser add-ons specifically geared around trimming recipe pages down have been taken down due to similar complaints.


That is a really bad thing by Google. Their core business is not recipes.


Their core business is making money from other people’s content, no matter what it is.


Their core business is advertising and they have always been in a direct conflict-of-interest by competing with content sites for ad revenue buys.


WOW! That's insane. If made efficiently enough, you could emulate iOS on a non-iOS mobile device. That would be disruptive.


And also very easy to brake on apple's end.


Only for future releases. If it works currently for iOS 12, it'll keep working for those builds of iOS 12. I fail to see how Apple can break what already works for code they can't/won't change.


No - like, Apple sends a DMCA complaint or legal complaints to the project and the developers saying to shut it down or they'll bring in the lawyers.


DMCA what? I don’t see anything wrong with emulation.


That won't work in large parts of the world, like China.


Pirate Bay


They have the power to disable your OS remotely for any reason. I think it's safe to say that ship has sailed.


Could give the librem 5 or PinePhone a big boost. But it would not help with battery life.


I think the number of people who have a Librem phone but want to run iOS on it is basically zero.


Wrong. There are people who would like hardware kill switches but are required to run either iOS or Android apps for work. With iOS in a VM, you could truly "log out of work" and shutdown that part of your phone when not needed without carrying a second work-specific device.


With a $150 GrapheneOS Pixel for things that matter, you could shut the other phone off and truly "shut off work".


Yep. Just buy an anything-shitty Android phone in 7-11 and use that


And they would not want to do that on a Librem phone. Librem phone is for the tiny subset of people who want a computer with a free BIOS as well as a fully-free Linux distro like PureOS.


What food to do you feel is missing from the food emojis?


There's nothing to represent a dish that went into the oven, there's no leek, no aspergus, no cooked meat outside of a poultry leg, some cartoonish meat on bone and bacon, only one type of cheese that's again a cartoonish cheese wedge, no cereal except for rice and an ear of corn, no zucchini, no nuts except the peanut, no round bread (not round flatbread, more like sourdough), no pasta except for spaghetti, no fish outside of very specific dishes, no soup. That's without thinking too much about it.

It's a very "I live in the city and mostly eat outside, often at ethnic food places" centric vision of food.

Edit: there's nothing wrong with living in the city and mostly eating outside, often at ethnic food places. But it's erasing a lot of people.


Emoji don't erase people. Erasing people is a very strong word and should be reserved for serious use.


There's bok choy though!


Of course there is, because it's on the menu of that nice asian place that's within walking distance of the offices of everyone working on the Unicode Standard. For all that talk about inclusion for the pregnant man/pregnant person, the exclusion on things as basic as food is baffling. It's very nice that you can express "pregnant man" with an emoji. It's very weird that you can't express "furnace".


I love how your reasoning for the inclusion of Bok Choy is because there are Asian restaurants in SF, rather than the fact that it's one of the most popular vegetables in the most populous country on Earth.


That's because there is no appearence of other fundamentals of Chinese cuisine. There's no pork meat!



Technically if you "search" your emojis for "bok" and then "lettuce" the same emoji appears. My first guess was that bok choy meant "leafy green" but it means "White Vegetable". I actually had this discussion yesterday, otherwise i wouldn't have known bok choy was an emoji at all.


If leek and asparagus are your biggest omissions, then I think they've done a pretty good job at representing food. The point isn't to have photo-realistic illustrations of every possible food. Instead, they're trying to create a useful set of pictographic primitives that can be used for communication for everyone person on Earth. Even if they had photo-realistic emojis of every cut of meat, it wouldn't be that useful.


> If leek and asparagus are your biggest omissions, then I think they've done a pretty good job at representing food.

That's a strawman, I've cited lots of other things. My point isn't that I can show a leek, my point is that with these emojis, you can maybe cover what 10% of the population on Earth eats, and most of that will be people living in big cities in developped countries .

> The point isn't to have photo-realistic illustrations of every possible food. Instead, they're trying to create a useful set of pictographic primitives that can be used for communication for everyone person on Earth.

They failed at that. How would you express food cooked in an oven? You can't. There's not even an oven emoji. The food emojis are showing that there is a huge biais for the kind of people that would contribute to the emoji standard, which is again, people living in big cities in developed countries. It's like if someone says "English is universal, everyone I know can understand it". No it's not, it's just the bubble of that person.

> Even if they had photo-realistic emojis of every cut of meat, it wouldn't be that useful.

I'm not advocating for adding even more emojis, I'm advocating for removing the objects emojis entirely because they will never be able to express what a language can unless they become themselves a language. I could also argue that they could have chosen better primitives, especially now that they make many combination emojis, but the goal here isn't to recreate Little Alchemy. We already have a great tool to communicate "objects" in written forms, and that's language. We lacked a great tool to communicate emotions/facial cues through written text, and "emotion" emojis solved that problem.


There's no steak or beef emoji for one. I think a lot more people eat that than do Sushi (although I do love sushi).

Edit: there’s no steak on that page but my phone has it…

I stand corrected



Should probably include all types of cuts too... Maybe some type of modifier so we could have examples from all cuisines around the world from poultry to dog and so on.


Bigos, borsch and żurek to be sure. But seriously, the list is very limited. Very much agree with Zababa's point of view.


There's a sweet potato but no ordinary potato. That seems like an obvious and bizarre oversight.


It stems from the fact that Japan invented emojis (it is in fact a very Japanese sounding word) and they eat sweet potatoes much more often than the other kind you're mentioning. Just wanted to make the oversight a little less bizarre for you.



Weird. I must be mistaken; the last time I searched for a potato emoji, it only brought up sweet potato. Perhaps that app was using an older version of the standard; I don't remember for sure.


You are not kidding? That list has only fast food items on it. Where is the home cooked meals with veggies and meats in different sauces etc? Today I had meat sauce. Yesterday I made a fish soup.


If you want them changed, then you should make good use of your time and spend it lobbying the Unicode committee to get these in. Society will much appreciate you for spending time on worthy endeavors like this.


The article didn't say how profitable they are. If they're brining in $1B of revenue per year, and have a profit margin of 30%, then that's 300M in profit, yielding a P/E ratio of 133. If they're growing at over 100% YoY (which seems insane at this scale), then they're down to a very reasonable P/E ration of 33 after 2 years.


Why would social networks be classified as a common carrier? There are plenty of options out there, and the capital required to start one is pretty low compared to something like a internet service provider or a train network. Not to mention that common carriers are also able to enter into contracts of carriage with passengers / users.


> There are plenty of options out there, and the capital required to start one is pretty low compared to something like a internet service provider or a train network.

A social media network with no users costs about as much as a single train station that doesn't connect anywhere: $0. They're also about equally useful.

A social media network with enough users that people can talk to their friends on it is enormously expensive. It takes a lot of advertising and pushing to build up that base. Probably not as much as a train or ISP network, but certainly far beyond trivial quantities of cash. Google+ was estimated to cost $585m, it was from a company with a major internet presence, and it still failed horribly.

You're also not considering that network effects heavily encourage a monopoly. If your cell phone could only call people with the same provider, you don't really have any meaningful choice. You pick whichever provider the people you want to talk to are on. In cases where consumers don't have meaningful choice, it makes sense to add additional protections for consumers.


Are we ignoring that todays discourse happens online? People tweet, use facebook, instagram and all other major social platforms.

This gaslight is so typical of people who happens to agree with the platforms bias, for them there's absolutely nothing wrong happening, until some of them get the whack then suddenly they agree the platform shouldn't be able to do that.


My main discourse happens on Hacker News, because I enjoy the conversation here. I don't have a Facebook or Instagram and have plenty of ways to talk to people I care about. It's weird to me that you feel it is your right to have a Facebook account.


Because they have such an influence on discourse. I'm not saying that any old little forum should be covered by the concept. But when you have billions of users, you're necessarily a little more "public" than if you're a startup with 1000 users.

ISPs aren't currently common carriers as far as I know, although I'm leaning towards the idea that they should be. There is precedent for this. I'm of the understanding that Disneyland is considered a common carrier. Facebook is certainly "delivering" users' content to other users. They have a complex algorithm to route posts to different people's feeds.


Hypothetical: current social media dominants become restricted by governments from expelling people based on their views, no matter how radical. Consequently their platforms become full of hateful propaganda by the kinds of groups that love freedom of speech for all the wrong reasons. As a response, I start up a new social media site that promises to keep people like that out, which I can do because I'm small enough to avoid the regulation. Within a year my social media site attains billions of users sick of dealing with Big Corp's platforms and their hate mobs. Unfortunately, now I'm big enough to be subject to the same regulation.

Is this actually what we want?


A federated network of social media services all with under 50 million users to avoid regulation? Sounds good to me.


Something tells me the government isn't going to be fooled when Facebook suddenly breaks up into 50 separate instances.


As long as there's operational independence and no bias for particular nodes, what's the issue with Facebook breaking itself up and federating the Baby Books with something like Mastodon?


Because the purpose of this law is to suppress the right of online platforms to moderate certain forms of speech, and to compel them to publish that speech against their will.

If Facebook or any other platform breaks up in order to avoid that, the government will just rewrite the law in such a way that it still includes them.


It's harder to regulate a bunch of protocols and distributed entities. Regardless of purpose, regulation which only kicks in at 50m users seems a solid incentive to force networks to remain under that size, and that seems socially beneficial to me after the past decade. Scale benefits distributors but destroys diversity.

If Facebook splits into 50 Baby Books, Zuckerberg's overall wealth likely increases, yet power is distributed. Ma Book could try to control the protocol, or a reference implementation, but they would need to do so in the open, and offer up transferable user data, which would mostly solve the issue with asymmetric access to "their" user data. Each Baby Book would need to compete on design, features, moderation/labeling/verification/filtering, branding, ad tools, etc. and that would be just fine.


In the past, traditional media companies had huge effects on discourse, yet where never considered to be a common carrier. Facebook has really done very little to police its network, and we see that viral news is polarizing people and risking the stability of the nation.


> Because they have such an influence on discourse.

So do newspapers, but you can't generally demand that a newspaper publishes your letter to the editor about how the illuminati are pushing people over the edge of the world, which is flat.

> ISPs aren't currently common carriers as far as I know

Strictly speaking, in the US, no, not at the moment. They were from 2015 to 2017.


For those looking to sanitize input from Typescript, I highly recommend the runtypes library: https://github.com/pelotom/runtypes

It let's you specify type definitions a DSL in Typescript using syntax very similar to Typescript's type definitions. Once you define your types in the DSL, you get Typescript types and parsing / verification for free. Not as general purpose as JSON Schema, but 1000x cleaner and easier to use.


The point of JSON Schema is to have a common format independant of the programming language to ease interoperability.


I've never seen runtypes, but I've seen io-ts [1]. Are you aware of the pros/cons between them?

[1] https://gcanti.github.io/io-ts/


They look roughly the same


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

Search: