As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

Git Merge Squashing [Programming] Thread : Filesystems logging stuff

24567100

Posts

  • Jimmy KingJimmy King Registered User regular
    urahonky wrote: »
    Holyeeeee shit. How the fuck do you use the command-line to run a java class?

    I have a file called: "CryptoUtil". This has a method "public static void main(String []args)" and inside there it does stuff with whatever's passed it.

    I did javac CryptoUtil.java, which compiled it out to a .class file, then I did "java CryptoUtil" but then it says "NoClassDefFoundError: CryptoUtil". I swear. Java.
    I just copied and pasted your code and compiled and ran it, with the throws on there and everything. It worked fine for me. Environment issue maybe? Java classpath craziness, maybe? It seems like that should give a slightly different error, but maybe not.

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Java :rotate:

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • urahonkyurahonky Registered User regular
    Yeah I ended up just making a new class in Eclipse and putting the stuff in there that I need. I fucking hate Java command-line stuff.

    For the record I tried java -cp . CryptoUtil and it still threw that error. So very annoying.

  • bowenbowen How you doin'? Registered User regular
    I'm glad my error was taking a line out of app.config

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • InfidelInfidel Heretic Registered User regular
    @urahonky You don't have .; at the start of your CLASSPATH env, right?

    OrokosPA.png
  • bowenbowen How you doin'? Registered User regular
    Anyone ever had the displeasure of trying to crop PDF files before? I want to remove the top 200 and bottom 200 or so pixels from this PDF. I'm flexible in whatever language, but would like to avoid digging right into ghostscript.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • EndEnd Registered User regular
    This code is so so gross

    but it will work dammit

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • ecco the dolphinecco the dolphin Registered User regular
    Man

    As we try and bend qmake to do what we want and deal with dependencies properly, cmake is looking more and more enticing.

    QMMMAAKKKKEE

    Grr, even Qt has moved on from it, I think.

    Maybe we should too. Hmm....

    Penny Arcade Developers at PADev.net.
  • The AnonymousThe Anonymous Uh, uh, uhhhhhh... Uh, uh.Registered User regular
    Man

    As we try and bend qmake to do what we want and deal with dependencies properly, cmake is looking more and more enticing.

    QMMMAAKKKKEE

    Grr, even Qt has moved on from it, I think.

    Maybe we should too. Hmm....
    Not using CMake is a horrible, horrible mistake.

  • TofystedethTofystedeth Registered User regular
    bowen wrote: »
    Anyone ever had the displeasure of trying to crop PDF files before? I want to remove the top 200 and bottom 200 or so pixels from this PDF. I'm flexible in whatever language, but would like to avoid digging right into ghostscript.

    Multipage? Convert to tiff, crop, Convert back

    steam_sig.png
  • TofystedethTofystedeth Registered User regular
    To be a little more in depth, I'm sure I've grumbled her before about the project I did for my last job that was all about manipulating tiffs and turning them into pdfs. I used FreeImagePy to work with them because PIL does not support multi pages tiffs for some reason. But once I was done fiddling with them I just called a ghostscript command from the script to convert them. Didn't have to get too deep other than looking up command line flags. Imagemagick is also apparently pretty good for this kind of thing.

    I'm on my phone so hope I didn't typo too badly.

    steam_sig.png
  • EtheaEthea Registered User regular
    edited September 2013
    Man

    As we try and bend qmake to do what we want and deal with dependencies properly, cmake is looking more and more enticing.

    QMMMAAKKKKEE

    Grr, even Qt has moved on from it, I think.

    Maybe we should too. Hmm....


    Well you do have access to a CMake dev....

    Ethea on
  • ecco the dolphinecco the dolphin Registered User regular
    Ethea wrote: »
    Well you do have access to a CMake dev....

    You have no idea how tempting it is. =P

    The only reason we use qmake is because everyone already has Qt installed, so we can assume qmake exists everywhere.

    BUT

    It's driving us as0dfuio;234hklxsfy8xchjvk trying to sort out ways to tell it how to deal with build order/library dependencies properly.

    Just doing a quick search seems to indicate that cmake has this problem sorted out (or at least a way out of the mess), unlike qmake, where we're delving into unofficial methods to try and make it work.

    *sigh*

    I'll see if I can swing cmake into the build process here.

    Would mean a much more elegant out-of-tree build structure, as well.

    Penny Arcade Developers at PADev.net.
  • EtheaEthea Registered User regular
    Ethea wrote: »
    Well you do have access to a CMake dev....

    You have no idea how tempting it is. =P

    The only reason we use qmake is because everyone already has Qt installed, so we can assume qmake exists everywhere.

    BUT

    It's driving us as0dfuio;234hklxsfy8xchjvk trying to sort out ways to tell it how to deal with build order/library dependencies properly.

    Just doing a quick search seems to indicate that cmake has this problem sorted out (or at least a way out of the mess), unlike qmake, where we're delving into unofficial methods to try and make it work.

    *sigh*

    I'll see if I can swing cmake into the build process here.

    Would mean a much more elegant out-of-tree build structure, as well.

    Yeah the KDE and other people have really made CMake nice to use with Qt. Build order, and library dependencies shouldn't be an issue with CMake. I can provide an example if you give me the problem you are trying to solve.

  • ecco the dolphinecco the dolphin Registered User regular
    Ethea wrote: »
    Yeah the KDE and other people have really made CMake nice to use with Qt. Build order, and library dependencies shouldn't be an issue with CMake. I can provide an example if you give me the problem you are trying to solve.

    Yeah, it's a standard dependency issue, which frustrates me that I can't automate in qmake because it's so standard!

    Simplified:
    Main Application
    |       |
    libA    |
    |       |
    +----- libDependent
    

    Both the main app and libA depends on libDependent.

    If I change a file in libDependent, I expect libDependent to be built first, then libA to be rebuilt/relinked, then the Main Application to be rebuilt/relinked, in that order, due to the dependencies.

    Now, under Linux, I can manually tune that process for qmake, but our projects are not small, and having to manually sort out dependency trees is Silly. Really Really Silly. Under MSVC, it appears to just work, as VS appears to build the dependency tree properly across the entire solution.

    We've tried all sorts, but cannot reliably automate this process with qmake from Qt 4.x (can't quite use Qt 5.x yet, and qts, which I think is their new build system).

    I'm pretty sure cmake handles this without a problem, having seen some of the examples around.

    It's silly, isn't it? So silly. =/

    Penny Arcade Developers at PADev.net.
  • iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
  • bowenbowen How you doin'? Registered User regular
    edited September 2013
    bowen wrote: »
    Anyone ever had the displeasure of trying to crop PDF files before? I want to remove the top 200 and bottom 200 or so pixels from this PDF. I'm flexible in whatever language, but would like to avoid digging right into ghostscript.

    Multipage? Convert to tiff, crop, Convert back

    Yeah I tried that. Image Magick decided to lose alllll the quality. pdfcrop works but it's linux only. Gonna have to make myself a service.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • EtheaEthea Registered User regular
    Ethea wrote: »
    Yeah the KDE and other people have really made CMake nice to use with Qt. Build order, and library dependencies shouldn't be an issue with CMake. I can provide an example if you give me the problem you are trying to solve.

    Yeah, it's a standard dependency issue, which frustrates me that I can't automate in qmake because it's so standard!

    Simplified:
    Main Application
    |       |
    libA    |
    |       |
    +----- libDependent
    

    Both the main app and libA depends on libDependent.

    If I change a file in libDependent, I expect libDependent to be built first, then libA to be rebuilt/relinked, then the Main Application to be rebuilt/relinked, in that order, due to the dependencies.

    Now, under Linux, I can manually tune that process for qmake, but our projects are not small, and having to manually sort out dependency trees is Silly. Really Really Silly. Under MSVC, it appears to just work, as VS appears to build the dependency tree properly across the entire solution.

    We've tried all sorts, but cannot reliably automate this process with qmake from Qt 4.x (can't quite use Qt 5.x yet, and qts, which I think is their new build system).

    I'm pretty sure cmake handles this without a problem, having seen some of the examples around.

    It's silly, isn't it? So silly. =/

    Yes CMake supports that without issue. It uses a dependency graph that is built by the target_link_libraries call to determine which libraries a library/executable requires. It also does some header / include scanning to determine what files each library/executable requires. This allows it to properly support incremental builds.

  • Jimmy KingJimmy King Registered User regular
    Credit card processing companies, like stripe and braintree, should include a mode in their libs that skips the http request back to their server and the methods just return good responses automatically. That would save me a lot of hassle reverse engineering responses and then mocking out methods on http client libs.

    Stripe's might actually be documented now that I think about it.

  • RendRend Registered User regular

    I literally burst out laughing when bubble sort came up and it had a small fraction of the number of elements of the other sorts

  • DelmainDelmain Registered User regular
    Rend wrote: »

    I literally burst out laughing when bubble sort came up and it had a small fraction of the number of elements of the other sorts

    But bogo sort was so good.

  • EtheaEthea Registered User regular
    I love the sound that radix sort.

  • EndEnd Registered User regular
    edited September 2013
    Delmain wrote: »
    Rend wrote: »

    I literally burst out laughing when bubble sort came up and it had a small fraction of the number of elements of the other sorts

    But bogo sort was so good.

    you could listen to bogo sort all day, depending on how lucky you are?

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • DrunkMcDrunkMc Registered User regular
    bowen wrote: »
    Anyone ever had the displeasure of trying to crop PDF files before? I want to remove the top 200 and bottom 200 or so pixels from this PDF. I'm flexible in whatever language, but would like to avoid digging right into ghostscript.

    I'd look into iText. You may be able to use hte PdfStamper and if you go from one Rect to another PDF with a different Rect, it may auto crop it.

  • TofystedethTofystedeth Registered User regular
    bowen wrote: »
    bowen wrote: »
    Anyone ever had the displeasure of trying to crop PDF files before? I want to remove the top 200 and bottom 200 or so pixels from this PDF. I'm flexible in whatever language, but would like to avoid digging right into ghostscript.

    Multipage? Convert to tiff, crop, Convert back

    Yeah I tried that. Image Magick decided to lose alllll the quality. pdfcrop works but it's linux only. Gonna have to make myself a service.
    I had similar issues with conversion. Some combination of libtiff and ghostscript flags got me good conversions. And these were on lawn mower schematics. Had to force 300x300 our something

    steam_sig.png
  • an_altan_alt Registered User regular
    I've never ran across the radix sort before. That is a really interesting idea.

    Pony wrote:
    I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
    Xbox - PearlBlueS0ul, Steam
    If you ever need to talk to someone, feel free to message me. Yes, that includes you.
  • gjaustingjaustin Registered User regular
    an_alt wrote: »
    I've never ran across the radix sort before. That is a really interesting idea.

    It was also, IMO, the most aesthetically pleasing of the sorts.

  • EtheaEthea Registered User regular
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

  • DelmainDelmain Registered User regular
    Ethea wrote: »
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

    Because it lends itself to parallel processing really well?

  • RendRend Registered User regular
    Delmain wrote: »
    Ethea wrote: »
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

    Because it lends itself to parallel processing really well?

    It's also the only sort that can be done in O(n) time.

  • DelmainDelmain Registered User regular
    Rend wrote: »
    Delmain wrote: »
    Ethea wrote: »
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

    Because it lends itself to parallel processing really well?

    It's also the only sort that can be done in O(n) time.

    well, O(kn), where k could be large depending on what you're sorting.

  • RendRend Registered User regular
    Delmain wrote: »
    Rend wrote: »
    Delmain wrote: »
    Ethea wrote: »
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

    Because it lends itself to parallel processing really well?

    It's also the only sort that can be done in O(n) time.

    well, O(kn), where k could be large depending on what you're sorting.

    Yes, but O(kn) resolves right down to O(n) when k is a constant.

  • DelmainDelmain Registered User regular
    Rend wrote: »
    Delmain wrote: »
    Rend wrote: »
    Delmain wrote: »
    Ethea wrote: »
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

    Because it lends itself to parallel processing really well?

    It's also the only sort that can be done in O(n) time.

    well, O(kn), where k could be large depending on what you're sorting.

    Yes, but O(kn) resolves right down to O(n) when k is a constant.

    Yes, but k is not always so small that it can be considered an unimportant constant.

  • EtheaEthea Registered User regular
    Delmain wrote: »
    Ethea wrote: »
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

    Because it lends itself to parallel processing really well?

    Radix sort has mostly near neighbour communication, which is really good for a GPU. In a perfect case the task load means that each thread never actually needs to talk to another, before the final pass. Otherwise you are talking inside your warp which means you can use warp level shared memory.

  • DelmainDelmain Registered User regular
    Ethea wrote: »
    Delmain wrote: »
    Ethea wrote: »
    It is also the best performing sort operation to do on a GPU. (Or was when I researched GPU sorting)

    Because it lends itself to parallel processing really well?

    Radix sort has mostly near neighbour communication, which is really good for a GPU. In a perfect case the task load means that each thread never actually needs to talk to another, before the final pass. Otherwise you are talking inside your warp which means you can use warp level shared memory.

    I guess that makes a lot of sense, too.

  • RendRend Registered User regular
    Delmain wrote: »
    Yes, but k is not always so small that it can be considered an unimportant constant.

    Of course not! That doesn't change the uniqueness of the sort, though, and regardless of how important the constant k is, it's still not mathematically correct to include it in big-O notation, since, by definition, big-O notation is based on the limit as n approaches infinity.

  • DelmainDelmain Registered User regular
    Rend wrote: »
    Delmain wrote: »
    Yes, but k is not always so small that it can be considered an unimportant constant.

    Of course not! That doesn't change the uniqueness of the sort, though, and regardless of how important the constant k is, it's still not mathematically correct to include it in big-O notation, since, by definition, big-O notation is based on the limit as n approaches infinity.

    But there are plenty of times that Big-O runtimes are reported as O(n*m) because m is a component of the algorithm that is not trivial

  • gavindelgavindel The reason all your software is brokenRegistered User regular
    Stable sort kind of sounds like Zoidberg's whoop whoop whoop, I think.

    Also, I have my algorithms test on sorting on Tuesday, so this totally counts as study time.

    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    edited September 2013
    Delmain wrote: »
    Rend wrote: »
    Delmain wrote: »
    Yes, but k is not always so small that it can be considered an unimportant constant.

    Of course not! That doesn't change the uniqueness of the sort, though, and regardless of how important the constant k is, it's still not mathematically correct to include it in big-O notation, since, by definition, big-O notation is based on the limit as n approaches infinity.

    But there are plenty of times that Big-O runtimes are reported as O(n*m) because m is a component of the algorithm that is not trivial

    O(kn) simplifies to O(n), that is how big-O notation works. If it's truly significant then yea, go ahead and write it as O(n*m). But O(n*m) is not the same thing as O(kn), to me.

    mightyjongyo on
  • DelmainDelmain Registered User regular
    I'm just making the same point that the wiki article makes. If the keys are unique, then k is a going to be related to n, so dropping it is not fair.

    It's like saying k = logn. nlogn = kn. O(nlogn) = O(kn) = O(n)

This discussion has been closed.