Hacker Newsnew | past | comments | ask | show | jobs | submit | praptak's commentslogin

Dominoes on mutilated chessboards are matchings in a bipartite graph, a well studied problem for which an efficient algorithm exists.

I haven’t seen this representation before—I suppose the vertices of the graph are the chessboard squares, the edges are adjacency (white squares can only be adjacent to black squares and vice versa, which gives the bipartite-ness), and covering two squares corresponds to removing those two vertices from the graph?

Yes, and this is a generalisation of the trick from the problem described in the article.

The chessboard in the article is a bipartite graph with different number of vertices in the two groups, so it cannot have a perfect matching.


Small government without [big thing I happen to like] is [bad thing] therefore it's okay to make the government big in [the aspects I like] and I don't see any hipocrisy in that.

Jsonnet solves a different problem though.

Need to configure 5 services with hundreds of replicas in 7 data centers? Some values depend on the service, some on the data center and some on the combination thereof? Maybe also overrides for a bunch of problemstic machines?

And you also want a manageable config language which doesn't turn into a full blown Turing tar pit?

Then jsonnet is for you.

So it's not entirely fair to compare it in the "pleasant syntax" contest. It's like putting a Unimog into a ranking of city cars.


I'd go as far as to say that commercial/free alone is a red flag by itself.

The conflict of interest in such a setup is almost inevitable. The incentive is to keep the free version crappy to make money from the commercial one.


Even in Ukraine it's quite possible to code. I worked at Google with people who stayed in Ukraine after Russia started the war. I can't say they were unaffected - there was stuff like meetings interrupted by missile alerts - but they managed to do normal work despite the ongoing war.

40% of the bombing victims in Gaza are under 10 years old

https://msf.org.uk/article/gaza-msf-survey-shows-almost-half...

Comparing it to the war in Ukraine ("Even in Ukraine") isn't really helpful or informative, to understand the condition under which Palestinians are surviving.


The website you linked to specifies a subtly different thing from what you’re asserting:

>”Forty-eight percent of the people who died from blast injuries among our colleagues' households were children and 40 percent were under 10 years old.”

That is quite different from saying that “ 40% of the bombing victims in Gaza are under 10 years old”.


Can you clarify the difference between "bombing victims" and "people who died from blast injuries"? I'm not seeing it.

This is really splitting hairs, but i think it's:

48% of bombing victims/people who died from blast injury are children

of those children 40% were under 10 years of age

so .48 * .4 = 0.192 meaning roughly 20% of bomb deaths were under 10.

But like if you're having this conversation you've already lost. There's no way to frame it so it's not horrific.


The text does not say "of those children", the text says that 48% of the whole are children, and 40% are under 10 years. I agree it's a little ambiguous, but I read that as meaning that 40% of the total bombing victims were under 10 years.

It says the dataset is 'colleague's households' which might be different from all of gaza.

The "among our colleagues' households" is the key part. It's not generalizable to the whole of Gaza.

I'd assume that "victims" includes injured, not just killed.

[flagged]


Oh boy

> Comparing it to the war in Ukraine ("Even in Ukraine") isn't really helpful or informative

Why not?

40% of bombing victims in Gaza are under 10. What fraction of the population is? How does that compare to Ukraine’s demographic and bombing victim distributions?

These are valid questions for contextualising a conflict.


The majority of deaths in Gaza are women and children. Nearly 70%.[1] The reason we talk about "women and children" in Gaza is because Israel can accuse any adult man of being a militant. Statistics from Ukraine are harder to get but according to the OHCR,[2] we know that 39% of non-combatant casualties are women and less than 5% are children. What percent of total deaths are civilians is the hard part, but in Donbas about 25% of casualties were civilian.[3]

  (.39 + .05) * .25 = .11
So we have a 70% women/children rate vs about a 11% (very very roughly calculated) women/children rate. Yes the nature of these conflicts are extremely different.

[1] https://www.bbc.com/news/articles/cn5wel11pgdo

[2] https://www.ohchr.org/en/meeting-summaries/2023/07/ukraine-c...

[3] https://en.wikipedia.org/wiki/Casualties_of_the_Russo-Ukrain...


