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/

[Programming] Thread: Fixed last bug in 5 month thread

1303133353699

Posts

  • bowenbowen How you doin'? Registered User regular
    Ooo eee ooo ee oooooo

    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
  • urahonkyurahonky Registered User regular
    Oh God... Why are Modernizing Medicine and NextTech HL7 messages so vastly different?!

  • bowenbowen How you doin'? Registered User regular
    What's different about them? There are 3-4 types of HL7 messages.

    GU/NG

    Most people use the non RN version of NG.

    But some weirdos go balls to the wall with GU and RN and you've got these overly verbose HL7s that are useful to no one.

    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
  • bowenbowen How you doin'? Registered User regular
    And then you get into the types of messages, most people are dealing with ORU I think.

    But then there's all the dialects invented for talking to analyzers and all that fun jazz.

    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
  • bowenbowen How you doin'? Registered User regular
    MDM vs ORU vs ORM!

    FUN TIMES!

    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
  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    So... our repositories are hosted externally.

    I can't commit to any repositories.

    I can't do any work until this is fixed, basically.

    Woooooo. Good thing this is basically my Friday.

  • urahonkyurahonky Registered User regular
    Looking at it again... I may have overreacted. I think the issue is that MM's PID segment has patient info for 3 and 4. Whereas Nextech has Nextech info in 3 and 4.

  • htmhtm Registered User regular
    Kambing wrote: »
    ASimPerson wrote: »
    Guys, I... don't think I like C++ very much.

    I feel like I need something either higher-level or lower-level, and not this weird mishmash.

    If you're using C++ for the right reasons (not including legacy), then your only option is:

    http://www.rust-lang.org/

    Or...

    https://developer.apple.com/swift/

  • bowenbowen How you doin'? Registered User regular
    I do like swift.

    I wish I could do some dev in it right now, but I don't have access to an OSX machine.

    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
    htm wrote: »
    Kambing wrote: »
    ASimPerson wrote: »
    Guys, I... don't think I like C++ very much.

    I feel like I need something either higher-level or lower-level, and not this weird mishmash.

    If you're using C++ for the right reasons (not including legacy), then your only option is:

    http://www.rust-lang.org/

    Or...

    https://developer.apple.com/swift/

    I don't believe a language whose runtime is bound to a proprietary framework ( cocoa ) is a valid option as a replacement for C++. Even if Swift became vendor neutral it would need to have support for static libraries ( some OS don't support dynamic ), support for non 32/64bit architecture like 16bit micro controllers, support for extern C, etc.

  • htmhtm Registered User regular
    Ethea wrote: »
    htm wrote: »
    Kambing wrote: »
    ASimPerson wrote: »
    Guys, I... don't think I like C++ very much.

    I feel like I need something either higher-level or lower-level, and not this weird mishmash.

    If you're using C++ for the right reasons (not including legacy), then your only option is:

    http://www.rust-lang.org/

    Or...

    https://developer.apple.com/swift/

    I don't believe a language whose runtime is bound to a proprietary framework ( cocoa ) is a valid option as a replacement for C++. Even if Swift became vendor neutral it would need to have support for static libraries ( some OS don't support dynamic ), support for non 32/64bit architecture like 16bit micro controllers, support for extern C, etc.

    No one outside of Apple knows for sure, but I doubt that the Swift runtime requires any dependencies on Cocoa. It probably does depend on the Obj-C runtime, but that's been open source for a long time.

    But yeah, if you need to target sub-32bit architectures that don't support DLLs, then Swift isn't the language for you. I'm surprised Rust would be appropriate for that sort of embedded work, though. I've never coded anything with it, but I recall that it uses GC for managed-lifetime allocations, and has a lot of concurrency features built into its runtime. That doesn't seem entirely appropriate for 16-bit embedded development, either.

  • urahonkyurahonky Registered User regular
    I'm sitting here scrubbing PHI off of some HL7 files that we are using for test data and something depressing to me showed up. Woman who is Widowed and the diagnosis was "malignant melanoma, face". I don't know why but man that hit me hard.

  • bowenbowen How you doin'? Registered User regular
    If it makes you feel any better, malignant melanoma is usually just skin cancer on the face, usually a black lump (looks like a giant freckle, but slightly shinier).

    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
  • SmasherSmasher Starting to get dizzy Registered User regular
    Is there a way to make javascript immediately create an error dialog when it runs into any sort of problem without surrounding everything in try blocks? I keep running into stupid problems (undefined variable because the capitalization was wrong, for example) that would be easy to fix if I just knew what they were. I don't think any sort of automatic logging would work because I'm running on an emulated iPad (no, Javascript on an iPad was not my decision), and throwing an alert from window.onerror isn't working.

  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited April 2015
    I don't think Swift is dependent on Cocoa, but I also agree with Ethea for the architecture concerns.

    The golden goose for C++ continues to be incredible portability

    John Carmack has been toying with Rust lately and Has Opinions on it, mostly positive ones. I'd like to give it a spin. Nevermind. He's using Racket. Different animal. I get my R's confused.

    Jasconius on
  • InfidelInfidel Heretic Registered User regular
    Smasher wrote: »
    Is there a way to make javascript immediately create an error dialog when it runs into any sort of problem without surrounding everything in try blocks? I keep running into stupid problems (undefined variable because the capitalization was wrong, for example) that would be easy to fix if I just knew what they were. I don't think any sort of automatic logging would work because I'm running on an emulated iPad (no, Javascript on an iPad was not my decision), and throwing an alert from window.onerror isn't working.

    What's not working exactly? Is this in Safari just as a webapp, or wrapped in an app (PhoneGap etc.)?

    OrokosPA.png
  • EtheaEthea Registered User regular
    htm wrote: »
    Ethea wrote: »
    htm wrote: »
    Kambing wrote: »
    ASimPerson wrote: »
    Guys, I... don't think I like C++ very much.

    I feel like I need something either higher-level or lower-level, and not this weird mishmash.

    If you're using C++ for the right reasons (not including legacy), then your only option is:

    http://www.rust-lang.org/

    Or...

    https://developer.apple.com/swift/

    I don't believe a language whose runtime is bound to a proprietary framework ( cocoa ) is a valid option as a replacement for C++. Even if Swift became vendor neutral it would need to have support for static libraries ( some OS don't support dynamic ), support for non 32/64bit architecture like 16bit micro controllers, support for extern C, etc.

    No one outside of Apple knows for sure, but I doubt that the Swift runtime requires any dependencies on Cocoa. It probably does depend on the Obj-C runtime, but that's been open source for a long time.

    But yeah, if you need to target sub-32bit architectures that don't support DLLs, then Swift isn't the language for you. I'm surprised Rust would be appropriate for that sort of embedded work, though. I've never coded anything with it, but I recall that it uses GC for managed-lifetime allocations, and has a lot of concurrency features built into its runtime. That doesn't seem entirely appropriate for 16-bit embedded development, either.

    Thanks for the correction on Swifts dependencies.

    I know of 32/64bit OSes that don't support dynamic libraries, not just embedded systems. As far as Rust for embedded systems, the GC is an opt-in package that is not part of the core language( rust has no runtime library iirc ). I believe currently 16bit cross compilation for Rust is possible and allows you throw away the standard library ( like C++ ), the downside being you can't use any package as they all seem to want the standard library. But on the upside C to Rust and Rust to C interop is super easy with FFI.

  • bowenbowen How you doin'? Registered User regular
    Makes me want to writer a swift -> C++ parser and ignore all the cocoa nonsense to I can use swift in windows

    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
    bowen wrote: »
    Makes me want to writer a swift -> C++ parser and ignore all the cocoa nonsense to I can use swift in windows

    Good luck :biggrin:

  • SmasherSmasher Starting to get dizzy Registered User regular
    Infidel wrote: »
    Smasher wrote: »
    Is there a way to make javascript immediately create an error dialog when it runs into any sort of problem without surrounding everything in try blocks? I keep running into stupid problems (undefined variable because the capitalization was wrong, for example) that would be easy to fix if I just knew what they were. I don't think any sort of automatic logging would work because I'm running on an emulated iPad (no, Javascript on an iPad was not my decision), and throwing an alert from window.onerror isn't working.

    What's not working exactly? Is this in Safari just as a webapp, or wrapped in an app (PhoneGap etc.)?
    I'm using Phonegap/Cordova. I'm inexperienced with javascript, so for all I know I'm just doing the syntax wrong.

    Fake edit: Apparently I was missing a return value; adding "return false" to the end seems to have fixed the problem.

  • bowenbowen How you doin'? Registered User regular
    Ethea wrote: »
    bowen wrote: »
    Makes me want to writer a swift -> C++ parser and ignore all the cocoa nonsense to I can use swift in windows

    Good luck :biggrin:

    Most of the basic features exist it looks like! At least... in c++11 anyways.

    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
  • bowenbowen How you doin'? Registered User regular
    Would be a fun little open source project, hm!

    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
  • htmhtm Registered User regular
    bowen wrote: »
    Would be a fun little open source project, hm!

    The language features line up pretty well, but getting Swift modules to translate to C++ header/source files would be a huge PITA.

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    The main problem would be debugging info, since you'd have to debug autogenerated C++ code

  • ASimPersonASimPerson Cold... and hard.Registered User regular
    Ethea wrote: »
    ASimPerson wrote: »
    Guys, I... don't think I like C++ very much.

    I feel like I need something either higher-level or lower-level, and not this weird mishmash.

    Other than reflection I am generally happy with the balancing act it provides*. What are you finding to be the issue


    *: I haven't had to write a custom allocator, which can be pretty bad if you need something that is NUMA aware, or allows allocation to different memory types ( eDRAM, main system memory, etc, etc).

    Guess what, we have a custom allocator! (I didn't write it, though.)

    But yeah, like I said, I either want something more high-level like C# or something more straightforward like plain C. Maybe it's just our codebase, I dunno? But then again, if I were writing code from scratch I would probably never pick C++ unless there was a very good reason to. (And in my mind, that list of reasons is extremely short.)

  • TeaSpoonTeaSpoon Registered User regular
    Just starting to learn Python.

    I have the weirdest problem.
    print "Hello"
    raw_input("Display this")
    
    What happens is, the console shows:

    Process started >>>

    And then nothing. I hit enter or a few letters, and then the console prints "Hello" like it should, followed immediately with "Display this."

    I'm guessing that the initial blank screen is python demanding the raw_input before printing the accompanying message or even the "Hello". It took me a very long time to figure out the problem. I thought the script just wasn't running. It worked fine on CodeCademy, which uses Ace (Python 2.7; I have Python 2.7.9 installed, by the way) and doesn't require blind input up front.

    What am I doing wrong?

  • InfidelInfidel Heretic Registered User regular
    @TeaSpoon You have output buffering messing you up, you need to turn it off if you're using raw_input like that.

    Run python with the -u command line option to run unbuffered.

    OrokosPA.png
  • TeaSpoonTeaSpoon Registered User regular
    Infidel wrote: »
    @TeaSpoon You have output buffering messing you up, you need to turn it off if you're using raw_input like that.

    Run python with the -u command line option to run unbuffered.
    Thanks!

  • hippofanthippofant ティンク Registered User regular
    TeaSpoon wrote: »
    Infidel wrote: »
    @TeaSpoon You have output buffering messing you up, you need to turn it off if you're using raw_input like that.

    Run python with the -u command line option to run unbuffered.
    Thanks!

    Also, I think maybe you should use Python 3? I dunno if people have opinions on which is better, but if you're just starting, I'd figure you should start with the most recent version unless there's some reason not to?

  • a5ehrena5ehren AtlantaRegistered User regular
    ASimPerson wrote: »
    Ethea wrote: »
    ASimPerson wrote: »
    Guys, I... don't think I like C++ very much.

    I feel like I need something either higher-level or lower-level, and not this weird mishmash.

    Other than reflection I am generally happy with the balancing act it provides*. What are you finding to be the issue


    *: I haven't had to write a custom allocator, which can be pretty bad if you need something that is NUMA aware, or allows allocation to different memory types ( eDRAM, main system memory, etc, etc).

    Guess what, we have a custom allocator! (I didn't write it, though.)

    But yeah, like I said, I either want something more high-level like C# or something more straightforward like plain C. Maybe it's just our codebase, I dunno? But then again, if I were writing code from scratch I would probably never pick C++ unless there was a very good reason to. (And in my mind, that list of reasons is extremely short.)

    Speaking of C#, we should get around to starting that Aerobiz clone someday :P

  • gavindelgavindel The reason all your software is brokenRegistered User regular
    I am slowly, slowly replacing the unholy amalgamation of Javascript, Ajax, and ASP.net with a functioning .net application. And implementing unit tests for the design project. And building a ray tracer for graphics. And implementing a VPN application for cryptography. And building a network simulation.

    Nineteen more days till I graduate...

    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    If you're connected to a terminal, reading from standard input really ought to flush standard output

  • InfidelInfidel Heretic Registered User regular
    Phyphor wrote: »
    If you're connected to a terminal, reading from standard input really ought to flush standard output

    Yeah, raw_input doesn't wanna assume anything about what you're doing, but it probably should.

    OrokosPA.png
  • LD50LD50 Registered User regular
    Maybe they should pull a php and split it into 'raw_input' and 'reallyRawInput'. 'raw_input' can make a few quality of life assumptions, 'reallyRawInput' can behave the way the current raw_input behaves.

  • mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    Who in the world schedules a programming interview for 7:30?? I am...not awake.

  • PrimePrime UKRegistered User regular
    edited April 2015
    Advise please, im dealing with a clients internal security professional for the first time (none of our other clients have anything like that) and they use Veracode? I'm dealing with 2 red flags they brought up but one is bothering me.

    So without going into much detail, is using System.IO.Path.GetTempFileName() a security risk when creating a temp file name? (This case its written in VB.net).

    Prime on
  • TofystedethTofystedeth Registered User regular
    hippofant wrote: »
    TeaSpoon wrote: »
    Infidel wrote: »
    @TeaSpoon You have output buffering messing you up, you need to turn it off if you're using raw_input like that.

    Run python with the -u command line option to run unbuffered.
    Thanks!

    Also, I think maybe you should use Python 3? I dunno if people have opinions on which is better, but if you're just starting, I'd figure you should start with the most recent version unless there's some reason not to?

    The main reason is a lot of third party libraries haven't updated to be compatible with 3. But if you're not tied to using any of those, yeah, go with the latest.

    steam_sig.png
  • IncindiumIncindium Registered User regular
    edited April 2015
    Prime wrote: »
    Advise please, im dealing with a clients internal security professional for the first time (none of our other clients have anything like that) and they use Veracode? I'm dealing with 2 red flags they brought up but one is bothering me.

    So without going into much detail, is using System.IO.Path.GetTempFileName() a security risk when creating a temp file name? (This case its written in VB.net).
    I'm guessing the security risk would be the writing of files to windows temp at all and not what the filename is.

    Edit:
    I could be wrong about that...
    Read https://kurt.seifried.org/2012/03/14/creating-temporary-files-securely/

    Not windows specific but could be why they have issue with System.IO.Path.GetTempFileName() if it doesn't make unique enough filenames.

    Incindium on
    steam_sig.png
    Nintendo ID: Incindium
    PSN: IncindiumX
  • PrimePrime UKRegistered User regular
    Incindium wrote: »
    Prime wrote: »
    Advise please, im dealing with a clients internal security professional for the first time (none of our other clients have anything like that) and they use Veracode? I'm dealing with 2 red flags they brought up but one is bothering me.

    So without going into much detail, is using System.IO.Path.GetTempFileName() a security risk when creating a temp file name? (This case its written in VB.net).
    I'm guessing the security risk would be the writing of files to windows temp at all and not what the filename is.

    Edit:
    I could be wrong about that...
    Read https://kurt.seifried.org/2012/03/14/creating-temporary-files-securely/

    Not windows specific but could be why they have issue with System.IO.Path.GetTempFileName() if it doesn't make unique enough filenames.

    Hmm, but on that very website under C# they list that function. "Path.GetTempFileName()"

  • iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    edited April 2015
    I would press the hell out of them on why, exactly, Path.GetTempFileName() would be a security risk. That confuses me. I mean, if you were writing into %SYSTEMROOT%\Temp\ then sure, I can at least see an argument for that. But for the user's own %TEMP% directory? Nah.

    I'd be interested to hear their reasoning behind that.

    [ed] This seems to be their reasoning (for Java anyway), which... I dunno. I'm not sure I'm convinced that there's much of a real problem there.

    [ed Mk2] You can see what the .NET Framework does to get that filename here. (Currently line 997, but if it's not there look for "InternalGetTempFileName")

    They just call out to the Win32 "GetTempFileName" function, and they pass "0" for the "uUnique" parameter which means...
    If uUnique is zero, the function attempts to form a unique file name using the current system time. If the file already exists, the number is increased by one and the functions tests if this file already exists. This continues until a unique filename is found; the function creates a file by that name and closes it. Note that the function does not attempt to verify the uniqueness of the file name when uUnique is nonzero.

    iTunesIsEvil on
This discussion has been closed.