<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Entries for Shining Arcanine</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/niners/shining arcanine/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Entries for Shining Arcanine</title><link>http://channel9.msdn.com/Niners/shining%20arcanine/</link></image><description>Entries, comments and threads posted by Shining Arcanine</description><link>http://channel9.msdn.com/Niners/shining%20arcanine/</link><language>en-us</language><pubDate>Mon, 16 Nov 2009 01:18:06 GMT</pubDate><lastBuildDate>Mon, 16 Nov 2009 01:18:06 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3608.3122, Culture=neutral, PublicKeyToken=null)</generator><item><title>Why isn't Windows avaliable in Latin? [Why isn't Windows avaliable in Latin?]</title><description>&lt;p&gt;Since my univeristy has a language requirement, I opted to fulfill it by taking Latin. I probably could have avoided taking any language at all because I took Spanish in high school, but there is a book in Latin (Disquisitiones Arithmeticae by Carl Fredrich Gauss) that I want to read, so I figured I would kill two birds with one stone.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since I started learning Latin, I have been interested in finding things in Latin to read. The latest that I have found is the Latin Vulgate (http://www.fourmilab.ch/etexts/www/Vulgate/). However, using a computer often times more than I sleep, I have started to wonder, why isn't Windows avaliable in Latin?&lt;/p&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/506467-Why-isnt-Windows-avaliable-in-Latin/'&gt;Why isn't Windows avaliable in Latin?&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/506467/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/506467-Why-isnt-Windows-avaliable-in-Latin/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/506467-Why-isnt-Windows-avaliable-in-Latin/</link><pubDate>Mon, 16 Nov 2009 01:18:06 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/506467-Why-isnt-Windows-avaliable-in-Latin/</guid><evnet:views>511</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/506467/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Since my univeristy has a language requirement, I opted to fulfill it by taking Latin. I probably could have avoided taking any language at all because I took Spanish in high school, but there is a book in Latin (Disquisitiones Arithmeticae by Carl Fredrich Gauss) that I want to read, so I figured I&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>39</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/506467-Why-isnt-Windows-avaliable-in-Latin/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/506467/Trackback.aspx</trackback:ping></item><item><title>Using Windows 98 in a Virtual PC [Using Windows 98 in a Virtual PC]</title><description>&lt;p&gt;I have been playing with virtualization software (VMWare Player) the past few days and I decided to try installing Windows 98 for fun. This is the original edition and not the second edition because I do not own a copy of the second edition.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Anyway, I managed to install it without issues, but its GUI felt less responsive than it was on my Pentium II PC ten years ago, so I tried installing VMWare Tools, which are supposed to support Windows 98, but would not install, for a multitude of reasons. The first was that Windows 98 thought that the installation CD was an audio disc. After resolving that, the setup.exe file would cause an exception, so I tried running the msi file directly, only to find that Windows Installer did not exist. Then I installed Windows Installer and ran the msi file to be greeted by an error message regarding a missing dll. I reran it with logging enabled and dug though the logs. Googling  the error codes, I discovered that installing Internet Explorer 6 would some times resolve the issue for certain applications, so I installed it and received a slightly different set of error codes, which point to some sort of issue with the Windows Script Host, which I assume is either not present or horribly outdated compared to the last version Microsoft published for Windows 98.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Windows Script Host 5.6 is the latest version avaliable for Windows 98, being the last Microsoft published for that operating system, but it seems to have disappeared off the internet. Does anyone know if it is still avaliable from some sort of mirror?&lt;/p&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/480183-Using-Windows-98-in-a-Virtual-PC/'&gt;Using Windows 98 in a Virtual PC&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/480183/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/480183-Using-Windows-98-in-a-Virtual-PC/</comments><link>http://channel9.msdn.com/forums/TechOff/480183-Using-Windows-98-in-a-Virtual-PC/</link><pubDate>Wed, 22 Jul 2009 03:26:53 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/480183-Using-Windows-98-in-a-Virtual-PC/</guid><evnet:views>867</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/480183/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I have been playing with virtualization software (VMWare Player) the past few days and I decided to try installing Windows 98 for fun. This is the original edition and not the second edition because I do not own a copy of the second edition.
&amp;nbsp;
Anyway, I managed to install it without issues, but&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>5</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/480183-Using-Windows-98-in-a-Virtual-PC/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/480183/Trackback.aspx</trackback:ping></item><item><title>Unconventional Memory Allocations in C++  [Unconventional Memory Allocations in C++ ]</title><description>In a program I was thinking of writing for fun, I wanted to take a big chunk of memory from malloc() and then carve out various portions for different things so I only had to allocate memory once.&lt;br&gt;&lt;br&gt;The problem with doing that is that according to one of Bjarne Stroustrup's books, the History and Evolution of C++, all C++ Objects have an extra pointer called the Virtual Function Table Pointer, which makes them distinctly different than C Structures. Furthermore, the creation of the Virtual Function Table to which this pointer points is handled by the compiler, so if I wanted to curve a chunk of memory into a bunch of C++ objects manually, I would have to allocate memory for this virtual function table, initializing its pointers and initializing the virtual function table pointer to point to this table.&lt;br&gt;&lt;br&gt;It seems to me that where in an object the virtual function table pointer is (and the nature of its table when multiple inheritance is taken into consideration) is dependent on the compiler's implementation and that all of this should be handled by invisible code that the compiler inserts into the top of an object's constructor, which would have some relationship to the new operator that is normally used to create objects.&lt;br&gt;&lt;br&gt;With this in mind, I did some research into the new operator and apparently, everything I outlined above is correct, but I have some questions about things I found when researching this topic.&lt;br&gt;&lt;br&gt;My first question is regarding "new (p3.first) myclass[3];", which is from the following url:&lt;br&gt;&lt;br&gt;&lt;a href="http://www.cplusplus.com/reference/std/new/operator%20new%5B%5D.html"&gt;http://www.cplusplus.com/reference/std/new/operator%20new%5B%5D.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;It is supposed to call the myclass constructor on 3 objects in an array pointed to by pointer p3.first, but it is the strangest/ugliest thing I have ever seen and it does not match the header definition provided on that page. Is there something in the C++ Grammar that make this sort of code a special case of a more general language feature or is this a special case (i.e. a hack) in the C++ grammar for seperating constructor calls from memory allocations?&lt;br&gt;&lt;br&gt;The computer science classes I took to learn C/C++ tended to omit more exotic language features such as bit manipulation, variadic functions, etcetera, so I would not be surprised if "new (p3.first) myclass[3];" looks perfectly normal to more experienced programmers, but it appears very alien to me, which makes me think that I am missing something.&lt;br&gt;&lt;br&gt;My second question is when you have a function:&lt;br&gt;&lt;br&gt;someType someClass::someFunction () throw()&lt;br&gt;{&lt;br&gt;&lt;br&gt;// code goes here&lt;br&gt;&lt;br&gt;}&lt;br&gt;&lt;br&gt;What
does throw() mean? I used to know the answer to this, but I haven't
written code in C++ for a year and I never wrote much involving
exception handling. It seems to be functionally similar to the const
keyword in that it labels a member function to be treated specially by
the compiler, but that does not ring any bells in my mind that would
answer this. My google searches have not been very helpful in searching
for what throw() means.&lt;br&gt;&lt;br&gt;Also, I am curious, does anyone know what the reasoning was that lead to the creation of get_temporary_buffer() and return_temporary_buffer()? I tried to answer that question myself by examining the code in &amp;lt;new&amp;gt;, but the code is so horribly obfuscated that the only possible reason get_temporary_buffer() and return_temporary_buffer() exist of which I can conceive is that they were convenient for someone at some early point in time because they could be used in place of C standard library functions for doing exactly what I want to do in my program and they were then incorporated into the standard because of that. I am kicking myself as I met Bjarne Stroustrup last year and I had been thinking about the very same topic a month before, but I did not do the research I did today to know about these two functions to able to ask him about them.&lt;br&gt;&lt;br&gt;Edit: I just realized, how do you call the destructor of an object if you call its constructor in such a way?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/460551-Unconventional-Memory-Allocations-in-C/'&gt;Unconventional Memory Allocations in C++ &lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/460551/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/460551-Unconventional-Memory-Allocations-in-C/</comments><link>http://channel9.msdn.com/forums/TechOff/460551-Unconventional-Memory-Allocations-in-C/</link><pubDate>Wed, 11 Mar 2009 21:12:58 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/460551-Unconventional-Memory-Allocations-in-C/</guid><evnet:views>725</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/460551/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>In a program I was thinking of writing for fun, I wanted to take a big chunk of memory from malloc() and then carve out various portions for different things so I only had to allocate memory once.The problem with doing that is that according to one of Bjarne Stroustrup's books, the History and&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/460551-Unconventional-Memory-Allocations-in-C/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/460551/Trackback.aspx</trackback:ping></item><item><title>Java GUI Programming Questions [Java GUI Programming Questions]</title><description>For my computer science class, I have to write a Java program that has a GUI (more specifically, a Java video game that has a GUI). I played with GUI programming a bit when Microsoft sent me a free copy of Visual Basic 2003 .NET a few years ago and it was really easy as I could drag and drop controls into a window, position them as I wanted and set a bunch of fields indicating the behaviors, appearance, etcetera of everything. Is there any way to get this sort of thing in a Java IDE or is GUI programming in Java supposed to be a hellish experience?&lt;br&gt;&lt;br&gt;I am having trouble getting text in labels to wrap. For some reason it only wants to be on one line. Is there any easy way to get text with which the user is not supposed to interact to wrap automatically without manually wrapping it? I found a blog entry that has a well written hack for doing this, but I will be subject to academic dishonesty proceedings if I use other people's code, so I need some other way of doing this, assuming I don't just go and manually wrap text:&lt;br&gt;&lt;br&gt;&lt;a href="http://"&gt;http://www.geekyramblings.org/2005/06/30/wrap-jlabel-text/&lt;/a&gt;&lt;br&gt;&lt;br&gt;I am also having trouble with using HTML in JLabels to format text that is supposed to be inert as far as the user can tell. If I have paragraph tags, their contents are put on separate lines as if I had used a line break tag, rather than being placed two lines apart. I have tried specifying the default stylesheet Firefox uses for paragraphs and headers, but it does not seem to respond to that. Is there a way to get it to extremely simple HTML to render as it does in Firefox/Opera/Google Chrome/&amp;lt;Insert Any Almost Standards Complaint Browser here&amp;gt;?&lt;br&gt;&lt;br&gt;Getting a menu bar to behave similarly to its Windows Forms counterpart in that it responds to alt presses such that the first menu in it will be selected but the menu will not expand without the down arrow key being pressed seems impossible. Is there any way to get a menu bar to behave like its Windows Forms counterpart in Java?&lt;br&gt;&lt;br&gt;I wanted to make a wizard for my program and I have created a set of classes for making Wizards. The basic idea is that I have a class that extends JDialog in whose content pane I am swapping JPanels as the next and previous buttons are pressed. If I do not change the text of a button in the dialog when the next button is pressed, repaint() will not display the contents of the new panel. What does changing the text of a JButton do that repaint() does not when a panel inside of the content pane of a JDialog is removed and another is added in its place? Also, did I really need to write a bunch of classes just to get a Wizard to work or has this work already been done for me by the Java library writers' encyclopedic approach to writing libraries?&lt;br&gt;&lt;br&gt;I want to organize sets of controls to be arranged in a tabular layout, such that they are organized into rows and columns, and have a header describing each column. Is there a way to do this without hacking away at obscure portions of the Java API that few people understand for weeks?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/459957-Java-GUI-Programming-Questions/'&gt;Java GUI Programming Questions&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/459957/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/459957-Java-GUI-Programming-Questions/</comments><link>http://channel9.msdn.com/forums/TechOff/459957-Java-GUI-Programming-Questions/</link><pubDate>Fri, 06 Mar 2009 06:22:52 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/459957-Java-GUI-Programming-Questions/</guid><evnet:views>601</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/459957/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>For my computer science class, I have to write a Java program that has a GUI (more specifically, a Java video game that has a GUI). I played with GUI programming a bit when Microsoft sent me a free copy of Visual Basic 2003 .NET a few years ago and it was really easy as I could drag and drop&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/459957-Java-GUI-Programming-Questions/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/459957/Trackback.aspx</trackback:ping></item><item><title>Networking in Unix [Networking in Unix]</title><description>I am taking a Computer Networking class and for my first homework assignment, my professor wants each of us to write a multithreaded web server for Unix in Java.&lt;br&gt;&lt;br&gt;I am no fan of Java and I have learned to hate it very much. I pointed out a line ending problem involving Java's handling of the HTTP Headers across different systems to my professor and asked if it was okay if I did the assignment is another language, say C, to avoid the problem entirely. At the time I did not realize the significance of what I had pointed out (my professor spent a few minutes on it making me realize its scope) and jumped on the opportunity to ask if I could do the assignment in C. My professor was not very enthusiastic about that idea, likening it to (I don't remember the example so I am fabricating one) replacing a car because it needs an oil change.&lt;br&gt;&lt;br&gt;I find Java's libraries to be so extensive that I have little clue as to what it is actually doing at any point in time and I am not willing to dig through Sun Microsystems' millions (billions?) of lines of published source code to find out. Because of this, I have decided to go ahead with writing my assignment in C to learn what is actually happening under the hood
despite my professor's opinion of writing it in C and then rewrite it in Java after I am
happy with how it works in C so I can submit my assignment without having to deal
with any drama from my professor.&lt;br&gt;&lt;br&gt;My problem is that since my university's Computer Science department has largely abandoned C in favor of Java, I have not had much practice to be able to learn about the various system libraries and I have no clue what library I am supposed to open a socket to be able to listen to ports, accept incoming connections, communicate over those connections, etcetera. I pulled out my copy of The Unix Programming Environment (which I hate to admit that I never found time to read until today) expecting to find a description of how to do networking in it, but there was none to be found. I visited the Single Unix Specification at unix.org, but there is so much there I don't know which library I should be examining.&lt;br&gt;&lt;br&gt;Could someone point me in the right direction as to what library to use in C to do networking on Unix?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/459000-Networking-in-Unix/'&gt;Networking in Unix&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/459000/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/459000-Networking-in-Unix/</comments><link>http://channel9.msdn.com/forums/TechOff/459000-Networking-in-Unix/</link><pubDate>Fri, 27 Feb 2009 06:43:06 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/459000-Networking-in-Unix/</guid><evnet:views>669</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/459000/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I am taking a Computer Networking class and for my first homework assignment, my professor wants each of us to write a multithreaded web server for Unix in Java.I am no fan of Java and I have learned to hate it very much. I pointed out a line ending problem involving Java's handling of the HTTP&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>8</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/459000-Networking-in-Unix/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/459000/Trackback.aspx</trackback:ping></item><item><title>File based disk imaging question (with a long introduction) [File based disk imaging question (with a long introduction)]</title><description>My cousin's computer has an OCZ branded Samsung MLC SSD, which is known to have performance issues. The nature of the performance issues I will not bother to describe, as they are so strange it is difficult to fully describe them in less than 1000 words. I will just state that they involve random writes.&lt;br&gt;&lt;br&gt;I built his system for him 3 months ago (when the drives had first hit the market and before the issue was widely known). At that time, I tried to find I did some internet research on the issue (again, the last time I had done it nothing useful came up). Today some new software was installed on his computer, which caused him to run into the random write issues. I didn't like this, so I again did some internet research on the issue and this time, it seems that other people have figured out how to fix the problems he is experiencing. The fix is based on slide 10 of the following Microsoft PowerPoint Presentation (that details the changes that are being made in Windows 7 for SSDs) and requires repartitioning the drive to properly align its sectors to SSD pages.&lt;br&gt;&lt;br&gt;&lt;a href="http://download.microsoft.com/download/a/f/d/afdfd50d-6eb9-425e-84e1-b4085a80e34e/WNS-T432_WH07.pptx"&gt;http://download.microsoft.com/download/a/f/d/afdfd50d-6eb9-425e-84e1-b4085a80e34e/WNS-T432_WH07.pptx&lt;/a&gt;&lt;br&gt;&lt;br&gt;An explanation of part of the problem (the other part being poor controller design by Jmicron) is at technet:&lt;br&gt;&lt;br&gt;&lt;a href="http://technet.microsoft.com/en-us/library/bb643097.aspx"&gt;http://technet.microsoft.com/en-us/library/bb643097.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;Partition alignment instructions are on OCZ's forums:&lt;br&gt;&lt;br&gt;&lt;a href="http://www.ocztechnologyforum.com/forum/showthread.php?p=325221"&gt;http://www.ocztechnologyforum.com/forum/showthread.php?p=325221&lt;/a&gt;&lt;br&gt;&lt;br&gt;My cousin has a working Windows installation at the moment and he has all of the programs, device drivers, updates, etcetera that he needs at the moment. I would like to effectively realign the partition on his SSD without affecting anything else. As a consequence, I would like to do a file based image of his entire hard drive, follow the partition alignment instructions on OCZ's forums and then restore his operating system, device drivers, programs, etcetera as they were.&lt;br&gt;&lt;br&gt;I know this should be possible as Microsoft has tools that deploy Windows Vista using this exact technology:&lt;br&gt;&lt;br&gt;&lt;a href="http://en.wikipedia.org/wiki/Windows_Imaging_Format"&gt;http://en.wikipedia.org/wiki/Windows_Imaging_Format&lt;/a&gt;&lt;br&gt;&lt;br&gt;Is there any way I can use these tools with Windows XP to do what I want to achieve (backup everything, wipe the drive clean and then reload it after I have recreated and formatted the system partition correctly)? I have a copy of Vista so I have that at my disposal, even though I don't use Vista.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/450726-File-based-disk-imaging-question-with-a-long-introduction/'&gt;File based disk imaging question (with a long introduction)&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/450726/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/450726-File-based-disk-imaging-question-with-a-long-introduction/</comments><link>http://channel9.msdn.com/forums/TechOff/450726-File-based-disk-imaging-question-with-a-long-introduction/</link><pubDate>Thu, 01 Jan 2009 04:47:48 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/450726-File-based-disk-imaging-question-with-a-long-introduction/</guid><evnet:views>920</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/450726/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>My cousin's computer has an OCZ branded Samsung MLC SSD, which is known to have performance issues. The nature of the performance issues I will not bother to describe, as they are so strange it is difficult to fully describe them in less than 1000 words. I will just state that they involve random&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/450726-File-based-disk-imaging-question-with-a-long-introduction/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/450726/Trackback.aspx</trackback:ping></item><item><title>Compiler related question [Compiler related question]</title><description>I am taking a data structures class which is taught 73% in Java and 27% in C. Right now, we are now doing C and the examples of C code on the lecture slides are is what I consider to be Java-style C code in that it is very verbose. C is a programming language in which I am very comfortable in programming, but C is also my favorite programming language and each time I see Java-style C code, it feels like a piece of me dies inside, so to resolve this, I would like to write a program that will do the following things in the following order:&lt;br&gt;&lt;ol&gt;&lt;li&gt;Read a C source file from the file system&lt;br&gt;&lt;/li&gt;&lt;li&gt;Verify it has no syntax errors (if it does, it will stop here)&lt;br&gt;&lt;/li&gt;&lt;li&gt;Generate a parse tree containing a description of the program&lt;/li&gt;&lt;li&gt;Do manipulation to the parse tree to apply optimizations to the code&lt;br&gt;&lt;/li&gt;&lt;li&gt;Output a neatly formatted C source file to the file system&lt;/li&gt;&lt;/ol&gt;After I have written this program, I will give it to my professor in the hope that he uses it to fix his lecture slides. I know all of the optimizations that I want the program to do and I could list them, but I have a more fundamental problem.&lt;br&gt;&lt;br&gt;I have a copy of the dragon book and I have read its first few chapters, but it but it is very abstract in its descriptions. Consequently, its examples only show how portions of things are done, such as mathematical expressions. It would take several months for me to derive how all of this would be applied to something as complicated as the C language and to write a working program that does what I want, so I am wondering, is there any sort of shortcut I can take?&lt;br&gt;&lt;br&gt;More specifically, is there any sort of idiot's guide for specialized tools compiler writers use like LEX and YACC that would enable me to quickly get code that will produce a parse tree so I can do the manipulations I want and then output the tree's information to a text file without having to concern myself with the algorithms behind how the parse tree was generated in the first place?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/442777-Compiler-related-question/'&gt;Compiler related question&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/442777/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/442777-Compiler-related-question/</comments><link>http://channel9.msdn.com/forums/TechOff/442777-Compiler-related-question/</link><pubDate>Wed, 12 Nov 2008 20:14:30 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/442777-Compiler-related-question/</guid><evnet:views>727</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/442777/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I am taking a data structures class which is taught 73% in Java and 27% in C. Right now, we are now doing C and the examples of C code on the lecture slides are is what I consider to be Java-style C code in that it is very verbose. C is a programming language in which I am very comfortable in&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>10</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/442777-Compiler-related-question/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/442777/Trackback.aspx</trackback:ping></item><item><title>Regarding the simdization/vectorization of table look-up operations [Regarding the simdization/vectorization of table look-up operations]</title><description>I am working on a project (where I had to rewrite code to alleviate a known bottleneck) and I went through some extra trouble to find an algorithm that does no branching to replace the only loop in my code (which happens to be inside a loop that fills an array) so that in theory, the entire computation would be vectorizable. The algorithm that replaces the loop does sixteen operations (consisting of right logical
shifts, bitwise ors, one addition and one multiplication) to compute
the index of the value in a lookup table that contains the result of the loop it replaced.&lt;br&gt;&lt;br&gt;I have the loop that it replaced commented out and I would have liked to mention in a comment
that the code that replaced the loop is theoretically simdizable on X
architecture. The computation of the array index is easily vectorizable, but I was not quite so sure if its use of a look-up table is vectorizable, so I started reading through &lt;a href="http://www.intel.com/products/processor/manuals/"&gt;Intel's manuals&lt;/a&gt;. I found out on page 237 of 
		&lt;span class="subtitle"&gt;the "&lt;a href="http://www.intel.com/design/processor/manuals/248966.pdf"&gt;Intel® 64 and IA-32 Architectures Optimization Reference Manual&lt;/a&gt;" that table look-up operations are not &lt;/span&gt;vectorizable&lt;span class="subtitle"&gt;.&lt;/span&gt;&lt;br&gt;&lt;br&gt;There are workarounds that you can use with IA-32, but I am curious, is there any technical reason why IA-32 does not have an instruction that allows table look-ups to be vectorized? If there is no technical reason why IA-32 does not have an instruction that allows table look-ups to be vectorized, are there other instruction set architectures that do have an instruction that allows table look-ups to be vectorized and if they exist, what would those be? On a more extreme paradigm, do stream processors such as Nvidia's graphics processors or ATI's/AMD's graphics processors have instructions that allow this to be done?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/431977-Regarding-the-simdizationvectorization-of-table-look-up-operations/'&gt;Regarding the simdization/vectorization of table look-up operations&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/431977/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/431977-Regarding-the-simdizationvectorization-of-table-look-up-operations/</comments><link>http://channel9.msdn.com/forums/TechOff/431977-Regarding-the-simdizationvectorization-of-table-look-up-operations/</link><pubDate>Thu, 09 Oct 2008 03:29:37 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/431977-Regarding-the-simdizationvectorization-of-table-look-up-operations/</guid><evnet:views>939</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/431977/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I am working on a project (where I had to rewrite code to alleviate a known bottleneck) and I went through some extra trouble to find an algorithm that does no branching to replace the only loop in my code (which happens to be inside a loop that fills an array) so that in theory, the entire&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>5</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/431977-Regarding-the-simdizationvectorization-of-table-look-up-operations/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/431977/Trackback.aspx</trackback:ping></item><item><title>SQL Turing Completeness question [SQL Turing Completeness question]</title><description>Is SQL turing complete with stored procedures? More interestingly, is SQL turing complete without stored procedures? Also, is/should SQL be considered a computer programming language?&lt;br&gt;&lt;br&gt;I am curious about this as the answer to the last question will determine whether I know 7 computer programming languages or 8. Specifically, I know PHP, SQL, SML, C, C++, Java, Assembly and Fortran. That is approximately the order in which I learned them, although I learned some languages simultaneously and others took longer to learn than others. Also, I am considering both x86 assembly and MIPS assembly to be the same language.&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/431432-SQL-Turing-Completeness-question/'&gt;SQL Turing Completeness question&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/431432/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/431432-SQL-Turing-Completeness-question/</comments><link>http://channel9.msdn.com/forums/TechOff/431432-SQL-Turing-Completeness-question/</link><pubDate>Mon, 06 Oct 2008 19:12:08 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/431432-SQL-Turing-Completeness-question/</guid><evnet:views>1322</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/431432/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Is SQL turing complete with stored procedures? More interestingly, is SQL turing complete without stored procedures? Also, is/should SQL be considered a computer programming language?I am curious about this as the answer to the last question will determine whether I know 7 computer programming&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>6</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/431432-SQL-Turing-Completeness-question/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/431432/Trackback.aspx</trackback:ping></item><item><title>C Standard Library Mathematics Functions missing on Ubuntu and Solaris? [C Standard Library Mathematics Functions missing on Ubuntu and Solaris?]</title><description>I wrote a small program that is very math heavy as part of a project I have. I compiled it with GCC on Ubuntu Linux. I then tried using GCC's linker and it complained about sqrt, log and cos being undefined symbols.&lt;br&gt;&lt;br&gt;I decided that this was due to some misconfiguration of my linux installation, so I scped the files over to my unversity's unix server (solaris 5.9) and then tried again. I received the same errors.&lt;br&gt;&lt;br&gt;I had #include&amp;lt;math.h&amp;gt; at the top of my source file and there was nothing I could see that should cause this type sort of an error. I recalled using the math library on Windows once a long time ago, so I tried compiling my program with Visual Studio 2008 Professional on Windows XP SP3. It compiled, linked and executed without a problem.&lt;br&gt;&lt;br&gt;Does anyone know why these functions appear to be missing? I have used other C standard libraries in the past, but this is the first time when a C standard library's functions appeared to be missing.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/430320-C-Standard-Library-Mathematics-Functions-missing-on-Ubuntu-and-Solaris/'&gt;C Standard Library Mathematics Functions missing on Ubuntu and Solaris?&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/430320/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/430320-C-Standard-Library-Mathematics-Functions-missing-on-Ubuntu-and-Solaris/</comments><link>http://channel9.msdn.com/forums/TechOff/430320-C-Standard-Library-Mathematics-Functions-missing-on-Ubuntu-and-Solaris/</link><pubDate>Mon, 29 Sep 2008 18:52:56 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/430320-C-Standard-Library-Mathematics-Functions-missing-on-Ubuntu-and-Solaris/</guid><evnet:views>1418</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/430320/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I wrote a small program that is very math heavy as part of a project I have. I compiled it with GCC on Ubuntu Linux. I then tried using GCC's linker and it complained about sqrt, log and cos being undefined symbols.I decided that this was due to some misconfiguration of my linux installation, so I&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>8</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/430320-C-Standard-Library-Mathematics-Functions-missing-on-Ubuntu-and-Solaris/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/430320/Trackback.aspx</trackback:ping></item><item><title>"Exclusive Interview: Microsoft Admits What Went Wrong with Vista, and How They Fixed It" ["Exclusive Interview: Microsoft Admits What Went Wrong with Vista, and How They Fixed It"]</title><description>&lt;a href="http://www.maximumpc.com/article/features/shattered_dreams_and_broken_promises_vistas_failure_launch"&gt;http://www.maximumpc.com/article/features/shattered_dreams_and_broken_promises_vistas_failure_launch&lt;/a&gt;&lt;br&gt;&lt;br&gt;Interesting. That will not get me to switch to Vista, but it was interesting to read.&lt;a href="http://www.youtube.com/watch?v=ImyK29QLs_A"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;Two things in the article that stood out to me are:&lt;br&gt;&lt;br&gt;"But at least Microsoft curbs piracy of Vista and other activated