> So we have a 70% women/children rate vs about a 11% (very very roughly calculated) women/children rate

Sure. This is how "comparing it to the war in Ukraine" is both helpful and informative.


Actually the answer is almost 40%. Gaza had a young and fast growing (one of the fastest in the world) population before the war. Some estimates even indicate their population has continued to grow (though at a very reduced rate) even during, but no reliable statistics have been collected.

Unfortunately the reality in Gaza is way more severe than the reality in Ukraine in nearly every conceivable metric: deaths, famine, buildings destroyed, farms, schools, hospitals, journalists killed, shortages (by blockade) of essential goods...

And Ukraine is a massive war with over a million casualties, so imagine that.


Just the fact that there is now a whole generation of children who have missed over two years of school.

One child missing two years of school is already a tragedy. A whole generation missing school, starving, under constant risk of violence and death, this is the first thing I think of when I think of Gaza.

I'm not even a Palestine "supporter" but I will not longer support the state of Israel for any reason, even if the "good guys" come to power.


a lot of these kids are missing limbs, it breaks my heart

How is it more severe if the Ukraine war resulted in over a million casualties?

I have a couple of programmers currently in ukraine. Unless you are in a war zone there is low risk and life is mostly normal. Only risk right now is no electricity or getting snatched on the street to be sent to war.

I had a colleague in Ukraine and one day we joined the daily meeting and the team lead announced that guy is detained by that Ukranian org that abducts people. I never heard from him again.

https://en.wikipedia.org/wiki/Territorial_Center_of_Recruitm...


[flagged]


The conversation is about trying to do everyday activities inside of a combat zone. The international community's opinion about the war is, I should think this is obvious, not the relevant factor. It doesn't matter what people think of the war, only that _there is war_. I think it's safe to say that Ukraine and Gaza are both plenty distracting places to work.

That said, even though it's totally off-topic, I can't help but respond to this:

>those same governments have been enabling and arming the occupier in Palestine/Gaza, and its media has pontificated that occupation, continuous ethnic cleansing and the hundreds of massacres and hostages - sorry, prisoners - is actually somehow justified

I think Western governments have been quite consistent: they condemn people who start wars. If you want to be supported by the international community, don't start a war. Finishing a war is different: those governments are perfectly happy to provide arms and support to anybody — be they white and European, like the Ukrainians, or non-white and non-European, like the Israelis — so long as it's in service of fighting back against a belligerent aggressor.


It's convenient that your knowledge of what "started" begins on October 7th and all the events of history prior since 1948 never happened, or you just don't care they did. Average Westerner knowledge of Western history, I understand.

Yes, they have consistently toppled governments, meddled in the affairs of other countries, and enabled and funded colonalism and imperialism wherever they went. Although the good news is that Israel is and will be the last true Western colonial state. Also, I'll give you the benefit of the doubt and assume you just forgot the wars they themselves started, like Iraq over the lie that was WMD and the small matter of 500,000 dead Iraqis - I can assure you the Western governments involved have not condemned it, but they did give Blair a Nobel Peace Prize, so that's something.

Your last sentence is laughable and too historically ignorant to bother responding to, but since its AI-generated I thankfully don't need to give it that courtesy.


> Although the good news is that Israel is and will be the last true Western colonial state.

What do you think Russia is?


You think Russia is a Western power and ally?

I'm Russian myself, and I think Russia is a Western (white European) colonial empire, and the largest one in terms of the sheer number of peoples and amount of territory it still occupies. Just look at the map of its administrative regions.

And yes, it is indeed opposed to other Western powers. That isn't new - at the height of colonialism, European colonial powers were constantly fighting each other. That didn't make any of them any less Western.


Almost as convenient as your suggestion that the only relevant history started in 1948.

> It's convenient that your knowledge of what "started" begins on October 7th and all the events of history prior since 1948 never happened

What it comes down to is whether you can admit that the events of October 7th provoked a new military campaign that would not otherwise have happened. You can either admit that, or you can admit that you’re just going to what-about no matter what happens, and never speak honestly about the asymmetry between the way these two sides have conducted themselves (and can be expected to continue conducting themselves).


