Very interesting. I made a similar project called tsonic [1] which compiles TS to C# and then uses NativeAOT to compile it down to native code.
We'd have faced similar issues, and I'm curious how you solved it. From your examples:
function add(a: number, b: number): number {
return a + b;
}
The challenge I faced here with JS/TS was that they have a single "number" type which can be carry ints, longs, floats etc. In most application code, you don't want a and b to be floats - you want them to be integers; such as in a loop counter. There are a whole bunch of types in native code that have no equivalent in TS.
It took me several months to get to a usable state, working on issues one by one.
What explains the silence from activists outside Iran on this particular issue? I see relatively limited coverage on global media. Iranians seem to be fighting this alone, and dying by the thousands.
Perhaps we know, but the reasons will be unpopular.
There's limited coverage of all global conflicts, certainly in American media, but quite likely in other Western media.
> What explains the silence from activists outside Iran on this particular issue?
What explains the silence from the media on all other conflicts. It's certainly not because lives are not being destroyed in Sudan [1] and Myanmar [2].
Lack of shock images, and lack of personnel for humanitarian orgs. Protests and killings are happening outside of the locations MSF is implanted, and even if we have stories from doctors prevented from helping shot protesters, we don't have videos (and in the last few years and especially the last two weeks, doctors finally understood no one cared if they were prevented to help, since it was acceptable in France and even in the US).
The only NGO looking for Iran exclusively is Iran Human Right (https://iranhr.net/en/) and depend on the UNHRC, which is not particularly media trained and not good at reacting (also, they lost US funding less than a year ago and are reorganizing as we speak).
In the end, it will be like Yemen or Sudan all over again: media hear of the massacre late, send journalists, journalists get refused, they send journalists to neighboring countries and infiltrate with local guide help, some journalist dies, and three month after the beginning of the trouble we will get images and information.
Probably the activists are hesitant because the US is rearing to start a war with Iran (that will certainly kill way more civilians) and they don’t want to contribute to that decision.
US activists against IDF wanted US to stop arming and funding and enabling genocide directly. Many IDF soldiers are also from the US or go back and forth.
US isn’t arming or funding or enabling Iran directly, so calls for US action would mean call to war, which US leadership has already been signaling.
Maybe you think US should go to war. Regardless that’s the biggest difference.
There are also frankly many who are confused about Iran - sympathizing with Iran leadership as enemies of IDF and not understanding who they are and what they do. Lack of video going around doesn’t help.
In America at least, we saw protests against some of the things Israel did in Gaza because the US government is supporting Israel. Since the US is not a supporter of Iran, and in fact has been strong adversary for decades, there is less reason to protest here. Plus, we’ve got some serious problems of our own that are keeping us occupied at the moment
It's true that the recipient of the protest might be different, but that's no reason to be quiet.
China in Tibet, China's treatment of the Uyghurs, Russia's war against Ukraine, Kony 2012 etc, there are lots of causes where the local government in whichever country you look at isn't actively involved, yet there was a lot more public noise and campaigns.
I don't know what the answer is, but "my government doesn't deliver weapons to them" hasn't been a reason before, so I don't see why it would be now.
US government policy is completely aligned with the goal of stopping Iran from doing this, there is no reason to protest the US government on this issue.
It's not always a protest against government, sometimes it a campaign of lobbying, sometimes it's international attention.
The US government wasn't a friend of Kony in 2012. Before Trump 2, the US were not that friendly with Russia, yet people protested in many places around the world to show support for Ukraine and to voice their opposition to Russia's imperialistic wars, being aligned with their governments' position.
It's different with Iran. Some of that is likely to be Iran's lower profile, but not all -- it's not like media outlets are not reporting on it at all and you have to get your information from niche sources to hear about events in Iran.
China in Tibet manifestation were mostly thanks to the Dalai Lama. Without a spiritual chief in exile, no one would have cared.
The Uighur is easy: Nike and a lots of western brand used Chinese work camps. In my neighborhood that's what people protested, not really Chinese treatment of their minority, but the fact our brands used slave labor. Nike and all no promised they wouldn't use slave again, the Uighur are still discriminated and forcefully sterilized, no one care anymore in the West.
Russia war against Ukraine is very different, it's the first war in Europe since the 90s, and the first "real" war in europe since 45 (I guarantee you if Ukraine folded in 3 days, no one would have said much). Also, Europe is financing the Russian war economy, which is easy to protest.
Westerners treat Tibetans like pandas, which is why China has travel restrictions into Tibet proper for foreigners. Most westerners don’t know the Uighurs exist, and anyways they are Muslims. Accordingly, China doesn’t bother with travel restrictions into Xinjiang. The fact that they have any attention from westerners at all these days is kind of amazing.
But the protests weren’t limited to Ameica, there were protests all over the world, including in Muslim countries.
And the outrage wasn’t always directed at the government. We don’t see Iranian students in the US being attacked. We don’t see Iranian places of worship in the US being attacked. We don’t see as much outrage in the comments on HN - there were some event justifying it.
Iranian-Americans are almost universally people who fled Iran during or after the revolution, they are almost all hostile to the current ruling regime. Why would anyone attack them over what Iran is doing? Even Jewish Americans haven't been attacked over what Israel is doing in Gaza, despite them having large numbers of dual-citizens and majority support for Israel.
Pretty easy actually. The only leverage we have over Iran is military action, which I think historical precedent shows will lead to worse outcomes for everyone involved.
The way I see it, any support for Iranians will be co-opted to start a war with Iran, which will be a disaster.
This isn't the case for Israel / Gaza, which is what I assume you're alluding to when you talk about activism.
Quite possibly because they don't want to become the US and Israel's useful idiots - contributing to calls for war that could easily lead to the deaths of millions if past experience is anything to go by.
If the US were serious about the well-being of Iranian people they'd stop trying to screw the economy and foment violent unrest, but of course that is not what they are interested in. They want war. They want regime change. They want balkanisation.
Islam and Neoliberal wests are the strangest bedfellows. Thankfully people like Christopher Hitchens, Richard Dawkins and many others pointed the oddities long before many others made it us vs them political. Palestinian cause is used to drown any other legitimate concerns about ideology
Richard Dawkins is a weirdo crank these days who's co-authoring questionable books woth sex offenders about transgender issues. And the one thing Christopher Hitchens was most right about was Israel, he was an anti-zionist.
And the neoliberal west has more in common with Israel than Iran, I don't quite understand why you choose to write broad political comments if you don't have the basic background knowledge that would be needwd in this discussion.
It is not broad political comment. If you read the original text and sunnahs as well as follow the interpretations of a lot of scholars like Zakir Naik and others that are unapologetic the truth that is conveniently hidden in discussions easily comes out.
The entirety of the world does not run on Western neoliberal lens and every region has had its history and challenges and fights that due to cognitive limits during discussion are never given their legitimate space.
This can apply to grooming gangs in UK, the conditions of minorities in middle east (Yazidis or others)
An individual who might have an issue with a broad ideology that considers all non believers as subhuman to be converted, killed or brought into the said ideology by hook or crook can be motivated with their own experiences.
There's no activism because everybody agrees it's terrible. If your govt is already cutting out Iran and sanctioning them, there's no need to demand action.
This is very different from Israel, where our govts are actively supporting a genocide. That requires activism to change course.
Why would people demonstrate if everyone is aligned?
Protests were about US's inaction in Gaza as much as its support for Israel. Why no such protests now? Why aren't there thousands of people gathering demanding US doing something to help Iran's people?
The US was not inactive in Gaza. It was actively supporting, funding and and arming a genocide. Currently the Trump administration is actively engaged in a process to clean up the Gaza strip, rebuild it with the money of other countries, and finally hand it over to Israel for free (for who do you think those nice skyscrapers would be built, for the Palestinians? Lol).
Try and follow. The Palestinians weren't the ones who built their original infrastructure and it wasn't "hand[ed] ... over to Israel". Other than your antipathy towards Israel, what makes you think that whatever other countries pay to rebuild for the Palestinians will be handed over to Israel?
What's your point? Palestinians built the first Zionist settlements too. They were hired as workers before Labor-Zionism made ethnicity be a necessary condition for employment in the settlements, later in Israel.
Israel has already grabbed a huge amount of Gaza after the genocide and Trumps "peace". And in the west bank they have ramped up the annexation as well. Israel has been swallowing Palestine while driving away Palestinians for more than 75 years now.
An apartheid state is not going to give the second class ethnic group any concessions.
His point is to insert in the conversation some disparaging remarks to paint Palestinians as parasites, pretending the occupation, oppression and blockade don't exist. Beyond this there is no consequence at all between his remarks and the point at hand, which is that the "peace" is a ploy to take the heat off Israel, free it from any obligation to pay reparations for the destruction it caused, and eventually hand over to it the Gaza strip.
Do tell how the fraction of the billions that were given to Gazans that weren't used to build tunnels to attack Israel were "hand[ed] over to Israel for free".
Are you just shaking a Magic Eight Ball and replying with whatever non-responsive bullshit it comes up with? Open air prison, genocide, international law, occupation...
Because Persians are fighting islam (they're burning down mosques).
and the islamic regime was a sponsor of previous pro-palestine movements.
leftists don't find this an appealing mix. they'd rather blame Israel for everything, but here we see Iranians siding with the Israelis because they've seen what islam does to their country.
I very much doubt they are fighting Islam. Most of them are Muslims. They are fighting fundamentalist Islam. DO you have any evidence they are doing this or "siding with the Israelis"? The fundamentalist Islamist Saudi's seem to get on with Israel fine these days.
I think its simpler. There is no one white involved. What is unique about Israel is that most of its population is white so its an issue worth covering (for people backing either side). The same with Ukraine. On the other hand what happens in Eritrea or Sudan or Myanmar or Xinjiang does not matter.
I'm Persian. most Iranians are NOT muslim; that's what the islamic regime's propaganda has tried to convey for 47 years. if anything, many who were already muslim became atheists after seeing the atrocities of the regime in the past decades.
Iran's population is also overwhelmingly pro-West.
This is a straw man in my opinion. But regardless of that, your theory doesn't explain why conservative media isn't really covering this either - The Iran protests haven't exactly been front page material on Fox News or OAN or Breitbart
the conservative media is covering it. Prince Reza Pahlavi (the leader of the revolution) has appeared on Fox several times. Mark Levin, Rep. senators (Graham, etc.) constantly talk about how we should urgently help Iranians in their fight for freedom.
Reza Pahlavi has also had recent interviews with CBS [1], the Economist [2], and CNN [3] (all within the last 30 days). So how is the existence of Reza Pahlavi interviews on Fox evidence that conservative media is covering this issue more than liberal media?
On the topic of Politicians, Democratic congressmen like Dave Min and Jim Hines have also spoken in favor of US intervention in Iran.
First of all, knowing well that the US has been looking for excuses to attack Iran for the past, I don't know, twenty years at least, I am extremely suspicious of information about the numbers of these massacres. I know perfectly well that a media campaign filled with horrific reports is going to precede an attack by the US to either reduce the country in ruins or to a puppet state. I am also quite suspicious that these protests might be somehow encouraged by the US precisely for the same purpose. I mean, if Russian propaganda can influence foreign countries, I can't put a limit to what USA's power in the IT and social media space can do.
Besides this, of course when atrocities are perpetrated by an ally with whom you entertain friendly diplomatic, commercial and military relationships, it makes a lot of sense to protest: you have some leverage. When they are committed by an enemy country with which you have already severed any relationship, protests are pointless.
Because Iran claims foreign-backed terrorists were behind all the murder and destruction - backed by Israel, the US and UK.
Mossad has openly said they have people in Iran, and Israeli media has said they've sent weapons to the "protestors" in Iran. Senior figures in the US government have alluded to the same.
Many videos have been published by Iranians online, which certainly do not show "peaceful protestors" - they show gangs of masked men beating random civilians to death, fire-bombing buses and ambulance; they show leaders dishing out weapons and satellite comms devices, and trained men using assault rifles to attack civilians and the police.
We've also seem video of over a million Iranians marching in Tehran in support of the government, and in protest of the foreign-back terrorists.
And we have the MSM happily parroting any death figures they get, from anyone... even if they are literally from Pahlavi's mate or a CIA "human rights" group based in Langley!
We should all be more sceptical when our media and governments try to gain consent for war, and we should be asking who stands to gain - it's certainly not us, the people.
The Islamic theocracy in charge of Iran is deeply unpopular due to its repression and severe mismanagement of the Iranian economy. It has cut Iran off from the Internet.
"We should all be more sceptical"
This is very ironic coming from someone who actually believes anything the Iranian theocracy says. They are even less honest than Trump.
> The Islamic theocracy in charge of Iran is deeply unpopular due to its repression and severe mismanagement of the Iranian economy
Here's a way of saying that in a less propaganda'y way: "The Iranian government is unpopular because of the impact of US sanctions, which have made the lives of ordinary citizens mucher harder than they need to be."
> It has cut Iran off from the Internet
Because foreign-backed terrorists were using Starlink terminals to communicate, and the security services needed to find them, and stop them; at least, that's what Iran claims, and it at least makes sense.
Iran's economic problems include massive resource diversion to IRGC enterprises, funding for foreign militias (Hezbollah, Houthis, Iraqi PMFs), and systemic corruption that predates the harshest sanctions. The Rial was already collapsing under Ahmadinejad's mismanagement. They have refused to invest in modern water distribution infrastructure. Attributing it all to sanctions is the regime's own preferred narrative.
Iran has cut internet access during every major protest 2017, 2019 (where they killed 1,500+ protesters in a week), 2022 after Mahsa Amini. The pattern correlates perfectly with domestic unrest, not with any "terrorist" incidents. The Starlink justification appeared after they'd already established the shutdown. You're taking their post hoc rationalization at face value.
You accused me of propaganda, then in the same breath presented the Iranian government's exact talking points as reasonable alternatives. That's the irony I was pointing out. You're not being skeptical you're being selectively skeptical, which is worse than being credulous because it masquerades as critical thinking.
If you want to argue the US has done bad things in Iran (1953 coup, shooting down IR655, etc.), sure. But "the regime isn't that bad, actually" requires ignoring their own documented behavior.
The Iranian government is unpopular because of the impact of US sanctions, true, but those sanctions did not come out of nowhere. They are largely caused by the actions of the Iranian government. So that government does not get a pass because the pain comes from sanctions. It's still the consequences of their own actions.
The principle we ought to follow is the principle we expected Soviet dissidents to follow.
What principle did we expect Andrei Sakharov [a Soviet scientist punished for his criticism of the U.S.S.R.] to follow? Why did people decide that Sakharov was a moral person?
Sakharov did not treat every atrocity as identical-he had nothing to say about American atrocities. When he was asked about them, he said, "I don't know anything about them, I don't care about them, what I talk about are Soviet atrocities."
And that was right-because those were the ones that he was responsible for, and that he might have been able to influence. Again, it's a very simple ethical point: you are responsible for the predictable consequences of your actions, you're not responsible for the predictable consequences of somebody else's actions.
Conversely, how do we view the protests in the USSR against jim crow laws under stalin? They surely existed, but of what consequence were they? None whatsoever.
I want people to be REAL careful about "Israel obviously committed a genocide"
All those people brutally murdered on October 7 don't just disappear. Whatever you think about Israel's response it's kind of amazing the main focus is on the "big bad" of Israel
There were pro-Pally protests on October 8! If not October 7. Before the bodies were cool, so to speak
If you were pro-Palestine it is absolutely your moral duty to not just be silent. There is absolutely no ambiguity here. The Islamic Republic is slaughtering Iranians
Edit: And I don't give a damn if this is "construed as hostile", if you downvote me for this (Already one in the last minute) you do not deserve the 500 karma you have to be able to downvote me. I, in fact, suggest that you delete your account
Whether or not Israel was provoked has nothing to do with whether or not Israel is committing genocide. How many eyes need to be claimed to repay those that were lost? They have gone far beyond the 1:1 ratio everyone is familiar with from the ancient saying.
There’s no magic right to kill n people for n deaths. If 1 person killed a 1000 people, that doesn’t give you the right to kill 1000 people.
If an army of 100,000 attempts to kill as many people as they can but have only managed 1000 so far, you can kill as many as many of them as you need until they stop trying to kill you.
Nobody in the west actually cares about injustice. They just pretend to care when it's politically convenient.
Unfortunately, ABC and NBC haven't found a way to blame Trump for what's happening in Iran. Highlighting the atrocities perpetuated in the name of Islam is more likely to help Trump than hurt him, so this story must be minimized. It's just good, smart politics.
This article right here, and the countless that came before are telling people to be outraged. People aren't, partly because they don't know what to believe without really any reliable or unbiased reporting, partly because the Trump outrage machine has filled the news feeds with so much other stuff to be outraged about, and partly because the situation in the Middle East seems so futile and stupid that people don't want to care because nothing will change and no government with any say in the region will allow peace or democracy or self-determination to the people there.
The same thing is true with Sqlite vs Postgres. Most startups need Sqlite, not Postgres. Many queries run an order of magnitude faster. Not only is it better for your users, it's life changing to see the test suites (which would take minutes to run) complete in mere seconds
Feels like quibbling over the differences between two databases that are going to act the same for 90% of projects out there doesn't really matter.
If you want speed, just have your database stored in the same place as your application, locally, rather than hopping across the world to retrieve data that can be located next to the code.
That would probably be the easiest thing to do to get a real measured performance gains.
As other commentators pointed out, computers are extremely powerful. This isn't 1995, you can easily host everything in the same local area and get a very responsive application with very minimal needs to worry about resource constraints.
Given how primitive SQLite's optimizer is and how similar the storage and execution engines between the two are in terms of architecture, this seems unlikely to be the norm unless you did something wrong on the Postgres side. (Of course, no RDBMS optimizer will always give the best answer, so there's bound to be such cases.)
I am the one who disputed the claim and later deleted - I was conflicted between keeping HN largely free of political reddittery (and chose to downvote instead), and fact-checking.
> The current prime minister of India once announced that he has Ph.D. in "all of the political science".
This didn't happen, at least publicly and on record. The previous dispute was around his distance education Masters; which isn't hard to believe or hard to get. They don't attend regular classes.
I've been a ThinkPad user forever, and I wouldn't buy another one if they "upgraded" to metal like everyone else. If I were to guess, most serious ThinkPad users would want the current shell, the dated appearance, and the keyboard to not change much or at all.
Any particular reason for avoiding the metal cases? I was under the impression that a metal case - making the laptops more durable and resistant to potential damage - would be a desirable thing.
It’s common that the right plastic can be more durable and resistant to damage (up to a point) than metal - the right plastic doesn’t show small marks as clearly as metal, and for larger impacts (again, within reason) plastic flexes, absorbs energy, and returns to its original shape, while metal dents and bends.
Personally I think hard plastic (like on ThinkPads) is more resistant to damage than metal cases. Also, the textured surface is less slippery. And - ThinkPad repair (especially old models) is usually cheaper because businesses by so many of them.
Imagine you drop your laptop from a standing height onto a hard surface.
Metal will bend and deform. Dent.
Plastic will yield, then crack.
You can then replace the cracked component, because the plastic took the vast majority of the force so the metal frame on the inside that holds everything together is fine. Same way you have squishy muscle to absorb impacts that might break your bones. Same way cars have crumple zones.
I've been a Mac user primarily for 20 years. I've had or used extensively every generation of PowerBook and MacBook since the G4. I have two Thinkpads (T420, A485) and they both feel as solid as anything I've had from Apple, except when my MacBook Air slid off my couch onto its back corner, it misaligned the lid permanently, and my Thinkpads bounced.
My aluminum X13 has taken that sort of fall, all that happened was it got a small abrasion on the corner it landed on. I know of a T14 which took a similar fall and did not survive. I think with either plastic or metal, that sort of accident is a matter of luck, exactly how it hits the ground, and if it was open or closed.
There are key differences though. What tsonic offers: (0) broad data type support, stack allocated types etc (1) nodejs and js compatibility libs, (2) the availability (in tsonic) of the entire .Net BCL, Asp.Net and EF Core as d.ts files (for example, in @tsonic/dotnet) so that tsc would still run, (3) bindings generator (tsbindgen) for any .net dll etc.
What tsonic is missing: (1) interpreter, (2) compile to .Net IL. Tsonic will only do native code; and does so by converting ts to c# and then using the NativeAOT chain on generated C#. SharpTS is compiling straight to IL (I think), something I considered but decided not to for the time being.
I think these are two different approaches. With pros and cons for both.
Well, there are some additions - thought it can be compiled via tsc into js that would never run. This is still useful though for IDE and tooling support, language servers etc.
The most important thing is that you have these types you can import. For example the "int" below:
import { int } from "@tsonic/core/types.js";
function fibonacci(n: int): int {
if (n <= 1) {
return n;
}
return fibonacci(n - 1) + fibonacci(n - 2);
}
Instead of making it a keyword, I decided to export these from core/types.ts - so that the code can still be compiled with tsc, and all the tooling would still work. Similarly (among others), you'd use ptr<long>, if you wanted a pointer to a long.
Why should we care if it's not difficult to read? What is your complaint?
reply