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
J

Jacob F W

@Jacob F W
About
Posts
23
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Switching Between Editors
    J Jacob F W

    I tried switching between editors, and an interesting thing happened: Everything I had been working on up until then and hadn't saved was erased. Now I am well aware that this is partially my fault: I should have saved it before I did anything like that. However I assumed that it was merely change the interface, not change the page and reload the article. I was given no notice that anything like that would happen. So I would appreciate if it autosaved the draft, or hell, the very least a window would pop open and warn me. I'm well aware that the Site wants to encourage the use of the new Editor, but I find it unacceptable to lose all my work without at least the courtesy of being told I was screwing myself. Thank you, Jacob

    Site Bugs / Suggestions

  • Assembly Macro Files with Visual Studio 2012
    J Jacob F W

    First off, I'm not sure where the best place to post this was, but from everyone I've talked to so far, this seems to be a problem with VS 2012 and not the assembly language. This is a problem that's been irritating me for a couple of weeks, and doesn't seem to be getting any better. So let me explain my setup. I have a C++ file where my main is located. The C++ file calls functions that I have written in assembly in a separate file. In this assembly file, there are also several assembly macros that the assembly functions use. Let me make sure I make this perfectly clear: When it is set up this way, everything works PERFECTLY. No warnings, no errors. However, when I try to take assembly macros out, and put them in a separate file, and include them in the assembly file, I get an error:

    error A2088: END directive required at end of file

    It says that I need an end directive at the end of the macro file. For simplicity's sake, here's the smallest macro:

    muldiv macro reg1, reg2
    mul reg1;
    div reg2;
    endm

    I put this macro in a file "testmac.inc", and put:

    include testmac.inc

    in the assembly file. Again, to be clear, the codeblock contains EVERYTHING that was in testmac.inc Anyways, so I put end at the end of my macro file, and it gives me a linker error, saying that my c++ and assembly functions were undefined. I have no idea what I'm doing wrong, and I've spent days on Google looking for an answer. Sadly however, google anything with "masm assembly macro" brings up useless results as the assembler is called "Microsoft Macro Assembler" I've talked to several assembly guys, and they all say that my code is just fine, and that it's likely something to do with Visual Studio. Any help would be greatly appreciated. Jacob

    Visual Studio 2015 & .NET 4.6 help visual-studio csharp c++ workspace

  • Pacific Rim
    J Jacob F W

    Didn't care about contradicting ideas. Loved the movie. My inner 10 year self was screaming with joy the entire time. :-D If you liked giant robots and monsters as a little kid, go see this movie. You will have a blast.

    The Lounge

  • Sherlock (BBC TV series)
    J Jacob F W

    Second that: one of the best crime shows I've seen. Love watching him and Alice work with each other.

    The Lounge

  • Cursor gets Reset in Code Block
    J Jacob F W

    This is one that I've noticed over the past year. I've tried different browsers, different computers, tried logging on when I'm out of town, and I still get the same problem. When I'm typing in a code block, the cursor will randomly get reset back to the beginning of the code block. Yes, I've made sure that I didn't accidentally brush the mouse and/or touchpad. I've had several times where I've ended up deleting an entire block of code because the cursor got reset, and changed a selected block of code when I was going to delete it. But the most annoying thing is that there seems to be no rhyme or reason to when it will do it. I can walk away for ten minutes and come back to find that it's done nothing, then the moment I hit a key it resets. But I've also had times where it will leave me alone for a minute or so, then the moment I stop it resets. I've already given up on several articles because I wanted to put plenty of example code, but I had to quit before I jabbed my eyes out. If you think it's a problem on my end, please give me some advice on what to do to fix it. But if it's a problem with the site, please fix it because dear God is it irritating!

    Site Bugs / Suggestions help tutorial

  • An Idea for Optimizing Class Methods
    J Jacob F W

    Could you clarify what you mean by separate Tool. Unless I'm missing something, the only practial way would be to have the compiler perform the optimizations. Are you referring to a plugin for the Compiler or something else?

    The Lounge code-review beta-testing performance tutorial learning

  • An Idea for Optimizing Class Methods
    J Jacob F W
    1. I see them often enough that it started to bother me. The project that I'm working on, a BigInteger Class, has functions that require it to check all of the data. This means the processor is having to move large chunks of data each time it performs one of these functions, even in situations where I can look back to the previous function and see that in some cases it isn't needed. 2) I don't think that it would require that much more performance out of the compiler. As Espen Harlinn pointed out, the compiler can already detect redundant function calls. All we would be doing is pointing out more redundant calls. 3) Agreed, the user would likely not notice, but then again, unless you come out with a serious bug fix or huge improvement, when do they ever? How many users are aware of improvements to your program other than a new GUI? But that doesn't mean it's not better, and if it doesn't put too much of a strain on the Compiler or on the Developer, that doesn't mean it's not worth doing. Neither am I talking about making huge changes to the source code. All we would really need would be to add an extra line in the class.

    class MyClass
    {
    ...
    void Func1();
    void Func2() inverts Func1(); // Something similar to this.
    ...
    };

    Or in the case of IsZero and SetToZero

    class Myclass
    {
    ...
    void SetToZero();
    bool IsZero() checks SetToZero();
    // bool IsZero() checks SetToZero() { true }; // Maybe a Default value as well?
    };

    Again, all it's doing is pointing out more redundant calls to the Compiler. Unless you're doing a lot of work with math, I agree that inverse cases are rare, but they do still happen, and in my case, with a BigInt class, they can be costly.

    The Lounge code-review beta-testing performance tutorial learning

  • An Idea for Optimizing Class Methods
    J Jacob F W

    True, but we're not just talking about removing multiple, unneeded calls; we're talking about not calling the function at all. The idea is that if we're able to establish a relationship between SetToZero and IsZero, then if the compiler sees that we call SetToZero, and then later on in our own code call IsZero on the same object without modifying it inbetween calls, the compiler could replace the call with a default value.

    The Lounge code-review beta-testing performance tutorial learning

  • MPL License
    J Jacob F W

    Over the last few weeks I've been looking into Open Source Licenses, trying to find one that fits my desires. So far the best fit seems to be the MPL 2.0. However I'm curious as to how well it is received by Commercial developers who use proprietary code alongside code under the MPL. So for those of you who use Open Source code alongside proprietary code, how comfortable are you using code covered under the MPL?

    The Lounge question

  • An Idea for Optimizing Class Methods
    J Jacob F W

    The goal here wouldn't be to force the compiler to make the optimization everywhere it could, merely to alert the compiler that a relationship exists, that in some situations doesn't need to be applied. If the value is needed in an operation, that is a situation where the optimization can't be made.

    // Example 1

    func1()
    {
    ...
    N = ~N;
    func2(N);
    return;
    }

    func2(MyClass P)
    {
    P = ~P;
    ...
    }

    In Example 1, if operator ~ is defined as an inverse operator to itself, the operation wouldn't be needed.

    // Example 2

    func1()
    {
    ...
    N = ~N;
    func2(N);
    Q = N * 5;

    return;
    

    }

    func2(MyClass P)
    {
    P = ~P;
    ...
    }

    In Example 2 the operation would still need to be performed, but it could be delayed, and then only done once.

    // Example 3

    func1()
    {
    ...
    N = ~N;
    if(N < 20)
    {
    Q = N + 18;
    }
    else
    {
    Q = 0;
    ++N;
    }
    func2(N);
    return;
    }

    func2(MyClass P)
    {
    P = ~P;
    ...
    }

    In Example 3, the value of N is needed between the inverse operation, and so no optimization can be made. I think most compiler's these day have fixed the issues you faced with the COBOL, or at the very least I haven't noticed it. But again, those optimizations are with the primitives. Classes are a whole other matter. The point is to provide a way for the Compiler to recognize these relationships and take advantage of them to speed things up.

    The Lounge code-review beta-testing performance tutorial learning

  • An Idea for Optimizing Class Methods
    J Jacob F W

    I have no experience with LINQ but that sounds like one way it could work.

    The Lounge code-review beta-testing performance tutorial learning

  • An Idea for Optimizing Class Methods
    J Jacob F W

    No, I haven't started working out a syntax or anything. I'm still on the "this seems like a neat idea" stage. :)

    The Lounge code-review beta-testing performance tutorial learning

  • An Idea for Optimizing Class Methods
    J Jacob F W

    True, but the idea is not to apply the optimizations everywhere, but to alert the compiler to this relationship, so that it can recognize the situations where the optimizations could be made. Few optimizations work everywhere: context usually plays a big part in determining whether or not to apply them. While possible, threads would be a situation where they optimizations could be ignored.

    The Lounge code-review beta-testing performance tutorial learning

  • An Idea for Optimizing Class Methods
    J Jacob F W

    First off let me state that I am not saying that everyone should drop what they're doing and start doing implementing this. This is just an idea that I've been thinking about for a while, seems useful, and I would like to get some feedback on it from my fellow developers. The idea is to define relationships between methods within a class, to enable the Compiler to further optimize your program for Speed/Size/etc. Here's an example. I've been toying around with a Big Integer Class. In this class I have two functions, SetToZero() and IsZero(). In case it isn't obvious, SetToZero() sets the Integer to Zero, and IsZero() checks to see if this function is Zero. What I've noticed is that in several places I will call SetToZero() and then a function or two later I call IsZero(), but I haven't changed the Integer at all. I could of course write separate methods or pass a boolean value, but why do things the easy way :) Another example would be to define Inverse Operations. For instance if I call Function1, which adds 5, then Function2, which subtracts 5, and nothing changes the object between these two calls, then neither function needs to be called. There is of course some danger. Some optimizing compilers in the past have optimized away (N << 6) >> 6, even though the final answer isn't the same in every case. But the point here is that the developer can define the relationship, rather than have the compiler guess. So let me know what you guys think. If you like it or hate it, please let me know why.

    The Lounge code-review beta-testing performance tutorial learning

  • A Quick Question on Linking.
    J Jacob F W

    Okay, I understand about circular references. That makes sense. One thing I forgot to clarify is that I'm trying to understand this in terms of Licensing. What is the proper term when one Licensed Work uses another. I should have mentioned that first. That does change a few things. Sorry. So technically, it seems Linking is one way. There does seem to be some ambiguity there though. I guess a better question would be what do the Licenses consider linking.

    The Lounge question help learning

  • A Quick Question on Linking.
    J Jacob F W

    This is going to get really confusing. Sorry in advanced. I understand what static and dynamic Linking are, and how they works, but one point that confuses me is: Does linking work in just one direction, or does it always work in both. Let me clarify. If I write some code that uses the C Standard Library, we would of course say that I am linking to it. However, would you also say that the C Standard Library links to my code, even if it doesn't use anything I wrote? One way -------- Code X uses Code Y, therefore Code X links to Code Y. Code Y does not use Code X, therefore Code Y does not link to Code X. Two way --------- Code X uses Code Y, therefore Code X links to Code Y. Code Y does not use Code X, but Code X uses to Code Y, therefore Code Y links to Code X. If Linking is Two Way, then is there a proper term for when one work uses another work. I think it would be something like "subroutine call", but I'm not sure how much that covers. Again, sorry for any confusion. Thanks for your help. Jacob W.

    The Lounge question help learning

  • The Search for an Open Source License
    J Jacob F W

    I agree. That's one of the reasons I don't want to use the GPL. I have no problem if people use my code alongside their own proprietary code. What I do want is to make sure that if they find anyway to improve my code (i.e. modify it) that they are obligated to put it under the same license.

    The Lounge algorithms help

  • The Search for an Open Source License
    J Jacob F W
    1. The LGPL does it. It generally requires you to keep the licensed code separate from the non-licensed work. That was a bad word choice on my part. My apologies. 2) I'm not that picky at the moment as to what constitutes a modification/addition. Again, I'm hoping people who might know more about this can just point me in the right direction. Many of the more elaborate licenses include a list of definitions to further clarify the License.
    The Lounge algorithms help

  • The Search for an Open Source License
    J Jacob F W

    Every now and then I see a post from someone who needs help finding a license... so I guess its time I join the club. First, I would like to mention that Yes, I have spent a while searching on Google. I've looked through the lists on the Open Source Initiative, and the Free Software Foundation. Odds are I've overlooked something, but I haven't been able to find one I think is suitable. So that's where I'm at right now. I'm hoping that someone who is more familiar with commonly used Open Source Licenses can point me in the right direction. So what I'm looking for in a license should include some of the following: 1) Semi-Viral License (i.e. all modified versions is under the same license).... 2) But, you can combine it with non-licensed work. 3) The licensed source code must be free and publicly available (even if a derivative work is commercial and/or includes non-licensed proprietary work). Again, I'm just hoping that someone can give me a lead in the right direction. Any help that you guys can give is greatly appreciated. Thanks, Jacob W. NOTE: I'm sorry if this is not the right area for this. I looked at the topics and subtopics in the other areas of the forum, and none of them seemed to fit.

    The Lounge algorithms help

  • The Search for an Open Source License
    J Jacob F W

    Every now and then I see a post from someone who needs help finding a license... so I guess its time I join the club. First, I would like to mention that Yes, I have spent a while searching on Google. I've looked through the lists on the Open Source Initiative, and the Free Software Foundation. Odds are I've overlooked something, but I haven't been able to find one I think is suitable. So that's where I'm at right now. I'm hoping that someone who is more familiar with commonly used Open Source Licenses can point me in the right direction. So what I'm looking for in a license should include some of the following: 1) Semi-Viral License (i.e. all modified versions is under the same license).... 2) But, you can combine it with non-licensed work. 3) The licensed source code must be free and publicly available (even if a derivative work is commercial and/or includes non-licensed proprietary work). Again, I'm just hoping that someone can give me a lead in the right direction. Any help that you guys can give is greatly appreciated. Thanks, Jacob W.

    Running a Business algorithms help
  • Login

  • Don't have an account? Register

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