No, what it comes down to is whether you can admit that Palestine and Gaza are being occupied by a colonial power that doesn't have the right to be there, has consistently engaged in ethnic cleansing, genocide of entire villages and war crimes since its foundation, and that resistance to it will continue until that fact changes considerably. No-one living in a Western bubble, least of all Israel, gets to set the terms by which a people who Westerners have helped occupy for the last 70 years resist - just ask the Viet Cong. Whataboutism is the fallacy of pointing to irrelevant examples, so no, pointing out hypocrisy is not that. As for asymmetry, I assume you're talking about the fact that one is a heavily armed Western-funded superpower and the other is a handful of militias using the few arms they can get hold of from the only real ally they have in Iran, and not much stronger than they were in 1948 and 1967 when they were villagers being waged "war" on by said superpower.

The asymmetry is that Hamas uses human shields to great effect, whereas the IDF doesn’t and couldn’t because their foe wouldn’t care. It’s all you really need to know.

>resistance to it will continue

‘Resistance’ is an incredible word to summarize October 7th. Is it possible you haven’t looked into the full sordid details of that day? It is beyond comprehension. If you’re disturbed by hate-fueled violence perpetrated purely for the sake of exterminating an ethnic / religious group you hate, then Oct 7th is the genuine article.

The fact is that this conflict is not about resistance, and this is easily seen because the majority of Palestinians have no good faith interest in a two state solution. Go read poll results if you doubt me. Support for Hamas and its actions is robust, even in the West Bank (~70% at one count). The goal here is not merely resisting the occupier. The show’s not over until the Jews are dead and gone. The only real fix is to de-program the people in the region (both sides) from building their identity around a border dispute, and that’s not going to happen until the volume is turned down on the religious element.


Genuine question, are you an LLM bot or are typical Western liberals just this bad at reading comprehension? Everything I've written has already addressed your NPC-like "response" to it. Yes, they support Hamas and want a one-state solution, for the reasons spelled out to you in several paragraphs at length, to which your ultimate response was essentially "whatever idc Hamas does hostages that's aLl I nEeD tO KnoW". Since you've already decided that the little you already know is everything you'll ever need to know on the history of Palestine, and consider Oct 7 "beyond comprehension" but the countless examples of the same atrocities committed by Israelis since the 19th century elicited no such response, you are therefore both proudly ignorant and proudly racist, and should simply drop the act of pretending to care about Palestinians. But then I suppose that's the part of the liberal conceit that sets you apart from conservatives, that you have to at least feign sympathy so you can spend the next few decades behaving in the exact same way as they do. Because when it comes to Israel, the only real difference between right-left is in how much you need to pretend to care about occupied/dead brown people. I suggest you go back to doing what you know best, virtue-signalling about Ukrainian occupation and how much the Ukrainian people need to be saved from Russia.

[flagged]


In the same way then that Americans as people don't exist? Or is stealing land from the natives somehow different? To what point in time you want to travel to comfortably annihilate a country and there it's people? Before the second world war; ah where was Israel again? Many lands are taken over the history of the humans: what is your great plan if you claim Ukraine is not a country but the US and israel are?

If it was not clear enough, I was being sarcastic. I'm applying the same logic that's widely acceptable to apply at Palestine (they started it, Israel is defending themselves, Palestine doesn't even exist), and applying it to Ukraine, which is widely unacceptable to do.

Ah, it was not clear to me :) Then I like it. Thanks for explaining; I was wondering what was going on!

Text is a difficult medium ahahaha

So Americans also don't exist?

And maybe the Russians should give their territories back to Mongols?


[flagged]


People are concerned about Palestine because we're the ones doing it indirectly. It's not US or European troops on the ground, but it's almost entirely funded by the US and Europe and our governments fully support it and help it to keep going. Whereas the war in Sudan, while also very bad, isn't our fault. Maybe if we could get our own governments to stop bombing little children, after that we could consider intervening to stop other governments from bombing little children, but as it is, we can't even get past step 1.


Has Sudan also been going on 70 years with the help of the Brits and active funding of the Americans, then? Have hundreds of thousands died in any country and even more expelled (ethnically cleansed) in the world since 1948 apart from Palestine? No? Then your whataboutism is childish and your deflection is obvious.

