Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Rajasekharan Vengalil

@Rajasekharan Vengalil
About
Posts
153
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Learning Rust: Good resources?
    R Rajasekharan Vengalil

    As you might have discovered yourself, there are plenty of resources out there. The free official Rust Book[^] is a quality resource. Microsoft's Learn content also has a good set of tutorials on Rust - Take your first steps with Rust - Learn | Microsoft Docs[^]. As someone else suggested, solving exercism.org's Rust track - Rust on Exercism[^] - is a good way to get good at the language. Finally, if you get stuck on something please feel free to hit me up and I'll be happy to answer questions that you may have. The Rust community is generally quite friendly and you should feel free to ask questions on the The Rust Programming Language Forum[^]. Good luck and happy trails!

    -- Raj https://blogorama.nerdworks.in[^] --

    The Lounge learning architecture question

  • Grotesque C tricks
    R Rajasekharan Vengalil

    Neat. Works with VC++ as well. Like so:

    D:\Code\vc\solos>type reader.c
    #include "CON"

    D:\Code\vc\solos>cl /nologo reader.c
    reader.c
    int printf(); int main(int argc, char *argv[]) { printf("hello, world\n"); return 0; }

    D:\Code\vc\solos>reader.exe
    hello, world

    -- Raj alias "Ranju" alias "gleat" http://blogorama.nerdworks.in[^] --

    The Lounge html

  • Tariq Aziz Sentenced to Death
    R Rajasekharan Vengalil

    It doesn't say there that it was God who sent the bears to kill the children - Elisha did. God did empower Elisha - whatever he spoke happened. But God didn't always get to have a say in what he did with that power. It's like me blaming the power company because I electrocuted myself by sticking my finger into a power socket or something. We get further evidence of this in the new testament in Luke 9:54-56 when James and John suggested to Jesus that they call fire down from heaven to consume the Samaritans because they did not receive Jesus and Jesus rebuked them (i.e. James and John) saying, "Ye know not what manner of spirit ye are of. For the Son of man is not come to destroy lives but to save them". I think this makes God's stand on the issue pretty clear. Elisha was just irresponsible with his power and couldn't rein in his emotions.

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge html question announcement

  • Funny interview answers
    R Rajasekharan Vengalil

    Or, still better:

    double x = 3.1;
    int i;
    i = static_cast<int>(x);

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge c++ question career

  • Why I resigned from my job
    R Rajasekharan Vengalil

    Ditto. Emacs I somehow never ended up liking or using. The philosophy of vi is the idea of doing as much as one can with the least amount of stress on your fingers. Now if only getting out from edit mode didn't require you having to reach all the way up to the escape key it'd have been more or less perfect!

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge csharp visual-studio collaboration tools career

  • McAfee == Virus?
    R Rajasekharan Vengalil

    Why are people not crazy about viruses?

    • Viruses mess up your computer.
    • Viruses make everything run excruciatingly slowly.
    • Viruses result in lost productivity.

    My experience with McAfee has been that their anti-virus product does every single one of these things. So I sneak around behind corporate IT's back figuring out ways to disable the anti-virus on my office laptop (if you're interested in the details - I wrote a Windows service configured to launch under SYSTEM account and have it launch a process that you pass to it as a startup parameter. I then start this service passing "services.msc" as the process to be launched and then go ahead and stop all the McAfee services from this new console window). At any rate, here's further evidence that McAfee products are about as anti viruses as, say, nuclear weapons are anti-death!

    http://isc.sans.org/diary.html?storyid=8656[^]

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge html tools question

  • Cost of a tetanus shot in the US
    R Rajasekharan Vengalil

    I agree that it is a humane society when it decides to take care of those that are unable to pay. And I have absolutely no complaints if insurance money was the sole source for funding such treatments (as in fact was the case with me). I'd much rather have my insurance premium pay for someone's care than line the pocket of a wealthy CEO as another self-administered "bonus". What I'd have beef with was if I did have some bank balance, but no insurance and was forced to fork up $1400+ for the treatment I got. I suspect this particular combination of circumstances is rather rare in this country as this issue would have come to the fore a tad more frequently than it has otherwise. Also, I wonder if it'd be useful if the cost re-distribution was made proportional to the amount of uncompensated care provided by a particular hospital. I don't know if that is already the case - I mean, there has to be some basis for determining the cost of a particular visit. Right now, from the patient's perspective all of it seems a little arbitrary. Why did the hospital claim $1400+ and not, say, $5000? Why did the insurance company only pay $700+?

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge game-dev question

  • Cost of a tetanus shot in the US
    R Rajasekharan Vengalil

    Well, the only reason I went was because my tennis friends thought it was a good idea and it was past 9 PM. I wasn't experiencing pain and was told that that's probably because of the adrenalin and that once that goes down I'd be in excruciating pain and will probably need some prescription medication for that. Well, as it turned out the only time I felt any pain was after the dentist did a root canal 3 days later and that was nothing more than mild annoying pain. Also, it wasn't "chipped" teeth - half of it was just gone and after the dentist got done with his grinding there's almost no tooth left! Oh well, that's that!

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge game-dev question

  • Cost of a tetanus shot in the US
    R Rajasekharan Vengalil

    People have their reasons. Many perceive the bill as representing government take-over of health care and consequently a step towards socialism! The "public option" clause which allows the government to be one of the choices John Q. Public will have when selecting an insurance provider has raised the hackles of many big private insurance companies as they feel they could never compete with a government option which is backed by tax payers. Add to that the muscle-flexing by the lobbyists ($1.4 million[^] are being spent on average every single day by lobbyists apparently to have their cause heard on the floor) and you have what you see going on!

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge game-dev question

  • Cost of a tetanus shot in the US
    R Rajasekharan Vengalil

    Yeah. Well, he seems to be trying at least.

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge game-dev question

  • Cost of a tetanus shot in the US
    R Rajasekharan Vengalil

    If Obama has his way that's probably what will happen in the US too. One of the proposals in the health reform bill apparently is to impose tax penalties on people who remain uninsured. I am sure there will be some sensible caveat to that but yeah, that seems to be the general idea.

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge game-dev question

  • Cost of a tetanus shot in the US
    R Rajasekharan Vengalil

    A few weeks back I had a close personal encounter with centrifugal physics when I swung my tennis racquet rather unnecessarily hard and found it not only completely missing the ball but also hurtling straight for my face side-on. A resounding thwack later I found myself spitting pieces of one of my teeth out. As it turned out I had broken one of my front teeth clean in half. Friends insisted that I go to the ER and go I did. They took one look at it and said, well, you've got to go see a dentist. After 1.5 hours of thumb twiddling they gave me a tetanus shot and sent me on my way after depriving me of $100. I walked away thinking, "$100 for a tetanus shot?! Outrageous!". Fast forward a week or two when I find myself staring at a bill in the mail in disbelief. Cost of the treatment is given as $1,087.20 :omg:. I am thinking, this is surely a typo! I log on to the insurance website to see what was submitted for the claim and there I find another claim for $294 apart from the other thousand. The hospital submitted a claim for $1,381.20 and the insurance company actually paid $664.00. Add the $100 I paid and you arrive at a grand total of $764 for one measly injection! While my personal liability was only $100, I find the idea that the hospital thought that the service was worth $1,481.20 a bit mind-boggling. When I did a little googling about this, I found articles where the rationale appears to be that ERs run 24/7 all 365 days of the year and are required by law to treat all patients regardless of whether they have insurance or not and that a good chunk of the service they provide goes uncompensated and are therefore forced to distribute that cost among other patients who do happen to be insured. I am not sure that I find that completely convincing. Does anyone else think there's something broken with this system?

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge game-dev question

  • Favourite feature of Windows 7 so far...
    R Rajasekharan Vengalil

    Ah! Thanks for that! Another reason to not touch the mouse.

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge c++ architecture

  • Favourite feature of Windows 7 so far...
    R Rajasekharan Vengalil

    Hmm. I should remember to use that feature. Also neat is being able to "peek" at the desktop by moving your mouse to the bottom right hand corner and having Windows make all the windows transparent temporarily. I have the weather gadget running on the sidebar, so this lets me take a look at the current temperature without having to minimize anything. I suspect this feature is also a source of confusion for folks who don't know about it and happen to move the pointer to the bottom right-hand corner!

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge c++ architecture

  • Ooh what a shiner
    R Rajasekharan Vengalil

    Mycroft Holmes wrote:

    Yup he only got smacked in the face, if the wife had got involved he could be singing soprano.

    That's signature material! :laugh:

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge game-dev

  • Need advise on getting myself released from project
    R Rajasekharan Vengalil

    Thanks to everyone who responded, with a joke or otherwise! You guys rock!

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge csharp help question lounge career

  • Did you know that '&' can be a logical AND operator? [modified]
    R Rajasekharan Vengalil

    Yep, it does indeed still do a bitwise AND of the boolean operands. See my reply[^] to OriginalGriff[^]'s post below.

    -- gleat http://blogorama.nerdworks.in[^] --

    C# csharp java tutorial question discussion

  • Did you know that '&' can be a logical AND operator? [modified]
    R Rajasekharan Vengalil

    Yes. It does still perform a bitwise AND of the 2 boolean operands. Here's the IL for the sample code:

    L_0000: call bool ConsoleApplication1.Program::Eval1()
    L_0005: call bool ConsoleApplication1.Program::Eval2()
    L_000a: and // this does a bitwise AND and pushes result to eval stack
    L_000b: brfalse.s L_0018 // transfers control to instr L_0018 if val is false, null or zero
    L_000d: ldstr "Eval1() and Eval2() returned true."
    L_0012: call void [mscorlib]System.Console::WriteLine(string)
    L_0017: ret
    L_0018: ldstr "Eval1() and/or Eval2() returned false."
    L_001d: call void [mscorlib]System.Console::WriteLine(string)
    L_0022: ret

    And I agree, it does seem to be a fairly dangerous operator. I'd be surprised if somebody deliberately used it with this explicit intent - chances are, in a majority of the cases its occurrence is a typo - and something the compiler won't even alert you about. :~

    -- gleat http://blogorama.nerdworks.in[^] --

    C# csharp java tutorial question discussion

  • Did you know that '&' can be a logical AND operator? [modified]
    R Rajasekharan Vengalil

    I almost lost some money today on a bet with a colleague arguing that the following Java code was just plain invalid.

    if( this_thing == DING & that_thing == DONG ) {
    thenGoDoTheOtherThing();
    }

    Fortunately, he did not take me up on the bet! Turns out, for both Java and C#, when the & operator is used in this context the compiler stops treating it as the bitwise AND operator. Instead it treats it like the logical AND operator (&&) except that it applies a slightly modified evaluation rule - where && stops evaluation as soon as it encounters the first expression that evaluates to false, & goes ahead and evaluates all the expressions regardless of what each component expression evaluates to. The logical AND still works as one might expect, just that all the component expressions are always evaluated. Here's an example:

    class Program
    {
    static void Main(string[] args)
    {
    if (Eval1() & Eval2())
    Console.WriteLine("Eval1() and Eval2() returned true.");
    else
    Console.WriteLine("Eval1() and/or Eval2() returned false.");
    }

    static bool Eval1()
    {
        Console.WriteLine("Eval1");
        return false;
    }
    
    static bool Eval2()
    {
        Console.WriteLine("Eval2");
        return true;
    }
    

    }

    And here's the output you get.

    Eval1
    Eval2
    Eval1() and/or Eval2() returned false.

    Guess you learn something new everyday! I am not sure that using this feature is such a great idea though. Thoughts?

    -- gleat http://blogorama.nerdworks.in[^] --

    modified on Friday, December 4, 2009 3:31 PM

    C# csharp java tutorial question discussion

  • Need advise on getting myself released from project
    R Rajasekharan Vengalil

    Edgar Prieto wrote:

    are in no desperate need for money

    That right there is the problem you see!

    -- gleat http://blogorama.nerdworks.in[^] --

    The Lounge csharp help question lounge career
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups