Iftah

Members
  • Content count

    742
  • Joined

  • Last visited

Community Reputation

413 Neutral

About Iftah

  • Rank
    Advanced Member
  1. Writing over "functions" (which are just variables like all other) may seem strange to C++, even more so when you overwrite it with a value of another type (string in your example), but it is very straight-forward and logical. Just free your mind from the low level pointers and bits of memory and look at the code from high level, see the beauty of it? I reallly like Python. It is the first language I used for-each loops, functional programming and lambdas, generators and more. Together with list comprehension, the interactive shell, pretty syntax for list slicing, and so many simple to use but powerful libs its really a terrific language. A big "WOW" moment I remember was when a co-worker friend implemented Levenstein distance in python. This is an algorithm that given two strings finds how many chars are different between them (difference being deletion, insertion or modification). Next my friend wanted to implement Levenstein word-distance, that is an algo that given two sentences finds how many words differ. To our surprise, it was trivial! something along: def word_levenstein(a, b): # split the sentences to list of words and then pass it to the regular levenstein algo! return levenstein(a.split(), b.split()) because strings were designed to have same interface as lists of chars, the code to find different chars found different words when given a list of words! To write a word-lev given a levenstein code in Java or C++ you would have to refactor the Levenstein code to use some confusing abstraction or re-write (copy-paste) the code. In python the abstraction was unintentional due to the great design of the language. WOW!
  2. Valderman, not all Muslims are evil and the Muslim religion isn't inherently bad. But you can't deny Muslim are involved in many conflicts, much more than their percentage of the population, search for armed conflicts and count. Of the top of my head there are Afganistan, Pakistan, Yemen, Somalia, Sudan, Ethiopia, Nigeria, and of course Israel. Granted, in this silly heuristic, Jews are involved in a greater percentage of conflicts than their population, but a statistics of many cases is more conclusive than of one case. Now if, for example, black people are much more involved in crime than white people, that doesn't mean the color is to blame. It doesn't mean you should prejudge a person by its color (although it is not without sense if no other data is available). Special zoom in is needed to deeply understand the root of the problem. I don't know the background of half the conflicts, so my guess is just a guess, but seems to me the (over simplified) root of the problem is that in many backward places, the Muslim religion is easily twisted to encourage great acts of evil, and add to it a desire by radical Islamists to impose their extreme religious rule over other nations. Take a look of the TED talk Inside a school for suicide bombers. As far as I know, Muslim is the only religion that promises 72 virgins in heaven for martyrdom, and Muslims are the only people who massively protest a caricature of their prophet.
  3. Quote:Original post by ValdermanYup. Hundreds of trucks for 1.5 million people. Trucks not carrying, for example, cement, which is sorely needed to rebuild the region after Israel's armed incursions in 2008. Cement prohibition actually makes sense. Houses can be built without cement (using wood for example), but bunkers and tunnels cannot be built without cement (in the sandy ground of Gaza). - The Palestinians greatest luck is that their conflict partner is Israel, the thorn of the Arab world. If it was any other nation vs nation we wouldn't have a thread about it and it wouldn't reach the news. I wonder what the great humanitarian Turkey would do if there was a relief convoy on way to Kurdish areas when it imposed its military controlled closed zone and killed 37,000 Kurds, displacing thousands of villages.
  4. Quote:Original post by Straudos Quote:Original post by Iftah The blockage was a worthy attempt to weaken the Hamas control, and to (make easier the) release of the captured soldier Gilad Shalit. The blockage failed those two goals, but the public opinion here in Israel is something along "the blockage should continue until Gilad is returned", in essence Isarelies don't feel guilty for the blockage because by clinging it to Hamas's prisoner, so in Israeli eyes it is Hamas who actually controls the continuation of Gaza blockage. So why not offer to lift the blockade on condition that Shalit is returned? I feel like if Israel, right now, made that offer, it would greatly improve its standing. After all, how can "peace" activists object to the returning of a POW to his family? I don't know if Hamas would actually do it. But even if they didn't, I think it would drive a wedge between those who support Gaza for purely humanitarian reasons, and those who support Gaza because they want to see Israel suffer. The negotiations between Israel to Hamas aren't public knowledge, but from what leaked, Israel offers to lift the blockade AND release hundreds of prisoners in exchange to Shalit, Hamas demands are higher.
  5. hi everyone, There is a Hebrew(?) saying "a clever guy knows how to get out of trouble that the smart guy would avoid in the first place". Obviously in respect to the "relief" convoy Israel has been neither clever nor smart. The clever way to get out of trouble would be to wait for national waters, avoid boarding the ship (eg. block its path) or board the ship with forces who can handle a violent mob without being lethal. The smart way to avoid the trouble would be to use some excuse (eg. the renewed talks with Abu Mazen) to lift the blockage before (preferably years before) this day. The blockage was a worthy attempt to weaken the Hamas control, and to (make easier the) release of the captured soldier Gilad Shalit. The blockage failed those two goals, but the public opinion here in Israel is something along "the blockage should continue until Gilad is returned", in essence Isarelies don't feel guilty for the blockage because by clinging it to Hamas's prisoner, so in Israeli eyes it is Hamas who actually controls the continuation of Gaza blockage. I put quotes around the word relief, because I think actual relief was a very small goal of the convoy - Israel more than once offered to transport the relief content by ground and as the convoy was late a few days without any circumstances in Gaza, it is not a relief as say humanitarian relief to disaster areas. The major purpose of the convoy is to put Israel in a bad spot in international eyes and it succeeded this much more than (Israel) anticipated. The debate whether there was a lynch or not, or if the soldiers were at risk or not is very obvious from my angle. Not only are there videos of a soldier being stabbed, and a soldier being bitten with clubs by multiple "peaceful civilians"; not only are there 5 injured soldiers with stab wounds and broken bones; but to me the most obvious proof that the soldiers (felt) at life risk is they began using their hand guns. Granted, this isn't a logical proof and if you have no faith in Israeli soldiers then this makes no sense at all. But I do have faith (I know some of them) and I do know IDF wanted to avoid using force. Not because it is such a force hating organization, but because IDF was very much aware of the cameras and public attention, so obviously lethal force was to be used as the last option to keep soldiers alive. Israeli soldiers are met with protesters who spit at them and throw stones at them on a almost daily basis, and they maintain control without lethal force; and the Commandos took over Iranian weapons boats without lethal force. Needless to say if Israel was such a law breaking nation who cares not for human lives as described in this thread, the ships could have been easily sinked. Now if you read previous "Israel war crimes" threads here, I am usually in favor to some degree of most Israeli actions. I think most actions are "forced" actions when all else failed, and I do not believe forever acting "proportionally" is the smart/good thing to do on the long run. I strongly believe any of you would feel the same if your houses were attacked. But in this particular case I don't think it was "forced" as the entire blockage could have been lifted years ago and anyway this takeover could have been done more cleverly. Still, lets not get carried away and call it a terrorist attack, or murder. It was an action on level of a badly made official arrest, and there is some great distance from this to the terrorist attacks who try to kill the most civilians possible.
  6. Googling around, I found a tool that I think is one the coolest thing I've seen in a long while: http://xmlvm.org/overview/ If I understood correctly (haven't read the fine print yet) you can write an application in Java or .Net, and then cross compile it, so that the output is a python/C#/C++/javascript, or an objective-C program. They even translate the Android API to iPhone API, so you can write an Android application and compile it into an iPhone application! I'm not sure how mature it is, but I leave it to someone with spare time to explore... Searching for xmlvm here in gamedev found zero results, and I thought it might interest you game developers out there so am posting this. Anyone tried it? Does it work? does it work smoothly? [Edited by - Iftah on March 10, 2010 9:00:50 AM]
  7. The "Veg Pledge"...

    Quote:Original post by geo2004 Also if you're on an entirely meat-free diet, how do you justify using the land/habitat of wild animals to supply your food? Do you feel bad for all of the deer, rabbits, raccoons, birds, etc that inhabited your soybean or corn field until it was harvested? Is that not making those animals suffer as well? As I said even when considering plants amounts, meat is inefficient so if you want to minimize fields land area and deforestations then being veg is the right way. Anyway one generation of deer and rabbits suffer once when their forest is destroyed for a field or a road, its a huge difference as opposed to generations of animals that suffer daily in a farm. And anyhow, doing one wrong does not "make it right" to do other wrongs. Its perfectly valid and consistent to have a non-perfect record and still avoid wrongness when possible. Cows in Israel mostly arrive by ship all the way from Australia (pretty much as far as possible), some of them die on the way and most just barely make it. The cows are also marked with hot iron and their horns are chopped off (both very painful and without any anesthetics). Before their slaughter they spend 24-48 hours in stress next to the slaughterhouse for health check, the entire handling in that place is done with clubs and violence and the Kosher slaughter means they get hanged upside down and the blood flow from their necks for several minutes before they loose conscious. For me just one violent clubbing alone is unacceptable handling of animals, especially when the result is just some slightly better tasting food. My opinion is that if an animal was grown in good care and get slaughtered without needless pain or stress most of the ethical problem is diminished. I personally would not be comfortable eating such a cow anyway, I pretty much "brainwashed" myself to see meat as a result of evil handling of animals. I don't trust farmers and slaughterhouse employees to handle meat destined animals with care and compassion, so this "brainwash" is actually a safe assumption. I am waiting for meat that will be grown artificially (a muscle tissue grown without any animal attached) before I'll happily eat a burger. Some vegetarians will not eat even that.
  8. The "Veg Pledge"...

    Quote:Original post by geo2004 Quote:Original post by Iftah Sadly I think most of us are natural born sadists in regards to farm animals. We don't have an intuitive feeling of wrongness there. But just as I expect a sadist to refrain from kicking dogs for fun I expect myself to refrain from doing a very similar thing. The difference that a sadist is taking pleasure from the suffering itself and that meat eating takes pleasure indirectly doesn't make much difference IMHO because frankly its not very indirect at all. So basically what you're saying is that any animal that eats another animal is a sadist because they inflict a small amount of suffering to the victim while in the process of killing it? Cats, Spiders, and lions (as examples) are all unethical/sadists because they eat mice, flies, and gazelle (respectively, as examples)? Are they wrong for killing another animal in order to survive? Personally I would say absolutely not, its part of the food chain/circle of life. You'd be surprised but most farm animals suffer very much for years and years, not just a small amount before death. Read back a few posts and see I said that unlike most vegetarians, for me its not so much the eating part its the suffering while the animal is alive that bugs me. I say "meat eating" in the posts above because for most people it is connected - if you eat meat you don't care for the animal pain while its alive. Egg laying chickens (at least here in Israel) suffer perhaps the most of the farm animals. From birth to death they suffer a wide range of tortures so I think egg eating from such source is immoral even though the egg was never alive and didn't cause the chicken to die. Obviously lions have no moral dilemma about eating a zebra. They need to eat in order to live but thats not why they "think its ethical". The truth is lions haven't evolved the sense of wrongness we did, nor do they have ability to think about ethics. Their simple understanding of wrong is at most stealing a female from another male. Looking at them and saying their ethical actions justify ours is silly. Not to mentions us humans do much worse to animals than a quick kill the lion does. Unlike lions, you do have a sense of wrongness for animal torture. You do have the ability to think about what is right and what is wrong. You can survive easily without eating meat.
  9. The "Veg Pledge"...

    I think we agree on most (all?) of the points, that's why I didn't want to spend time discussing it. I don't pretend to know how to define an objective "wrong" or that it is even possible. What I did/do try to say is that we all agree sadism is wrong (I mean sadist = someone causing suffering of others for his pleasure). We know this from deep down feelings. I say meat eating is just as wrong even though you may not feel that deep down feeling. You know high up its very much the same, but it takes some thinking and does not come naturally (for most people). A natural born sadist may not have that same feeling of wrongness as we do when he is hurting others, but we expect him to control himself, to refrain from harming. Sadly I think most of us are natural born sadists in regards to farm animals. We don't have an intuitive feeling of wrongness there. But just as I expect a sadist to refrain from kicking dogs for fun I expect myself to refrain from doing a very similar thing. The difference that a sadist is taking pleasure from the suffering itself and that meat eating takes pleasure indirectly doesn't make much difference IMHO because frankly its not very indirect at all.
  10. The "Veg Pledge"...

    Quote:Original post by nilkn Quote:Original post by Iftah Quote:Original post by superpig With regards to the argument that eating meat is wrong for ethical reasons: Why is killing wrong? Why is making things suffer wrong?I hope you are asking this from the philosophical perspective, because otherwise someone should warn your neighbors. I've never studied ethics. I guess its quite hard to measure and compare suffering and joy and I agree saying whats right and whats wrong is many times quite hard, subjective or maybe even impossible to decide. But as I understand the words "ethics" "wrong" "suffer", the dilemma here is quite simple. Saying "rape is unethical" is pretty much derived from the definition of the words. Asking why its unethical to rape for me is like asking why a triangle must have 3 corners. I'm sure a philosopher would scream and pull his hair on this weak answer, but I don't care much for the philosophy of it. If you don't think rape is unethical then there is no point discussing it farther because either you have brain malfunction or we can't agree on the words definition. And my point is rape is just a small difference from what animals suffer for your sandwich. The best way to understand why the questions were asked is to try to give a genuine answer, not the tautological non-answer you gave here. Either you will give a definitive answer or you won't. Nobody before you has succeeded. Every ethical philosophy invented by mankind has met some form of opposition by quite a number of people. So it's extremely likely you'll fail. And when you fail you'll wonder why you were so confident before, and then you'll realize why the questions were asked. I don't doubt these questions can produce dozens of books and articles and interesting discussions, but if you agree that sadism is wrong then why must we discuss exactly why its wrong? I tried to challenge you into thinking why is meat eating so different from sadism and I got answered by a non-answer question "why is sadism wrong". I think we all agree that it is wrong and so it can be considered an axiom for the proof that followed and examining it deeper is a waste of time and even irrelevant. However I will try to give you a genuine answer and it is written at the end of this post. I know comparing the meat industry to human rape is very offending in several levels (to rape victims, to meat eaters, even friends of meat eaters) and I am sorry if I offended any of you. While I would never be friends with a rapist, I have many meat eating friends. I was trying to convey my line of thought, and I was trying to "shock" you into thinking about it deeper, but eventually this sense of wrongness is personal, and I can't force it on you. Still I would like challenge you to answer why do you consider sadism wrong but consider meat industry not wrong? The difference that I find between the two and the reason I have meat eating friends is that a rapist knows and everyone around him knows it is evil, but most meat eaters are ignorant of their evil and so in a sense are still ethical. I am sure I am indirectly attached to many evil deeds (children made my shoes? underpaid farmer grown my coffee?). Now to my genuine answer. I suppose killing is wrong and making things suffer is wrong because of several elements, the major two are: 1) evolution pre-programmed us into feeling compassion, having a sense of wrongness, etc... those are very beneficial to society based animals that we are. 2) social pressure and education (from parents, school, peers) affect our sense of wrongness. If you studied some game-theory you know the population of "nice" players is unstable and a small percent of "evil" players is much more stable, which explains why after all our evolution there are still some "evil" children who beat up smaller children for fun. Combined with the 2nd element (bad parenting, evil friends, etc...) this brings us to the mix of good and bad people we have on Earth. So killing and making things suffer is wrong because... we are conditioned by evolution and education to define it as wrong. We have no such conditioning for meat eating. Does that make meat eating less wrong? not at all. You see, above what evolution pre-programmed us and above education and peer pressure comes our intelligence and free thought. Evolution pre-programmed us to sense what is up and what is down. Does that mean there is no objective meaning to the word "up"? Does that mean we are not allowed to imagine a universe with other "up" dimensions (where potential energy is reduced in two dimensions)? These imagined "up" will have no intuitive feeling to it for us because we are pre-programmed to understand only one up direction. In the same way evolution gave us intuitive feeling for several "wrongs" but can we not think hard and examine the concept and find new wrongs? These new wrongs may not have that intuitive sense of wrong, and it will take some thinking to notice these wrongs, but its still just as wrong. woo I genuinely answered why we feel that killing is wrong without describing what exactly wrong means :)
  11. The "Veg Pledge"...

    Quote:Original post by superpig With regards to the argument that eating meat is wrong for ethical reasons: Why is killing wrong? Why is making things suffer wrong?I hope you are asking this from the philosophical perspective, because otherwise someone should warn your neighbors. I've never studied ethics. I guess its quite hard to measure and compare suffering and joy and I agree saying whats right and whats wrong is many times quite hard, subjective or maybe even impossible to decide. But as I understand the words "ethics" "wrong" "suffer", the dilemma here is quite simple. Saying "rape is unethical" is pretty much derived from the definition of the words. Asking why its unethical to rape for me is like asking why a triangle must have 3 corners. I'm sure a philosopher would scream and pull his hair on this weak answer, but I don't care much for the philosophy of it. If you don't think rape is unethical then there is no point discussing it farther because either you have brain malfunction or we can't agree on the words definition. And my point is rape is just a small difference from what animals suffer for your sandwich.
  12. The "Veg Pledge"...

    hi everyone, I'm joining this discussion late and haven't the time to read back the replies, so excuse me if I repeat stuff others said. There are many reasons to stop eating meat, or at least reduce meat eating to a low level. These include greenhouse gases, human health (heart disease etc), inefficient calorie consumption (order of magnitude less calories in meat than in the plants needed to generate the meat, will be a larger problem as population grows), and more... But the greatest reason for me (and the source of the thread I think) is the ethical problem. The benefits of eating meat are few, but lets admit it - eating meat is mostly for self joy. I earnestly hope very much you guys are revolted and heart broken when you hear about a sadist torturing an animal. But think about it for moment, from the ethical perspective its almost an exact same "dilemma" of meat eating. In short it can be summed up as "causing suffering of others for your own joy". A sadist kicks a dog for his joy. You indirectly cause *much* greater suffering for a slightly better tasting sandwich. The "big" difference is that when you eat meat the suffering is done for you and not directly by you, and that meat eating is very well accepted in our society (in fact in my society vegetarianism is frowned upon). But these two differences have little or no impact on the ethical dilemma, at least as I see it. Most of the excuses for ethically justifying meat eating can be directly translated to a sadist, a rapist, or a slave owner. From skimming through the replies I can spot excuses such as "ethics is subjective" or "superior animals have no need for mercy" or "thats how it is in nature" and I think it doesn't take much imagination to translate these statements to sadism/rape/slaving. I've also read excuses of lower intelligence, and I think this has no impact on the ethical dilemma either - what matters is if the animal can fear and suffer. I think if you ever raised a cat or a dog you know very well they can feel stress and fear, pain and sadness, just as much as humans or even more. I haven't raised a cow or chicken but from what little I've seen I think its as clear as can be that they have the same feelings also. As I put it, the dilemma is "causing suffering for your own joy", and even a very dumb animal can feel very great suffering. Also I read excuse of "plants are alive also" or "plants can suffer also". Honestly I think this is rubbish. I've never witnessed or heard a hint of plants pain. Maybe the strongest reason for it being rubbish is that plants, being totally passive, have no evolutionary need for sad/fear/pain feelings. But even if you do somehow believe in plants pain then thats even more reason to stop eating meat. As I said its meat is incredibly inefficient calorie wise - it takes many times more plants to create the meat than the number of plants you'd eat if you given up meat. I thought for many years that eating meat is wrong but meat is too tasty to give up. I finally stopped eating meat just less than a year ago and what keeps me strong is that I remind to myself that eating an hamburger is ethically equivalent (in my opinion) to kicking a dog for sadist. I think sadists should force themselves to refrain from harming others and I "sentence" myself to the same. Luckily it gets easier with time. If you read carefully my message you'd notice I am not directly against eating meat proper. I am against the excessive suffering that is done to farm animals. In that I am very different from most vegetarians I've talked to: I see no ethical problem (at least not a big one) with eating an animal that lived and died without suffering. [Edited by - Iftah on November 17, 2009 3:54:11 PM]
  13. Nuclear Iran?

    Hi all from Israel, I think its exceptionally naive to think Iran is building nuclear technology but not planning on making nukes of it. I imagine sanctions/national bribe would be the end of it if that was the case. Its also unfair to portray Iran as a peaceful country. Iran has proven itself very anti-Israel not only in harsh rhetorics but in action; Iran has been financing, weaponizing, training and what not, violent Islamists radical groups. That is mainly but not only Hizballah in Lebanon and Hamas in Gaza/WB, but also other countries (I think I read Iran mentioned backing of groups in Iraq, Egypt, Saudi Arabia, Yemen). Israel never took any action against Iran as far as I know, so I think it can be safely labeled as aggressive actions. I'm sure Iran's destabilizing actions are the main barrier to long lasting peace (or cease fire) between Israelies, Palestinians and Lebanese. I believe this war mongering is a tool for them, civilian deaths channeled to gain popularity to Islamic radical movements in a twisted way, advancing their goals. Unlike Iraq, who's leadership was corrupt and evil but self contained, Iran appears to be fueled by religious motivation to bring their Islamic revolution to the Middle East. You may argue its only an Israeli problem, but I have a feeling you guys prefer the middle east will go in a different direction than Iran's goals. I don't want to believe Israel's destruction is actually a top target for Iran. I imagine nuke wielding Iran will likely "just" have bigger balls and cook its Islamic revolution on higher fire. That is a bad situation and sadly most likely to happen. However, there is also an above zero chance that Iran will actually use such weapons. While I think its below the worrying threshold, many many people honestly worry about it here in Israel. It will be a huge political bonus to Bibi if he can launch a successful bombing of Iran's facilities. Bombing Iran will probably end up in Iran's revolution goals advancing via the surge in anti-Israel energies it will create, maybe even better than if Iran were backed up by nukes, so its a loose-loose situation for Israel. What would be done in my humble opinion? I hope sanctions and negotiations will have success but I doubt it. If comes a point that sanctions failed and Iran's program reaching near completion, I suppose Israel will attack, if only for the short term political advantage it will give to the politicians in charge, and for removing the chance of Iran's nuking Israel. What should be done IMHO ? Except sanction some more and hope for the best, I don't know! On the loose-loose I mentioned above, I guess the bigger "loose" is facing nuke wielding Iran, so if those are my two options I'll gravely take the bombing of Iran and face the consequences but I wish it won't come to that.
  14. JavaFX online course

    You may already know the site http://www.javapassion.com/ which offers free online programming courses, but I discovered it just recently. In particular I was interested in the JavaFX course, a 2nd session of it started just yesterday and looking at the table of contents it looks like a great program. http://www.javapassion.com/javafx/ I think the JavaFX technology has interesting potential for casual game developers because it promises to run same code on a web browser (with Java plugin), and on a large set of cellular phones (Java supporting Nokias and Sony Aricsons, Windows Mobile and Android been demoed), TV boxes, etc... Seems Sun learned from Java Applets mistakes, ie. there is pretty GUI support, easy installation and upgrade process, decent graphics performance, etc... It seems Oracle buying Sun didn't slow things down - they have statements of commitment and a new version of JavaFX just launched. The SDK was available before only for windows, but now Linux as well (which is why I'm just now starting to play with it). IMHO, its a worthy gamble to learn JavaFX, so I'm "enrolling" to the course. Anyone else?
  15. Favorite Computer Joke

    The first that pops to my mind are some xkcd classics: my code is compiling! and stand back! I know regular expressions does that mean they are my favorites? and of course there are lots of hilarious Dilberts. you can find some funnies in similar threads in stackoverflow: http://stackoverflow.com/questions/84556/whats-your-favorite-programmer-cartoon http://stackoverflow.com/questions/234075/what-is-your-best-programmer-joke