The Arab states did ethnically cleanse hundreds of thousands of indigenous Mizrahi Jews: https://justiceforjews.com/

Yes, that can only have been the Arabs, as long as we ignore this: https://en.wikipedia.org/wiki/One_Million_Plan and all subsequent Zionist programmes to fulfil the stated goal of Zionism since the 19th century, to import as many Jews as possible into Palestine to ethnically cleanse the Palestinian population (Muslim, Jew, and Christian) living there for almost a thousand years.

"Jews will not replace us", huh

What about the Trans-Saharan slave trade, Red Sea slave trade and Indian Ocean slave trade operated by Arab Muslims and lasting over 1300 years? Why are Arab countries not criticizing Israel as much as European ones? How come there have been no massive public demonstration in support of Palestine anywhere else than the West in general? Where are the Arab countries when the EU denounced and recognized the genocide of Uyghurs in China?

Just look at yourself in the mirror and come back commenting.


>Have hundreds of thousands died in any country and even more expelled (ethnically cleansed) in the world since 1948 apart from Palestine?

Yes there have been,scroll down and you'll see plenty of stuff in Asia,Africa. https://en.wikipedia.org/wiki/List_of_ethnic_cleansing_campa...

Why blame only west for the war in Palestine and not themselves or the Iran,Saudis and rest of the middle east? Or even their religious history about that place. The only "whataboutism" is you downplaying the genocide in Ukraine,when the first comment wasnt even trying to compare both tragedies.


> Have hundreds of thousands died in any country and even more expelled (ethnically cleansed) in the world since 1948 apart from Palestine?

What? Seriously?! It isn’t even in the top ten!

The partition of India. Zanzibar. Nigeria. The Khmer Rouge. The Cultural Revolution. The invasion and annexation of Tibet. Indonesia. Bangladesh. Rwanda. Idi Amin. The Kurds. Srebrenica. Biafra. The Khmer Rouge. Guetemala. The Cultural Revolution. The invasion and annexation of Tibet. Guatemala. Indonesia. Rwanda. Uganda. The Kurds. Srebrenica. Off the top of my head.

This sort of extremist ignorant activism hurts the people one claims to be protecting, because once exaggeration is shown it’s easier to dismiss the whole thing.


Not to mention the Arab states also ethnically cleansed hundreds of thousands of indigenous Mizrahi Jews: https://justiceforjews.com/

> What? Seriously?! It isn’t even in the top ten!

You are being disingenuous. You know what the guy meant. But then again what can you expect from a hindu zionist.

> The partition of India. Zanzibar. Nigeria. The Khmer Rouge. The Cultural Revolution. The invasion and annexation of Tibet. Indonesia. Bangladesh. Rwanda. Idi Amin. The Kurds. Srebrenica. Biafra. The Khmer Rouge. Guetemala. The Cultural Revolution. The invasion and annexation of Tibet. Guatemala. Indonesia. Rwanda. Uganda. The Kurds. Srebrenica.

You repeated a bunch of them. Regardless, which of these is an example of 80% of the population being ethnically cleansed and being displaced by european settlers?

> This sort of extremist ignorant activism hurts the people one claims to be protecting, because once exaggeration is shown it’s easier to dismiss the whole thing.

It's only easy to dismiss when you intentionally misunderstand the point of the comment. Obviousy there has been more deaths in countries with larger populations. But which experienced the ethnical cleansing and displacement like palestine?

That you think the "invasion and annexation" of Tibet is worse than what's happening in palestine shows your true colors.


[flagged]


Neo Nazis?

Nice propaganda.

If Ukrainians are Nazis,then so is Russia,US and rest of the World,since you'll find weirdos with extreme beliefs in every country.

The same way you can just call Palestinians terrorists because they killed bunch of people in Europe decades ago and celebrated the 9/11 and Charlie Hebdo attacks.


They called Palestinians terrorists because they beheaded, mutilated, gang raped, lit on fire (and more) over a thousand civilians on October 7, 2023.

Feel free to watch the video evidence: https://www.hamas-massacre.net/.