software by treating its customers like criminals, right? Well, not so
much. Hacked versions of Vista that simply bypass activation are
available on BitTorrent sites around the world."&lt;br&gt;&lt;br&gt;"He admitted that spending the money to port DirectX 10 to Windows XP would have been worth the expense."&lt;br&gt;&lt;br&gt;Microsoft has obviously been doing everything it can to try to
repair its reputation with people, by spending enormous quantities of
money:&lt;br&gt;&lt;br&gt;&lt;a href="http://www.mojaveexperiment.com/"&gt;http://www.mojaveexperiment.com/&lt;/a&gt;&lt;br&gt;&lt;a href="http://www.youtube.com/watch?v=ImyK29QLs_A"&gt;http://www.youtube.com/watch?v=ImyK29QLs_A&lt;/a&gt;&lt;br&gt;&lt;br&gt;If Microsoft were to remove WGA from Windows and port DirectX 10 to Windows XP, I am sure that those two actions would do far more for their reputation than anything their marketing department could do and it would cost far less.&lt;br&gt;&lt;br&gt;After all, if hacked versions of Vista are freely available, as that site reports, and it would be worth it to port DirectX 10 to Windows XP, as that manager says, I am not sure Microsoft has much to lose by doing these two things and given that Microsoft is competing with Google, which is known for generously giving stuff to people for free, these actions might help Microsoft break Google's image as being so generous.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/427056-Exclusive-Interview-Microsoft-Admits-What-Went-Wrong-with-Vista-and-How-They-Fixed-It/'&gt;"Exclusive Interview: Microsoft Admits What Went Wrong with Vista, and How They Fixed It"&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/427056/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/427056-Exclusive-Interview-Microsoft-Admits-What-Went-Wrong-with-Vista-and-How-They-Fixed-It/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/427056-Exclusive-Interview-Microsoft-Admits-What-Went-Wrong-with-Vista-and-How-They-Fixed-It/</link><pubDate>Thu, 11 Sep 2008 14:31:12 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/427056-Exclusive-Interview-Microsoft-Admits-What-Went-Wrong-with-Vista-and-How-They-Fixed-It/</guid><evnet:views>926</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/427056/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>http://www.maximumpc.com/article/features/shattered_dreams_and_broken_promises_vistas_failure_launchInteresting. That will not get me to switch to Vista, but it was interesting to read.Two things in the article that stood out to me are:"But at least Microsoft curbs piracy of Vista and other&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/427056-Exclusive-Interview-Microsoft-Admits-What-Went-Wrong-with-Vista-and-How-They-Fixed-It/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/427056/Trackback.aspx</trackback:ping></item><item><title>$98 Linux laptop [$98 Linux laptop]</title><description>&lt;a href="http://techvideoblog.com/ifa/98-linux-laptop-the-hivision-mininote"&gt;http://techvideoblog.com/ifa/98-linux-laptop-the-hivision-mininote&lt;/a&gt;&lt;br&gt;&lt;br&gt;I think they should have called it the Linux 98. The name would certainly be very descriptive.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/426059-98-Linux-laptop/'&gt;$98 Linux laptop&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/426059/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/426059-98-Linux-laptop/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/426059-98-Linux-laptop/</link><pubDate>Sat, 06 Sep 2008 05:07:31 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/426059-98-Linux-laptop/</guid><evnet:views>896</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/426059/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>http://techvideoblog.com/ifa/98-linux-laptop-the-hivision-mininoteI think they should have called it the Linux 98. The name would certainly be very descriptive.in reply to $98 Linux laptop</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/426059-98-Linux-laptop/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/426059/Trackback.aspx</trackback:ping></item><item><title>Why is Windows Server 2008 a better desktop OS than Windows Vista? [Why is Windows Server 2008 a better desktop OS than Windows Vista?]</title><description>&lt;a href="http://www.win2008workstation.com/wordpress/2008/03/16/why-should-i-use-a-server-os-for-my-workstation/"&gt;http://www.win2008workstation.com/wordpress/2008/03/16/why-should-i-use-a-server-os-for-my-workstation/&lt;/a&gt;&lt;br&gt;&lt;br&gt;I looked though some of the links that were listed there and I am surprised by the numbers I am seeing for the benchmarks people are running. Video games run faster on Windows Server 2008 than on Vista. Windows Server 2008 uses less memory than Vista. Certain things run faster on Windows Server 2008 than on Windows XP. Despite all of this, the processes that are running are generally the same.&lt;br&gt;&lt;br&gt;Many people that work at Microsoft visit these forums. Does anyone have any idea why there is this discrepancy?&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/415629-Why-is-Windows-Server-2008-a-better-desktop-OS-than-Windows-Vista/'&gt;Why is Windows Server 2008 a better desktop OS than Windows Vista?&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/415629/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/415629-Why-is-Windows-Server-2008-a-better-desktop-OS-than-Windows-Vista/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/415629-Why-is-Windows-Server-2008-a-better-desktop-OS-than-Windows-Vista/</link><pubDate>Wed, 16 Jul 2008 06:48:03 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/415629-Why-is-Windows-Server-2008-a-better-desktop-OS-than-Windows-Vista/</guid><evnet:views>1437</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/415629/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>http://www.win2008workstation.com/wordpress/2008/03/16/why-should-i-use-a-server-os-for-my-workstation/I looked though some of the links that were listed there and I am surprised by the numbers I am seeing for the benchmarks people are running. Video games run faster on Windows Server 2008 than on&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>29</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/415629-Why-is-Windows-Server-2008-a-better-desktop-OS-than-Windows-Vista/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/415629/Trackback.aspx</trackback:ping></item><item><title>Firefox crashed [Firefox crashed]</title><description>&lt;P&gt;I know this is not Firefox's bugzilla, but Firefox crashed with a&amp;nbsp;unhandled win32 exception&amp;nbsp;today and out of curiousity, I opened Visual Studio 2008 Professional's debugger and took a look at the assembly. Here is a bit of it:&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;66951315 mov edx,eax &lt;/P&gt;
&lt;P&gt;66951317 mov esi,eax &lt;/P&gt;
&lt;P&gt;66951319 shr esi,10h &lt;/P&gt;
&lt;P&gt;6695131C and edx,0FF0000h &lt;/P&gt;
&lt;P&gt;66951322 or edx,esi &lt;/P&gt;
&lt;P&gt;66951324 mov esi,eax &lt;/P&gt;
&lt;P&gt;66951326 and esi,0FF00h &lt;/P&gt;
&lt;P&gt;6695132C shl eax,10h &lt;/P&gt;
&lt;P&gt;6695132F or esi,eax &lt;/P&gt;
&lt;P&gt;66951331 shl esi,8 &lt;/P&gt;
&lt;P&gt;66951334 shr edx,8 &lt;/P&gt;
&lt;P&gt;66951337 or edx,esi &lt;/P&gt;
&lt;P&gt;66951339 mov dword ptr [ecx],edx &lt;/P&gt;
&lt;P&gt;6695133B pop esi &lt;/P&gt;
&lt;P&gt;6695133C ret &lt;/P&gt;
&lt;P&gt;6695133D int 3 &lt;/P&gt;
&lt;P&gt;6695133E int 3 &lt;/P&gt;
&lt;P&gt;6695133F int 3 &lt;/P&gt;
&lt;P&gt;66951340 mov eax,dword ptr [esp+4] &lt;/P&gt;
&lt;P&gt;66951344 mov ecx,dword ptr [esp+0Ch] &lt;/P&gt;
&lt;P&gt;66951348 cmp eax,dword ptr [ecx+578h] &lt;/P&gt;
&lt;P&gt;6695134E jae 66951356 &lt;/P&gt;
&lt;P&gt;66951350 mov edx,dword ptr [esp+8] &lt;/P&gt;
&lt;P&gt;66951354 mov dword ptr [eax],edx &lt;/P&gt;
&lt;P&gt;66951356 ret&lt;BR&gt;&lt;BR&gt;The second to&amp;nbsp;last line is where the problem was. It looks to me like a value was assigned to eax and then deferenced, causing an invalid pointer exception and that this issue only occurs in certain scenerios because there is a conditional deciding whether or not to do the deferencing.&lt;BR&gt;&lt;BR&gt;So something like the following is in the code:&lt;BR&gt;&lt;BR&gt;int eax, ecx,&amp;nbsp;edx, *esp;&lt;BR&gt;&lt;BR&gt;//&amp;nbsp;eax,&amp;nbsp;ecx, edx and esp&amp;nbsp;are initialized properly&lt;BR&gt;&lt;BR&gt;edx&amp;nbsp;= *(esp + c); //&amp;nbsp;c is some constant&lt;BR&gt;&lt;BR&gt;eax&amp;nbsp;= edx;&lt;BR&gt;&lt;BR&gt;if (eax &amp;lt; *esp)&lt;BR&gt;{&lt;BR&gt;&lt;BR&gt;edx = *(esp + k) // k is some constant&lt;BR&gt;&lt;BR&gt;*eax = edx //boom&lt;BR&gt;&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;Is my intrepretation of this correct or did I miss something? Also, are there not&amp;nbsp;automated tools that can check for this sort of thing?&lt;/P&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/410062/'&gt;Firefox crashed&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/410062/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/410062/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/410062/</link><pubDate>Tue, 17 Jun 2008 17:22:36 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/410062/</guid><evnet:views>189</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/410062/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I know this is not Firefox's bugzilla, but Firefox crashed with a&amp;nbsp;unhandled win32 exception&amp;nbsp;today and out of curiousity, I opened Visual Studio 2008 Professional's debugger and took a look at the assembly. Here is a bit of it:
66951315 mov edx,eax 
66951317 mov esi,eax 
66951319 shr&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/410062/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/410062/Trackback.aspx</trackback:ping></item><item><title>Strange behavior from fwrite [Strange behavior from fwrite]</title><description>If I use fwrite to write a file that contains a single 64bit binary integer, the filesize is 8 bytes, which is what I expect. If I use fwrite in a loop to write a file that contains 1000 64bit binary integers, the filesize is 8026 bytes. Where do the extra 26 bytes come from?&lt;br&gt;&lt;br&gt;This is on Windows XP SP3 using NTFS on a WD 750GB hard drive.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/408479-Strange-behavior-from-fwrite/'&gt;Strange behavior from fwrite&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/408479/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/408479-Strange-behavior-from-fwrite/</comments><link>http://channel9.msdn.com/forums/TechOff/408479-Strange-behavior-from-fwrite/</link><pubDate>Sun, 08 Jun 2008 19:31:24 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/408479-Strange-behavior-from-fwrite/</guid><evnet:views>480</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/408479/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>If I use fwrite to write a file that contains a single 64bit binary integer, the filesize is 8 bytes, which is what I expect. If I use fwrite in a loop to write a file that contains 1000 64bit binary integers, the filesize is 8026 bytes. Where do the extra 26 bytes come from?This is on Windows XP&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/408479-Strange-behavior-from-fwrite/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/408479/Trackback.aspx</trackback:ping></item><item><title>People are documenting Vista's flaws [People are documenting Vista's flaws]</title><description>&lt;a href="http://www.istartedsomething.com/taskforce/?t=all&amp;amp;p=1"&gt;http://www.istartedsomething.com/taskforce/?t=all&amp;amp;p=1&lt;/a&gt;&lt;br&gt;&lt;br&gt;Here I thought Linux had problems with user friendliness. The number of issues is just plain ugly.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/408412-People-are-documenting-Vistas-flaws/'&gt;People are documenting Vista's flaws&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/408412/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/408412-People-are-documenting-Vistas-flaws/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/408412-People-are-documenting-Vistas-flaws/</link><pubDate>Sun, 08 Jun 2008 04:56:33 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/408412-People-are-documenting-Vistas-flaws/</guid><evnet:views>786</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/408412/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>http://www.istartedsomething.com/taskforce/?t=all&amp;amp;p=1Here I thought Linux had problems with user friendliness. The number of issues is just plain ugly.in reply to People are documenting Vista's flaws</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>28</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/408412-People-are-documenting-Vistas-flaws/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/408412/Trackback.aspx</trackback:ping></item><item><title>My new toy :) [My new toy :)]</title><description>I recently brought an OCZ 64GB SATA-II SSD. I brought it because my laptop's battery life was poor, I did not want to buy a new one until my current one is five years old and buying it is a cheaper solution than buying a new laptop specifically customized for long battery life.&lt;br&gt;&lt;br&gt;The specifications for SSDs typically place their power draw (regardless of whether they are in use or not) as being greater than that of mechanical hard drives, but when a mechanical hard drive is in use, the power draw is easily an order of magnitude greater than that of a SSD. I noticed that my laptop was accessing the hard disk every few seconds, so I expect that my new SSD will be better in terms of power draw when those accesses occur. Also, I expect that the lower latencies and higher bandwidth of my SSD will make me more productive when I am working, so while the battery life might not improve significantly, the amount of stuff that I can do in that time span will.&lt;br&gt;&lt;br&gt;I plan to use my SSD for something like the next 20 years, for two reasons. One, is that its performance is so good that I would be insane to let it collect dust after I retire my current laptop. Two, it cost so much money that I feel the need to justify that expenditure and I intend to accomplish that through using my SSD for an absurdly long period of time. Given how cheap SSDs will be in the future because of early adopters like me, I will likely have second thoughts about this in 10 years, but that is the figure that I will go by for now.&lt;br&gt;&lt;br&gt;Since I plan to use my SSD for so long, I was concerned that NTFS' last access time stamp updates would wear out my SSD before I retired it. I looked up the registry setting that controlled NTFS' last access timestamp updates (NtfsDisableLastAccessUpdate) and found it in:&lt;br&gt;&lt;br&gt;
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem&lt;br&gt;&lt;br&gt;I had to create it as a DWORD value and set it to 0. While I was there, I also noticed NtfsDisable8dot3NameCreation and Win95TruncatedExtensions. I used Google to discover what they did and I promptly executed an =^ 1 on both of them. I did not like how Win95TruncatedExtensions would make del *.htm delete .html files and I saw no need for DOS 8.3 names. I also really liked the possibly of getting better filesystem performance, as was mentioned in the pages on Microsoft's website that I had found via Google.&lt;br&gt;&lt;br&gt;I made the changes and I rebooted my computer. With my SSD, Windows already booted very quickly, but with these changes, windows seemed to boot even faster. I had to restart a second time to verify my feeling that Windows was booting faster and I honestly believe that it does. If anyone using Windows XP wants better filesystem performance, I highly recommend making these changes (provided you do not use legacy software). These changes might also help on Vista, provided Microsoft did not already make them, which I doubt as Microsoft does everything it can for backwards compatibility, even to the point where it can be a bad thing.&lt;br&gt;&lt;br&gt;Next, I would love to find a way to remove the Last Access Timestamp from being shown in the properties dialog, as I do not want to see stale information. I also am going to look into disabling the Windows prefetch, as it seems like a waste of space, CPU cycles, I/O and memory when one has an a SSD.&lt;br&gt;&lt;br&gt;Any thoughts?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/405143-My-new-toy-/'&gt;My new toy :)&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/405143/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/405143-My-new-toy-/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/405143-My-new-toy-/</link><pubDate>Fri, 23 May 2008 17:13:37 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/405143-My-new-toy-/</guid><evnet:views>1227</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/405143/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I recently brought an OCZ 64GB SATA-II SSD. I brought it because my laptop's battery life was poor, I did not want to buy a new one until my current one is five years old and buying it is a cheaper solution than buying a new laptop specifically customized for long battery life.The specifications for SSDs typically place their power draw (regardless of whether they are in use or not) as being greater than that of mechanical hard drives, but when a mechanical hard drive is in use, the power draw is easily an order of magnitude greater than that of a SSD. I noticed that my laptop was accessing&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/405143-My-new-toy-/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/405143/Trackback.aspx</trackback:ping></item><item><title>&amp;quot;Understanding&amp;quot; Search Engine Enters Public Beta [&amp;quot;Understanding&amp;quot; Search Engine Enters Public Beta]</title><description>&lt;a href="http://tech.slashdot.org/article.pl?sid=08/05/13/0139226"&gt;http://tech.slashdot.org/article.pl?sid=08/05/13/0139226&lt;/a&gt;&lt;br&gt;&lt;br&gt;Which company do you think will offer the founders of this start-up big bags of money for their search technologies first, Google or Microsoft?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/403111-quotUnderstandingquot-Search-Engine-Enters-Public-Beta/'&gt;&amp;quot;Understanding&amp;quot; Search Engine Enters Public Beta&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/403111/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/403111-quotUnderstandingquot-Search-Engine-Enters-Public-Beta/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/403111-quotUnderstandingquot-Search-Engine-Enters-Public-Beta/</link><pubDate>Tue, 13 May 2008 11:08:39 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/403111-quotUnderstandingquot-Search-Engine-Enters-Public-Beta/</guid><evnet:views>744</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/403111/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&lt;a href="http://tech.slashdot.org/article.pl?sid=08/05/13/0139226"&gt;http://tech.slashdot.org/article.pl?sid=08/05/13/0139226&lt;/a&gt;&lt;br&gt;&lt;br&gt;Which company do you think will offer the founders of this start-up big bags of money for their search technologies first, Google or Microsoft?&lt;br&gt;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>5</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/403111-quotUnderstandingquot-Search-Engine-Enters-Public-Beta/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/403111/Trackback.aspx</trackback:ping></item><item><title>Using GTK+ from both Java and native C++ on Windows [Using GTK+ from both Java and native C++ on Windows]</title><description>&lt;DIV class=vbclean_msgtext id=post_message_4888327&gt;I have to write a program for my final project in my Java class. My program must be written in Java and it must be cross platform compatible (meaning it will run on two different operating systems).&lt;BR&gt;&lt;BR&gt;At the same time, I am writing a completely different program for my final project in my C++ class and I would like to write a GUI for it. I have much more flexibility in writing it than I do with my Java program, which must be strictly Java.&lt;BR&gt;&lt;BR&gt;Rather than learning two completely different APIs, I would like to use GTK+ in place of the AWT and Swing libraries for my Java program and in place of Winforms for my C++ application. I have spoken to both of my professors and this is acceptable.&lt;BR&gt;&lt;BR&gt;My question is, how do I do it? If someone could point me towards or provide me with directions for getting simple Hello World applications running in both languages on Windows using GTK+ (preferably in Visual Studio for C++ and Eclipse for Java), I should be able to work from there.&lt;/DIV&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/401559-Using-GTK-from-both-Java-and-native-C-on-Windows/'&gt;Using GTK+ from both Java and native C++ on Windows&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/401559/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/401559-Using-GTK-from-both-Java-and-native-C-on-Windows/</comments><link>http://channel9.msdn.com/forums/TechOff/401559-Using-GTK-from-both-Java-and-native-C-on-Windows/</link><pubDate>Mon, 05 May 2008 17:51:25 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/401559-Using-GTK-from-both-Java-and-native-C-on-Windows/</guid><evnet:views>1260</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/401559/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&lt;DIV class=vbclean_msgtext id=post_message_4888327&gt;I have to write a program for my final project in my Java class. My program must be written in Java and it must be cross platform compatible (meaning it will run on two different operating systems).&lt;BR&gt;&lt;BR&gt;At the same time, I am writing a completely different program for my final project in my C++ class and I would like to write a GUI for it. I have much more flexibility in writing it than I do with my Java program, which must be strictly Java.&lt;BR&gt;&lt;BR&gt;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/401559-Using-GTK-from-both-Java-and-native-C-on-Windows/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/401559/Trackback.aspx</trackback:ping></item><item><title>Someone tell Ballmer people like Windows XP [Someone tell Ballmer people like Windows XP]</title><description>&lt;a href="http://www.dailytech.com/Ballmer+Says+Customers+Dont+Want+XP+Will+Likely+Be+Discontinued+in+June/article11589.htm"&gt;http://www.dailytech.com/Ballmer+Says+Customers+Dont+Want+XP+Will+Likely+Be+Discontinued+in+June/article11589.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;He says that people do not like Windows XP. I for one like Windows XP and I do not want to see it phased out, at least not unless Vista is phased out with it.&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/399988-Someone-tell-Ballmer-people-like-Windows-XP/'&gt;Someone tell Ballmer people like Windows XP&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/399988/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/399988-Someone-tell-Ballmer-people-like-Windows-XP/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/399988-Someone-tell-Ballmer-people-like-Windows-XP/</link><pubDate>Mon, 28 Apr 2008 13:36:52 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/399988-Someone-tell-Ballmer-people-like-Windows-XP/</guid><evnet:views>1656</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/399988/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&lt;a href="http://www.dailytech.com/Ballmer+Says+Customers+Dont+Want+XP+Will+Likely+Be+Discontinued+in+June/article11589.htm"&gt;http://www.dailytech.com/Ballmer+Says+Customers+Dont+Want+XP+Will+Likely+Be+Discontinued+in+June/article11589.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;He says that people do not like Windows XP. I for one like Windows XP and I do not want to see it phased out, at least not unless Vista is phased out with it.&lt;br&gt;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>25</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/399988-Someone-tell-Ballmer-people-like-Windows-XP/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/399988/Trackback.aspx</trackback:ping></item><item><title>Ubuntu 8.04 Hardy Heron Experience [Ubuntu 8.04 Hardy Heron Experience]</title><description>&lt;div align="left"&gt;I uninstalled my old Ubuntu 8.04 Beta wubi
installation and installed the final version through Wubi today on my
Dell Inspiron E1705. Ubuntu seems to have detected all of my hardware
correctly. The only issue I had was with the wireless configuration. I
kept right clicking on the network manager icon to try to configure my
wireless settings and I was banging my head regarding how to get it to
work. Then I discovered the left click context menu and it started to
work soon after that, with WPA2 encryption.&lt;br&gt;&lt;br&gt;I went to
nyc.speakeasy.net to test my WiFi connection. My download speed
registered ~16Mbps down and ~4Mbps up. For comparison, in Windows, I
can only manage 5Mbps down and 4Mbps up. I have a 20Mbps down 5Mbps up
internet connection from Verizon, so this is fairly close to the
theoretical maximum and I was surprised that I got anywhere near it
without a wired connection.&lt;br&gt;&lt;br&gt;Firefox runs very quickly and Pidgin
is a nice compact instant messenger. I used it to talk to a classmate
from high school and I really liked it. I like Natilus' type to find
feature and it seems to be nicely integrated into Rhythmbox. Rhythmbox
cannot play my wma files, but I am trying to read them from my Windows'
My Documents folder, so that could be the cause of the problem. Since
almost all of my music is ripped from CDs I have around the house,
(with a few small portion having been purchased through online music
stores) I believe I can work around any problems Rhythmbox might have
by reripping all of the CDs and also burning the music I purchased
electronically to CDs and then ripping those.&lt;br&gt;&lt;br&gt;Installing
software on Ubuntu is not difficult, provided you know about "sudo
apt-get install" and the names of the software packages you want to
install. I typically Google that information and find it fairly
quickly. I prefer this method of installing over the Synaptic Package
Manager, which seems to be somewhat cumbersome.&lt;br&gt;&lt;br&gt;Overall, my
impression of Ubuntu is favorable. If things continue to go without
major hassles, I will probably use Ubuntu for web browsing (especially
on my laptop), email and Java development and use Windows for gaming,
Visual Studio, Macromedia Dreamweaver and Media Center. That is unless
I find some way to run Windows applications inside of Ubuntu. I will
look into using some software called WINE, which is supposed to be able to do that. If it works well (or at least better than cygwin did on Windows),
I can see myself using Windows for Media Center and Ubuntu for
everything else.&lt;br&gt;&lt;br&gt;Has anyone else tried Ubuntu 8.04?&lt;br&gt;&lt;/div&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/399677-Ubuntu-804-Hardy-Heron-Experience/'&gt;Ubuntu 8.04 Hardy Heron Experience&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/399677/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/399677-Ubuntu-804-Hardy-Heron-Experience/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/399677-Ubuntu-804-Hardy-Heron-Experience/</link><pubDate>Sun, 27 Apr 2008 03:32:29 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/399677-Ubuntu-804-Hardy-Heron-Experience/</guid><evnet:views>13253</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/399677/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&lt;div align="left"&gt;I uninstalled my old Ubuntu 8.04 Beta wubi
installation and installed the final version through Wubi today on my
Dell Inspiron E1705. Ubuntu seems to have detected all of my hardware
correctly. The only issue I had was with the wireless configuration. I
kept right clicking on the network manager icon to try to configure my
wireless settings and I was banging my head regarding how to get it to
work. Then I discovered the left click context menu and it started to
work soon after that, with WPA2 encryption.&lt;br&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>78</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/399677-Ubuntu-804-Hardy-Heron-Experience/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/399677/Trackback.aspx</trackback:ping></item><item><title>Semaphore Headaches [Semaphore Headaches]</title><description>I designed an algorithm using a flow chart that uses two semaphores that lock and release varying numbers of resources, depending on the context. Unfortunately, I cannot seem to find a semaphore implementation that allows this in C, C++ or Fortran. My algorithm will eventually be written in Fortran, but I am much more familiar with C/C++, so I would prefer to do a proof of concept in either C or C++&lt;br&gt;&lt;br&gt;I did some google searches and I found that Java supports this. Unfortunately that does not help me much as I do not have access to Java's libraries from C, C++ and/or Fortran.&lt;br&gt;&lt;br&gt;Does anyone know of any semaphore implementations in C, C++ or Fortran that allow threads to lock and release varying numbers of resources?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/399238-Semaphore-Headaches/'&gt;Semaphore Headaches&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/399238/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/399238-Semaphore-Headaches/</comments><link>http://channel9.msdn.com/forums/TechOff/399238-Semaphore-Headaches/</link><pubDate>Fri, 25 Apr 2008 02:01:21 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/399238-Semaphore-Headaches/</guid><evnet:views>691</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/399238/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I designed an algorithm using a flow chart that uses two semaphores that lock and release varying numbers of resources, depending on the context. Unfortunately, I cannot seem to find a semaphore implementation that allows this in C, C++ or Fortran. My algorithm will eventually be written in Fortran, but I am much more familiar with C/C++, so I would prefer to do a proof of concept in either C or C++&lt;br&gt;&lt;br&gt;I did some google searches and I found that Java supports this. Unfortunately that does not help me much as I do not have access to Java's libraries from C, C++ and/or Fortran.&lt;br&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/399238-Semaphore-Headaches/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/399238/Trackback.aspx</trackback:ping></item><item><title>Favorite Programming Language? [Favorite Programming Language?]</title><description>I am just curious, of the people that are here, what are your favorite programming languages and what programming languages do you use to write code?&lt;br&gt;&lt;br&gt;My favorite language is C/C++. However, I have been writing code in Java and I expect to be doing much more of it in the future because the Computer Science department removed C++ from the curriculum, opting to teach Java instead. [C]&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/Coffeehouse/398213-Favorite-Programming-Language/'&gt;Favorite Programming Language?&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/398213/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/Coffeehouse/398213-Favorite-Programming-Language/</comments><link>http://channel9.msdn.com/forums/Coffeehouse/398213-Favorite-Programming-Language/</link><pubDate>Sun, 20 Apr 2008 22:07:22 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/Coffeehouse/398213-Favorite-Programming-Language/</guid><evnet:views>3586</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/398213/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I am just curious, of the people that are here, what are your favorite programming languages and what programming languages do you use to write code?&lt;br&gt;&lt;br&gt;My favorite language is C/C++. However, I have been writing code in Java and I expect to be doing much more of it in the future because the Computer Science department removed C++ from the curriculum, opting to teach Java instead. [C]&lt;br&gt;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>49</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/Coffeehouse/398213-Favorite-Programming-Language/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/398213/Trackback.aspx</trackback:ping></item><item><title>Contemplating my final project for my C++ class [Contemplating my final project for my C++ class]</title><description>For my final project, my C++ professor has given me two options. I can either do the fifth programming assignment or propose something of similar or greater difficulty and do that instead (with my professor's approval of course).&lt;br&gt;&lt;br&gt;I could do the fifth programming assignment, but it is boring in comparsion to what I am considering doing. Before I describe what I am considering doing, let me describe how I arrived at the idea:&lt;br&gt;&lt;br&gt;A while back, I wrote a C program that searches for prime numbers of the form 2^n - 1. These are called mersenne numbers. It is very simple. It accepts either a range of exponents or a single exponent and tests their corresponding mersenne numbers for primality. To do this, it makes use of a few theorems from mathematics. The first is that if 2^n - 1 is prime, n is prime. That is to say that if n is not prime, 2^n - 1 is not prime by the law of the contrapositive. Therefore, my program implements an erathosthenes sieve, which finds all of the odd prime numbers between 2 and the largest exponent given to it. It uses a function for this, which returns an array of integers, each integer representing the primality of 32 odd numbers. It also makes use of parallelism. When given a range of exponents to test, it is designed to spawn a preset number of threads and wait for them to execute. It uses mutexes to perform syncronization between these threads. To save memory, a linked list containing the mersenne primes it finds (which are very few in number) is returned to the main function. Testing is done using something called a lucas lehmer test and arbitary precision arithmetic is implemented using the GNU Multi-Precision Library.&lt;br&gt;&lt;br&gt;Improvements that could be made to my C program would involve sorting the list, the automated detection of the number of processors avaliable (which is difficult to do in a cross platform manner) and the use of flat files or some sort of database to store information pertaining to what has been checked so it need not be checked again. To make it into something I could submit as my final project, I would have to rewrite it in C++ and use at least 3 classes (all hand-written, although I believe I am allowed to inherit from existing classes). Class wise, I believe I can make:&lt;br&gt;&lt;br&gt;A PrimeArray class that has a single constructor that takes an integer. The integer will represent its upper bound and it will perform an erathothenes sieve, storing the information in an array of integers with each integer storing information for 32 odd numbers. It will have accessor methods to check the primality of a number, even, odd or unknown, mutator methods to shrink or expand the array and a destructor.&lt;br&gt;&lt;br&gt;A List class. Given that C++ already has a list class, I am not sure if my class will extend it, wrap it, only use it in certain methods (e.g. a sort method) or not use it at all. I know that extending a class that lacks a virtual destructor is bad, as then the subclasses' destructor will not be run, so if I decide to use the existing list class and I want to do something like overload the [] operator without iterating through the entire list using pops and pushes, I will have to write my class as a wrapper.&lt;br&gt;&lt;br&gt;A Thread class to act as a wrapper for the pthreads library. After thinking about this for a while, this would be best implemented using three classes. A base threading class that encapsulates basic thread creation and destruction logic, a threadpool class that uses it (while containing logic to the detect the number of cores avaliable on a given machine) and a sub class that is specialized for the testing of mersenne prime numbers using the logic of its parent class. This would allow my program's interface to run asyncronously with my program's mathematical computations. If I do this, when the threadpool class creates a thread, it will not create a thread using some external function, but a member function and call the external function from inside that member function. The object could be initialized with (or perhaps given) a function pointer to a second external function that would be called by the last thread when it terminates, which I believe would correspond to something professional programmers call event handling. Doing that will allow me to implement a queue for the threads to which I could dynamically add additional exponents for testing as the user requests it and also allow the user to check on the status of tests being done.&lt;br&gt;&lt;br&gt;A data storage/access class, that will act as an interface between my program and where ever I choose to store records of what is prime and what is not so that my program need not perform the same calculations repeatily across sessions. If I use binary/flat files, this will have to be made thread safe.&lt;br&gt;&lt;br&gt;A mersenne class, which will contain a few private variables, a few constructors and a single static member function for primality testing. The actual lucas lehmer test could be made a private member function and the static member function could simply implements theorems that could be used to avoid some lucas lehmer tests, such as the one that states that composite exponents are composite mersenne numbers and another involving sophie germain primes. This will heavily interface with the data storage/access class such that it might be a good idea to inherit from it and perhaps use function overriding, especially since the data storage class will be restricted to storing and retrieving mersenne primes.&lt;br&gt;&lt;br&gt;Since this is C++ and not C, I will also be making use of the GNU Multi-Precision Library's C++ wrapper. If I am feeling particularly bold, I could use all of these classes and make a program that utilizes a graphical interface. Since I want this to be Unix compatible, I would be using GTK+, although I wonder whether or not that would matter considering that using a graphical interface will prevent my program from being run on my university's Unix server. Despite that, I could still take the classes, create a library that encapsulates them and use that library in two separate programs, a commandline program that can run on my university's unix server and a graphical user interface program that can run on Windows.&lt;br&gt;&lt;br&gt;Does anyone have any thoughts?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/398078-Contemplating-my-final-project-for-my-C-class/'&gt;Contemplating my final project for my C++ class&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/398078/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/398078-Contemplating-my-final-project-for-my-C-class/</comments><link>http://channel9.msdn.com/forums/TechOff/398078-Contemplating-my-final-project-for-my-C-class/</link><pubDate>Sat, 19 Apr 2008 21:13:48 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/398078-Contemplating-my-final-project-for-my-C-class/</guid><evnet:views>1946</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/398078/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>For my final project, my C++ professor has given me two options. I can either do the fifth programming assignment or propose something of similar or greater difficulty and do that instead (with my professor's approval of course).I could do the fifth programming assignment, but it is boring in comparsion to what I am considering doing. Before I describe what I am considering doing, let me describe how I arrived at the idea:A while back, I wrote a C program that searches for prime numbers of the form 2^n - 1. These are called mersenne numbers. It is very simple. It accepts either a range of&amp;#8230;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>10</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/398078-Contemplating-my-final-project-for-my-C-class/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/398078/Trackback.aspx</trackback:ping></item><item><title>What is wrong with my C++ code? [What is wrong with my C++ code?]</title><description>I am using Visual Studio 2008 Professional on Windows and G++ on Unix. My program compiles in both of them. I have the following class definition in my header file:&lt;br&gt;&lt;br&gt;template&amp;lt;class _Ty, class _Ax = allocator&amp;lt;_Ty&amp;gt; &amp;gt;&lt;br&gt;class SearchableList: public list&amp;lt;_Ty, _Ax&amp;gt;&lt;br&gt;{&lt;br&gt;&lt;br&gt;public:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int count(_Ty needle, int start = 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool inList(_Ty needle, int start = 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void cycle();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void rcycle();&lt;br&gt;&lt;br&gt;};&lt;br&gt;&lt;br&gt;I wrote the SearchableList class to extend the C++ list class because I needed more functionality than it provided and I wanted to familiarize myself with the C++ list class. This is the first time I have ever used inheritance, so it took a few hours of googling stuff and trial and error to create external member functions for the class that would compile.&lt;br&gt;&lt;br&gt;I have the member functions in a searchableList.cpp file, which has the following code:&lt;br&gt;&lt;br&gt;#include "header.h"&lt;br&gt;&lt;br&gt;template&amp;lt;class _Ty, class _Ax &amp;gt;&lt;br&gt;int SearchableList&amp;lt;_Ty, _Ax&amp;gt;::count(_Ty needle, int start)&lt;br&gt;{&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int answer = 0, i;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Make sure that starting variable is within range of list&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; start %= this-&amp;gt;size();&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ( i = 0 ; i &amp;lt; start ; i++ )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this-&amp;gt;cycle();&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (&amp;nbsp; ; i &amp;lt; this-&amp;gt;size() ; i++ )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Check to see if we have a match&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (this-&amp;gt;front() == needle) answer++;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Cycle List&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this-&amp;gt;cycle();&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return answer;&lt;br&gt;&lt;br&gt;}&lt;br&gt;&lt;br&gt;template&amp;lt;class _Ty, class _Ax &amp;gt;&lt;br&gt;bool SearchableList&amp;lt;_Ty, _Ax&amp;gt;::inList(_Ty needle, int start)&lt;br&gt;{&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (this-&amp;gt;count(needle, start) &amp;gt; 0);&lt;br&gt;&lt;br&gt;}&lt;br&gt;&lt;br&gt;template&amp;lt;class _Ty, class _Ax &amp;gt;&lt;br&gt;void SearchableList&amp;lt;_Ty, _Ax&amp;gt;::cycle()&lt;br&gt;{&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this-&amp;gt;push_back(this-&amp;gt;front());&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this-&amp;gt;pop_front();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;}&lt;br&gt;&lt;br&gt;template&amp;lt;class _Ty, class _Ax &amp;gt;&lt;br&gt;void SearchableList&amp;lt;_Ty, _Ax&amp;gt;::rcycle()&lt;br&gt;{&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this-&amp;gt;push_front(this-&amp;gt;back());&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this-&amp;gt;pop_back();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;}&lt;br&gt;&lt;br&gt;My program relies on (most) of this classes' member functions. It compiles without a problem, whenever the linker is run, I get a linker error. I have been using workarounds that rely on the parent classes' methods, but it is getting to the point where I cannot do this anymore and I must to be able to use this classes' member functions. Here is an example of a linker error that comes from using one of the member functions:&lt;br&gt;&lt;br&gt;1&amp;gt;recordArray.obj : error LNK2019: unresolved external symbol "public: bool __thiscall SearchableList&amp;lt;int,class std::allocator&amp;lt;int&amp;gt; &amp;gt;::inList(int,int)" (?inList@?$SearchableList@HV?$allocator@H@std@@@@QAE_NHH@Z) referenced in function "public: class SearchableList&amp;lt;class std::basic_string&amp;lt;char,struct std::char_traits&amp;lt;char&amp;gt;,class std::allocator&amp;lt;char&amp;gt; &amp;gt;,class std::allocator&amp;lt;class std::basic_string&amp;lt;char,struct std::char_traits&amp;lt;char&amp;gt;,class std::allocator&amp;lt;char&amp;gt; &amp;gt; &amp;gt; &amp;gt; __thiscall RecordArray::getSemesterList(class std::basic_string&amp;lt;char,struct std::char_traits&amp;lt;char&amp;gt;,class std::allocator&amp;lt;char&amp;gt; &amp;gt; const &amp;amp;)const " (?getSemesterList@RecordArray@@QBE?AV?$SearchableList@V?$&lt;br&gt;basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@&lt;br&gt;@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$&lt;br&gt;allocator@D@2@@std@@@2@@@ABV?$basic_string@DU?$char_traits&lt;br&gt;@D@std@@V?$allocator@D@2@@std@@@Z)&lt;br&gt;1&amp;gt;C:\Documents and Settings\Richard\My Documents\Visual Studio 2008\Projects\hw4\Debug\hw4.exe : fatal error LNK1120: 1 unresolved externals&lt;br&gt;&lt;br&gt;Note: I added a few newlines to the above text to make it fit in channel9's post area.&lt;br&gt;&lt;br&gt;I also get a similar linker error from G++ on Unix:&lt;br&gt;&lt;br&gt;g++ -o hw4.out main.o read.o record.o recordArray.o recordList.o searchableList.o&lt;br&gt;Undefined&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; first referenced&lt;br&gt;&amp;nbsp;symbol&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; in file&lt;br&gt;SearchableList&amp;lt;int, std::allocator&amp;lt;int&amp;gt; &amp;gt;::inList(int, int)recordArray.o&lt;br&gt;ld: fatal: Symbol referencing errors. No output written to hw4.out&lt;br&gt;collect2: ld returned 1 exit status&lt;br&gt;*** Error code 1&lt;br&gt;make: Fatal error: Command failed for target `project'&lt;br&gt;&lt;br&gt;Would someone please tell me what is wrong?&lt;br&gt;&lt;p&gt;in reply to &lt;a href='http://channel9.msdn.com/forums/TechOff/397872-What-is-wrong-with-my-C-code/'&gt;What is wrong with my C++ code?&lt;/a&gt;&lt;/p&gt;&lt;img src="http://channel9.msdn.com/397872/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://channel9.msdn.com/forums/TechOff/397872-What-is-wrong-with-my-C-code/</comments><link>http://channel9.msdn.com/forums/TechOff/397872-What-is-wrong-with-my-C-code/</link><pubDate>Fri, 18 Apr 2008 13:59:13 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/397872-What-is-wrong-with-my-C-code/</guid><evnet:views>1059</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/397872/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I am using Visual Studio 2008 Professional on Windows and G++ on Unix. My program compiles in both of them. I have the following class definition in my header file:&lt;br&gt;&lt;br&gt;template&amp;lt;class _Ty, class _Ax = allocator&amp;lt;_Ty&amp;gt; &amp;gt;&lt;br&gt;class SearchableList: public list&amp;lt;_Ty, _Ax&amp;gt;&lt;br&gt;{&lt;br&gt;&lt;br&gt;public:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int count(_Ty needle, int start = 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool inList(_Ty needle, int start = 0);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void cycle();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void rcycle();&lt;br&gt;&lt;br&gt;};&lt;br&gt;&lt;br&gt;</evnet:previewtext><dc:creator>Shining Arcanine</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://channel9.msdn.com/forums/TechOff/397872-What-is-wrong-with-my-C-code/RSS/</wfw:commentRss><trackback:ping>http://channel9.msdn.com/397872/Trackback.aspx</trackback:ping></item></channel></rss>