Jump to content
Forum upgrade is live! Read more... ×

ni

Hero
  • Content count

    41
  • Joined

  • Last visited

Community Reputation

0 Serf

About ni

  • Rank
    Learner
  • Birthday 20/09/1976
  1. ni

    Perl et al

    Well, you asked this 6 months ago, but better late than never, right?? The encoding to me looks like URL encoding. Why don't you just use URI::Escape? Example: #!/usr/bin/perl use URI::Escape; my $string = "Hello%20world!%0A%0D"; my $decode = uri_unescape($string); print "Original string: $string\n"; print "URL decoded string: \"$decode\"\n";Produces: Original string: Hello%20world!%0A%0D URL decoded string: "Hello world! "It converted the %0A%0D back to a newline, and it would convert other such encoded characters back.
  2. ni

    ni

    Hi robzy, Mac Dude, Nich..., chrisg, kikz, silhouette and anyone else I forgot. Sorry for the late reply... If anyone cares, I left Australia in 2003 for Singapore and Malaysia and have been back in Sydney since last November. It's cold!
  3. ni

    Programming in 1985

    Sorry for the late reply, I don't visit very often.1981 Sinclair ZX81 (1K of RAM, 3.25MHz Z80), taught myself BASIC (built into the ROM). ~1984 Commodore 64, more BASIC, some rudimentary assembly language. ~1988 Commodore Amiga 500, more BASIC, AMOS. ~1987 Parents got a 286, learned Borland Pascal and C to a rudimentary level. ~1989+ Gradually more powerful x86 machines, learned assembly quite in depth up to 486. ~1995 Started uni, non-computer related course. ~1997 Bored with uni, dropped out, got a job doing tech support over email, demonstrated I could code, wrote code for them. ~1997-2013 Learned more languages, became obsessed particularly with C, learned some Perl then some Python, dabbled in Java and Objective C (pre-smartphones) Played with Prolog, some Lisps, C++, et cetera. Had jobs such as system administrator, software developer, senior architect and now site reliability engineer.
  4. ni

    Well THAT was frustrating!

    I think http://www.marco.org/2013/01/21/anti-apple-anger sums this up well.
  5. ni

    Amazing mind reader reveals his gift.

    You can privatize facebook to the point that people (even your friends) can only see your name that you gave facebook as your real name and your profile pic (which could be of anything).
  6. ni

    If anyone is interested...

    Cool. Are they all flash games?
  7. ni

    Large Text Document won't open

    Obvious question perhaps, but not covered in this thread: Do you have enough disk space? vim by default creates a swap file which is like a copy of the file for recovery. It might try /tmp which might be a full partition. If you run with vim -n, this swap file won't be created.
  8. ni

    Whats it like living in Singapore?

    Firstly, to everyone, it's really trivial to get bacon in both Singapore and Kuala Lumpur. You just don't get it in the major chain fast food joints as they want muslims to eat there also. The airport is "out in the sticks" sort of, already, it's about 20-25 minutes from the city centre. What you want then is to live in the East somewhere, prices out there are quite reasonable. A few hundred a month. I think around 1/4 (no more than 1/3) is a good amount to spend on rent, personally. 3.5-5k is fine for a 2 bedroom place anywhere in the East coast area. 3.5 will get you something a bit older but decent, 5k will get you something more modern and flash. If you want 3br, they'll start at 4.5-5k. Check out something like Bayshore Park or Costa Del Sol, I've friends living at both. You can google them and get rent prices etc. They are walking distance to East Coast Park (a "beach"). This, I think, is frankly disgraceful. The company should apply, they did for me. Anyway, you can apply yourself if you really want, http://www.mom.gov.sg/foreign-manpower/pas...es/default.aspx
  9. ni

    Whats it like living in Singapore?

    Yeah, since 1965, but what's this got to do with anything?
  10. ni

    Whats it like living in Singapore?

    That's hilarious, as I just finished chomping down a bacon and egg sandwich here in Singapore. McDonalds, KFC and Burger King all do not have bacon, however. They are Halal certified. There are plenty of fine places to get bacon, the Chinese love pork.
  11. ni

    Whats it like living in Singapore?

    Well, as I said, you can get a reasonable small car for about $50K, and you can take out a low interest (2-4%) loan to pay it off. A lot of my not-very-highly-paid colleagues have cars because they have kids etc. and it's more convenient. I agree with you about cost of living except for alcohol (going out) and food which I forgot to mention in my last post. Eating out is much cheaper in Singapore if you eat low-end local food (hawker centres, food courts) and good quality western restaurants are much more expensive than in Australia.
  12. ni

    Whats it like living in Singapore?

    Hi, I moved from Australia (Sydney) to Singapore in 2003, lived there for about 6 months then moved to Kuala Lumpur until 2008 and now live back in Singapore since about 2.5 years ago. Singapore has boomed in terms of cost of living in the last 5ish years. I'll try to answer all your questions. I will quote all prices in AUD at the current rate (1.27 SGD to 1 AUD). Rent in Singapore is always quoted per month, not per week like in Australia. If you don't count houses (very expensive) and focus on condos/apartments/flats/units/whatever, living in Singapore can be divided into two broad categories -- HDB and private. HDB is public housing. Approximately 90% of Singaporeans live in HDB's, they are a bit naff, but functional. You can look them up in Wikipedia, etc. If you want to rent an HDB to yourself, it will cost you from about $1200 per month up, depending on if you want one near the CBD or the more affluent areas or close to public transport (MRT stations). If you want to rent a private condo, you're looking at about $2000 per month up, though cheaper options can be had way out of the city. As a rough idea, I pay $2600 ($3300 SGD) for a 2 bedroom, 950 square foot private condo in Tiong Bahru, which is about 5 minutes in a cab to the "city centre" of Singapore. It's hard to call one place a city centre as you have a massive business district plus a massive shopping district and many other small areas of interest. Condos normally have pools, gyms, tennis courts, et cetera. Medical facilities are very good, and probably cheaper than Australia, but of course Australians get Medicare. If you live/work in Singapore, you will want some kind of private health insurance, either get your employer to pay for it or pay for it yourself. The nice thing about Singapore, which you may not be used to in Australia, is that you can get away to other countries easily and cheaply for a [long] weekend. Many expats, including myself, with a bit of disposable income will escape to places like Thailand or the Philippines or Malaysia, etc. for a weekend at least one a month if not more. If you can't/don't want to travel, there are "beaches" (see Sentosa and East Coast Park), but they're rather crappy compared to other countries' beaches. It's better than nothing, though. Another popular activity is golf, though I don't play myself, but people don't play in Singapore as it's very expensive. You can, however, drive up to Malaysia to play or fly to Bangkok for the weekend. There's a huge amount of shopping malls in Singapore, they're full of people... shopping. I try to avoid them. There's plenty of bars, nightclubs, etc. some are open all night. Alcohol is rather expensive. A pint of beer is about $7+ in cheaper places, happy hour less. I've forgotten Australian beer glass sizes. A non-top-shelf spirit + mixer is typically ranges from about $8 to $15 depending on the time and place. These are of course "drinking out" costs, I rarely drink at home so I don't know how much this stuff costs at bottle shops. Singapore has an enormous expat population, and of course the majority are working males with stay at home wives. I'm sure she could find plenty of other mothers or wives, etc. to hang out with, I don't know the details. The law in Singapore is very strict and the crime rates are very low. That said, the police are very friendly and helpful in my experience and not at all trying to make your day miserable. I've heard anecdotes of drunk fellow expats staggering out of bars at 4am and the cops giving them a lift home, for example. Of course, if you do actually commit a crime, you may find them less friendly. Avoid taking/dealing drugs, littering, shooting people, possessing firearms, fighting, raping, pillaging, etc. and you should be fine. You might also want to read up on freedom of speech (or lack of it) in Singapore, too. I don't think there are any parts of Singapore "to avoid", except ones that no normal people can afford, and you'll have no choice but to avoid them. If you tell me which part of Singapore you'd be working, and roughly how much you could tolerate paying for rent, I might be able to offer some options. Cars are extremely expensive, and you probably wouldn't buy one unless you needed one. Taxis and public transport are excellent and taxis are relatively cheap. See http://static.chris.net.au/taxis.txt for a comparison I made a few years ago. An entry level small engined sedan will cost about $50,000. Cars are priced deliberately so that not many people (about 10%) can afford them, there are too many people in Singapore for everyone to have cars. If you have any other questions, let me know. Edit: Oh yeah, don't forget that income tax is much less. Someone earning $100K AUD/year in Singapore will take home about $90-92K of that.
  13. ni

    Reading other people's code

    I appreciate your intent here, but I'm more likely to prefer the second one. Being a horrible C programmer type, I'd be more likely to stick to smaller names with well-defined base units, like SI. That is, I'd prefer: struct object { // we use base SI units here double x; // metres double y; // metres double speed; // metres per second double direction; // radians } obj; /* ... */ /* update position */ obj.x += obj.speed * cos(obj.direction) * timeDelta; obj.y += obj.speed * sin(obj.direction) * timeDelta;Than: struct object { double xInMetres; double yInMetres; double speedInKph; double directionInRadians; } obj; /* ... */ /* update position, divide by 3.6 to convert to metres per second */ obj.xInMetres += obj.speedInKph / 3.6 * cos(obj.directionInRadians) * timeDeltaInSeconds; obj.yInMetres += obj.speedInKph / 3.6 * sin(obj.directionInRadians) * timeDeltaInSeconds;I just find the second example rather unnecessarily verbose. Finally, not that it matters, but I prefer speed_in_kph than the Java convention of initialLowercaseThenUppercase.
×