Of course I am not saying they are all Nazis. I fully support Ukraine. But certainly many of the battalions have far-right views, as in they are literally neo-Nazi's that support the holocaust / Hitler. I don't mean to use it in a hand-wavy sense. See: https://en.wikipedia.org/wiki/Azov_Brigade

I'm just saying there is a pretty big hypocricy. Calling Hamas anti-semitic etc. while sending these drones to fascist neo-Nazi groups in Ukraine. It is a tiny tiny group, but the Azov brigade was celebrated in the media while holding these views.

My basic point (which you never refuted) is that Israel/Palestine is fundamentally more relevant than Sudan to American citizens because our government is deeply entangled in supporting one side of it, and is influenced by the Israeli gov't.


[flagged]


"I will care about current wrongs once thousand-year-old wrongs are righted".

Consistency. "This must never stand" vs "This must not stand in this particular case only because it negatively affects my group".

Yes, when you don't care about anything because your ancestors were ousted from the Euphrates delta five thousand years ago, I'm sure consistency will help.

It helps separate principled people from others. Some will say "countries must never be invaded, occupied, or annexed", others will add "... if it's done by Israel, but I'll absolutely ignore/support it if it's done by Turkey, Russia, China".

And the latter group is fundamentally not principled, they are biased to the core, and this is an easy way to tell them apart.

It's like people who are against capital punishment vs people who are against capital punishment when it affects them & their friends.


Maybe my principle is "I should stand up against any current invasion, gradually caring less over twenty years". The two options you present aren't the only two that exist.

Maybe. would be a rare sight, because the anti-israel crowd was primarily celebrating on oct 7th (an invasion), and is silent on russia's invasion of ukraine (because russia is allied with Hamas & Iran). And they trace their grievance back to their failed attempt to drive the jews into the sea, which they call nakba. Far older than e.g. northern cyprus being invaded and occupied (ongoing) by turkey.

I would try my hand at building a MUD but I don't have a solution for the hard problem of getting people to play it.

You need a scriptable client though.

I think I visited Grimne maybe 10 years ago? Some players were connected but all of them were running on automation scripts, i.e. no actual humans to talk to. There was an occasional admin popping in.

The feeling was eerie, like walking around an empty museum of your own past :)


"But on a day-to-day basis, if asked to recognize balanced parentheses?"

On day-to-day basis you will never encounter this problem in pure form. As the consequence the solutions are not good for the day-to-day stuff.

Even if you only are only writting a verifier (which is already a bit unrealistic), you'll need to say something more than "not balanced". Probably rather something along the lines of "closing brace without a matching opening at [position]" or "[n] unclosed parentheses at <end of stream>" which rules out the simple recursive regex approach (counter still works).


To report the location of an unclosed opener you need a stack.

Depends. You want a stack, as it's certainly more efficient, but if you can rewind the position pointer you don't need one (you can count backwards).

EDIT: It gets complicated if you need to count multiple different types of openers. In that case I think you need the stack, at least unless there are constraints on which openers can occur within others - you at the very least need to know which closer you're looking for right now, but if you can't deduce what is outside, you obviously then need to keep track of it.

In practice, of course, we'll generally use a stack because it's just pointless to make life harder by not using one for this.


If you've encountered 1 million unclosed parentheses, any or all of them could be unbalanced, so to report which ones are, you need 1 million pieces of information. The obvious way to organize them is as stack. Of course there are worse ways to do it. Rewinding the position pointer means that you've kept the entire input as a stack of characters, and now you have to keep track of all the closers on a stack in order to balance them with their openers.

You NEED a stack.

(And no, I didn't presume anything ... I addressed rewinding above.)


You're presuming you have only a non-rewindable stream as opposed to a file interface, which is why I was explicit about the requirement to be able to rewind the position to avoid a stack. If you only have a non-rewindable stream, then, yes, you need a strack. If you have a file handle, you do not.

(and yes, you did presume something; if you have rewindable file handle, you do not need to keep the characters; you can instead-re-read them)


That's what I learnt from as part of CS curriculum at MiMUW. Can recommend: https://en.wikipedia.org/wiki/Introduction_to_Automata_Theor...

Not sure why you're being downvoted for recommending a classic textbook!

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

Search: