VCL for PHP WTF



  • Wow, your post is a wall-o-text in the Reply window. Going to do my best here. Excuse the flames, I'm still in a bad mood.

    I agree with your points as to why programs don't get ported to Windows, but I'd like to comment on a few items:

    @Lingerance said:

    Portability. Seriously, FOSS devs usually don't give a shit about Windows, it's either a second or third class OS on the list to port to. It's a bullet point, a simple hurdle to do once, confirm it works for basic things, then it's good to go.

    I think a bigger problem is that Linux developers don't realize these things are broken. They come from a platform that has zero standards on how to do things, didn't have accessibility until recently, has never had a directory server with permissions features like Active Directory/Group Policy.

    How do you get the message out to developers to use the native widget set when the OS they're coming from doesn't even friggin' HAVE a native widget set?

    When somebody points out that things are broken, you usually end up with your argument: "oh well it's just Windows, we don't care." Yes! This is the true Open Source Philosophy(tm) as far as I see it: just throw it out and don't give a shit.

    It also makes you wonder about their goals. What's the goal of writing software if not to get people to use it? Why *wouldn't* you port to the most widely-used OS? Isn't that the point of what you're doing? Shouldn't that be step-freakin'-one? Again: I simply do not understand the open source way of thinking, not one bit.

    @Lingerance said:

    There's very little benefit to doing that from the dev's point of view. That an actually dealing with what's in the registry could be less painful (there's no way to just copy paste a path to see what the value is) so debugging what's in there could require less steps (note: it's competing against double clicking a file and reading the contents, if it's more steps it's not getting done).

    See the above statement about Group Policy. If you come from an OS without these features, you might not even know they exist in Windows.

    @Lingerance said:

    More effort than it's worth. What's a sane way to test this? Doing it on a single machine doesn't exactly mean that it'd work right in a domain.

    Nobody said it was going to be easy. Suck it up and deal with it.

    It's not like it's any different on their "home" platform-- hell it's significantly easier to find a AD to test on than to get a copy of the 10 most widely used Linux OSes. Not that they bother QAing at all, but that's another gripe.

    @Lingerance said:

    Again a deviation from something simpler, that and MS seems to change those often enough (paths in XP are different from Vista)

    If you're ever hard-coding in a path, you're doing it wrong. Saying the paths in XP are different from Vista is true, but a bigger issue is that the paths in English XP are also different than in French XP... so if you're just now coming to this realization, your software was already broken!.

    @Lingerance said:

    I don't know about what env-vars point to the correct directories but I do know that the general policy changed significantly enough.

    If you're using environment variables, you're still doing it wrong. Well, it works, but you're engaging compatibility hacks. The correct way to find these paths is through the API: SHGetFolderPath() in C++, System.Environment.SpecialFolder in .net.

    @Lingerance said:

    This is against the general Unix way of having everything the application needs for user settings in a hidden directory in the user's root.

    How do roaming profiles work in Linux? Does it just send your entire web browser cache every time you log in? There has to be more to it then this, right?

    @Lingerance said:

    The're giving SSL certs away for free now?

    Not that I know of, but you can get one for $50 a year.

    Nobody said it was going to be easy, and nobody said it was going to be cheap. Suck it up and deal with it.

    @Lingerance said:

    This isn't something that's been made obvious to me, thus I am assuming it isn't obvious to others who would be porting FOSS applications originally made for *NIX OSen to Windows. Also, is this free?

    Yes, but you need a cert first so that Microsoft can verify the crash data is going to the right project. Now what's your open source OS's excuse for not having a feature like this? It's been in Windows and OS X for a decade.

    All of the excuses are coming down to: "well, open source developers don't know about these things because they're newer than 1985." True, but really pathetic.

    @Lingerance said:

    1) Last I heard making MSIs are a bitch, something about saving a complete list of all files and registry settings before hand, doing the install then running the snapshot thing again and comparing the differences. If it's still a bitch, guess what? It's too much effort. 2) How are they going to test network installs?

    Nobody said it was going to be easy. Suck it up and deal with it.

    For point 2, well, they might have to just leave their basement and find an AD domain to test on. There's only about 15 AD domains in every city block in every country on Earth, or is that still too hard?

    Another theme developing here is, "whiiine it's tooooo haaaard! Whiiine!"

    @Lingerance said:

    I'll reiterate this again because it's important. Windows is a second or third class OS in terms of target for porting. Windows has a bad reputation with FOSS, devs aren't going to go jumping through hoops they don't have to. On top of that it isn't UNIX, which at this point every other target for porting is.

    From what you're describing, the real trouble here is that Windows (and presumably OS X, when not using X11) is significantly MORE powerful and featureful than UNIX and UNIX-alikes. Sprinkled with a significant amount of whining over how not everything is trivially easy.



  • @MiffTheFox said:

    Windows (XP/Vista/7) Home (Premium) Edition doesn't have a group policy editor. The only way to change the settings is via directly editing them in the registry.

    Out of curiousity, what makes you think that storing settings in the registry is mutually-exclusive with providing a UI to change the settings? They aren't.

    @MiffTheFox said:

    Aren't you the same user who complained about having to install additional software to unzip files, but you're perfectly fine with installing the GfW client just to play a game that doesn't even have online multiplayer?

    Yeah, because the GfW client just automatically does its thing with the game installs, and I never have to think about it. It's a totally different situation than the .zip file one. (If you wanted to use 7zip or whatever, and it was just an installer that did its think without me having to think about it, I'd be fine with that too.) But good job trying to paint me as a hypocrite.



  • @blakeyrat said:

    [quote user="MiffTheFox"]Windows (XP/Vista/7) Home (Premium) Edition doesn't have a group policy editor. The only way to change the settings is via directly editing them in the registry.

    Out of curiousity, what makes you think that storing settings in the registry is mutually-exclusive with providing a UI to change the settings? They aren't.[/quote]

    It's not of course. It's just that Microsoft decides to make you install an "Ultimate" version to get access to the UI, while still respecting the settings in the registry.



  • @blakeyrat said:

    Wow, your post is a wall-o-text in the Reply window
    So was yours, and so is this one.

    @blakeyrat said:

    How do you get the message out to developers to use the native widget set when the OS they're coming from doesn't even friggin' HAVE a native widget set?
    Technically, X has a widget set. Windows 3.11's is better though. Other than that GTK and Qt are the widget sets. They can be made to look like the other (to the point where the themes transfer to both at once in some cases).

    @blakeyrat said:

    The correct way to find these paths is through the API: SHGetFolderPath() in C++, System.Environment.SpecialFolder in .net.
    Again, this isn't something that's common knowledge. It's unobvious. How could they put effort into something that they don't know is there? Hell, plenty of applications for Windows don't even do this.

    @blakeyrat said:

    Nobody said it was going to be easy, and nobody said it was going to be cheap. Suck it up and deal with it.
    That's a strike against Windows. Deving for every other OS is free after purchasing the basic home OS. Yet to develop for Windows with support for AD/GPOs and whatever the hell else they can't have any random Windows box, they have to have specific versions. One of the strengths of FOSS is anyone can pick it up. Asking for an infrastructure for all these tests when it isn't part of the basic home OS is ridiculous. Edit: Going to clarify this in-case it gets misread. As it stands you can do Windows dev on XP/Vista/7 Home/Basic, but none of those support GPOs. To get an OS that's suitable for GPO testing means having the foresight to have gotten that OS variant or they'd have to acquire it afterwards. Note that with making sure it works on a specific distro the package maintainer usually does that unless one of the lead devs already uses that specific distro. The devs themselves test on their machines, if it's a larger project someone might have setup a nice automated test suite, but that is very uncommon.

    @blakeyrat said:

    Yes, but you need a cert first so that Microsoft can verify the crash data is going to the right project. Now what's your open source OS's excuse for not having a feature like this? It's been in Windows and OS X for a decade.
    There are FOSS frameworks for this. Firefox has one, Ubuntu has one. The're uncommon though since a debugger usually suffices.

    @blakeyrat said:

    All of the excuses are coming down to: "well, open source developers don't know about these things because they're newer than 1985." True, but really pathetic.
    Not all. The two others are FOSS is done on the cheap (effort is put into what the devs find useful instead of burning effort porting to a very foreign OS, FOSS gets done because the devs have an itch, and making the software deals with the itch) and Windows is hostile to FOSS in general and that's reflected back in FOSS devs' attitude towards them, and this sudden "niceness" that occasionally surfaces reeks of the first two Es.

    @blakeyrat said:

    It's not like it's any different on their "home" platform-- hell it's significantly easier to find a AD to test on than to get a copy of the 10 most widely used Linux OSes.
    Care to elaborate? Exactly how is an AD setup that any joe random could test with exactly common? Where are they advertised?

    @blakeyrat said:

    How do roaming profiles work in Linux? Does it just send your entire web browser cache every time you log in? There has to be more to it then this, right?
    /home/ gets pointed to an NFS share or something like that, or they get a directory that they just make symlinks to as needed. As for the cache (/var)/tmp/ exists for a reason, storing the cache elsewhere is moronic.



  • @MiffTheFox said:

    @blakeyrat said:
    @MiffTheFox said:
    Windows (XP/Vista/7) Home (Premium) Edition doesn't have a group policy editor. The only way to change the settings is via directly editing them in the registry.

    Out of curiousity, what makes you think that storing settings in the registry is mutually-exclusive with providing a UI to change the settings? They aren't.

    It's not of course. It's just that Microsoft decides to make you install an "Ultimate" version to get access to the UI, while still respecting the settings in the registry.

    I have no idea what you're talking about here, and I think you're completely missing my point:

    The settings are in the freakin' SETTINGS dialog of the program.

    You don't need to use the Group Policy UI. The reason most versions of Windows don't include it is because it's a tool for system administrators only.



  • @blakeyrat said:

    UI rage
    All these issues would not be a problem if the application properly implemented the Scroll Lock key.



  • @Lingerance said:

    That's a strike against Windows. Deving for every other OS is free after purchasing the basic home OS.

    Same with Windows.

    @Lingerance said:

    Yet to develop for Windows with support for AD/GPOs and whatever the hell else they can't have any random Windows box, they have to have specific versions.

    Not to develop support for it, but to QA the support, yes. Just like to QA a scanner, you need to physically have the scanner on-hand.

    @Lingerance said:

    One of the strengths of FOSS is anyone can pick it up. Asking for an infrastructure for all these tests when it isn't part of the basic home OS is ridiculous.

    If you don't care about doing it right, then don't do it at all. If you do care about doing it right, then you have hoops to jump through-- just as you would with Linux or OS X or any other OS ever. I don't understand why this concept is so hard. I honestly don't.

    I'm sorry it's not easy. I'm sorry it's not entirely free. I'm sorry you might have to leave the comfort of your house and talk to other human beings. I apologize. But the fact remains: if you want to build good Windows software, you need to do those things.

    @Lingerance said:

    There are FOSS frameworks for this. Firefox has one, Ubuntu has one. The're uncommon though since a debugger usually suffices.

    The debugger only helps if you can reproduce the crash.

    @Lingerance said:

    Windows is hostile to FOSS in general

    Explain?

    @Lingerance said:

    and this sudden "niceness" that occasionally surfaces reeks of the first two Es.

    I'm going to assume by "first two Es" you're referring to that stupid saying "embrace, extend, extinguish." Yes?

    The first two Es are the exact same thing you'd expect a company genuinely excited about open source to do, embrace and extend it. So I really don't understand why Microsoft embracing and extending open source is a bad thing. [sarcasm]It couldn't just be irrational hatred of Microsoft, could it?[/sarcasm]

    @Lingerance said:

    Care to elaborate? Exactly how is an AD setup that any joe random could test with exactly common? Where are they advertised?

    I personally have access to one on the 14th floor of this building. Pretty much any medium/large company, and many small ones, have active directories. The fact that you're posting here means you probably know at least one AD admin, yes? Just phone them up and ask if you can borrow a workstation to test your software.

    @Lingerance said:

    /home/ gets pointed to an NFS share or something like that, or they get a directory that they just make symlinks to as needed. As for the cache (/var)/tmp/ exists for a reason, storing the cache elsewhere is moronic.

    I thought tmp wasn't persistent, meaning it gets deleted on reboot.

    In any case, you're saying roaming profiles don't exist in Linux. Storing a user's home directory to a fileshare isn't roaming profiles. Is that really the case?



  • @ender said:

    BZip2 is pretty terrible - it's bad enough that it started being displaced by XZ (which is based on the LZMA SDK) even before it came out of beta stage.

    Well, bzip2 is better then gzip, and gzip uses the same compression as ZIP, right? So a zipped dump would be even bigger.



  • @blakeyrat said:

    I thought tmp wasn't persistent, meaning it gets deleted on reboot.

    /tmp/ is not persistent, /var/tmp is persistent. Choose according to needs.

    @blakeyrat said:
    In any case, you're saying roaming profiles don't exist in Linux. Storing a user's home directory to a fileshare isn't roaming profiles. Is that really the case?

    Okay, now THAT's ridiculous. You find Windows roaming profiles, a.k.a. "copy all the profile data and registry from the server to local workstation at login, overwrite data on server at logout", causing hundreds of MB of copy traffic AND making two login sessions start with the same stale data with the last one to log out overwrite the whole state, BETTER THAN always up to date shared profile area? See, in Unix world a logon session is just a process like anyone else. There's no binary registry, there's no problems with many simultaneous copies of app using same data... nothing.



  • @blakeyrat said:

    How do roaming profiles work in Linux?
    They don't - the usual way to share profiles on *nix is to use a NFS mount for /home (or just for /home/user). Given all the trouble roaming profiles cause on Windows, I'm not sure if this is a better or worse approach (I find it's significantly easier to just redirect certain folders to a shared directory on Windows).@Lingerance said:
    How could they put effort into something that they don't know is there?
    They don't - they use a library that abstracts it for them (GLib does it, and so does Qt).



  • @bannedfromcoding said:

    @blakeyrat said:
    I thought tmp wasn't persistent, meaning it gets deleted on reboot.

    /tmp/ is not persistent, /var/tmp is persistent. Choose according to needs.

    I did not know that, thanks.

    @bannedfromcoding said:

    Okay, now THAT's ridiculous. You find Windows roaming profiles, a.k.a. "copy all the profile data and registry from the server to local workstation at login, overwrite data on server at logout", causing hundreds of MB of copy traffic AND making two login sessions start with the same stale data with the last one to log out overwrite the whole state, BETTER THAN always up to date shared profile area?

    Ugh. People still aren't getting the point.

    It doesn't matter if the feature is good, it doesn't matter if it's widely-used, the point is that the OS supports it, and thus a correctly-written Windows program also supports it. Period. People are making this too complicated.

    @bannedfromcoding said:

    See, in Unix world a logon session is just a process like anyone else. There's no binary registry, there's no problems with many simultaneous copies of app using same data... nothing.

    Actually, part of the point of the Registry is to handle multiple apps writing to the same configuration at the same time. Among other advantages. See: Raymond Chen's explanation.



  • @blakeyrat said:

    It also makes you wonder about their goals. What's the goal of writing software if not to get people to use it? Why wouldn't you port to the most widely-used OS? Isn't that the point of what you're doing? Shouldn't that be step-freakin'-one? Again: I simply do not understand the open source way of thinking, not one bit.

    According to a [url=http://opensource.mit.edu/papers/lakhaniwolf.pdf]2003 study[/url], the top three reasons for contribution to free/open source software projects are 1) satisfying your needs (in which case you usually don't give a crap about usability), 2) enjoying programming (in which case you don't give a crap about systems you don't yourself use), and 3) improving your programming skills (in which case you might give a crap, but then again, you might not).



  • @blakeyrat said:

    I think a bigger problem is that Linux developers *don't realize these things are broken*. They come from a platform that has zero standards on how to do things, didn't have accessibility until recently, has never had a directory server with permissions features like Active Directory/Group Policy.

    You do know most of the features from AD are readily available for linux right? and for the most part have been available for longer then AD hasbeen around. I've no doubt that AD is more polished since most of these services for *NIX where written in the 80s and as such are archaic as fuck. But they are there, and have been before microsoft decided they where cool and wanted to do it better. (and probably netware)

     



  • @superjer said:



    Fact: you're going to have to open some shitty-ass RAR or something eventually.

    No I'm not, belive it or not WinRAR will open anything I need it to open since I wont waste my time downloading anything in a format other than I mentioned in my earlier post.

    @superjer said:



    I don't know how many times I've had to cancel the default Windows unzipper thingy after waiting for 5 minutes. Then try with 7-zip and it's done in 5 seconds.

    I dont recall saying I use the default Windows decompression tool, but I have used it and have yet to notice it being nearly as slow as you claim.

    @superjer said:

    It's actually faster to go get, install, and use 7-zip than to wait for Windows to unzip large archives.

    Once again I've never noticed it being that slow so you must have a POS machine

    @superjer said:


    So shut up.

    Not even woth a comment to that one



  • @PsychoCoder said:

    Once again I've never noticed it being that slow so you must have a POS machine
    I've had this happen on several machines, from slower Pentiums 4 to Core2 Quads. Windows built-in support is fine for decompressing small files, but the moment you want to do anything with a several hundred MB archive, it slows down to unusability.



  • @Lingerance said:

    @blakeyrat said:
    This means, sorry open source freaks, but you gotta use the registry.
    There's very little benefit to doing that from the dev's point of view. That an actually dealing with what's in the registry could be less painful (there's no way to just copy paste a path to see what the value is)
    Wrong, there are various. The most sensible is to download the MS free tool for the job, regjump - all 40kb of it.

    @Lingerance said:

    The're giving SSL certs away for free now?
    Yes.

    @Lingerance said:

    Last I heard making MSIs are a bitch, something about saving a complete list of all files and registry settings before hand, doing the install then running the snapshot thing again and comparing the differences.
    It's not ridiculously easy, but it's not hard - say, on a par with creating a new CD image in any popular imaging program. To do it manually for anything other than the most trivial software would be a complete faff, but there are tools to do the job for you which make it simple.

    @MiffTheFox said:

    Windows (XP/Vista/7) Home (Premium) Edition doesn't have a group policy editor. The only way to change the settings is via directly editing them in the registry.
    Half right. No admin tools as standard, but you can simply install them.

    @MiffTheFox said:

    @blakeyrat said:

    @MiffTheFox said:
    So suddenly, if I want to disable a feature in IE I can't do so without loosing Firefox's corresponding feature.

    Which feature are you talking about?

    I seem to recall disabling IE from downloading files until Firefox wouldn't let me download either.

    Windows has settings for the internet connection, and browser specific settings. If you change your connection settings, that affects all programmes accessing the internet via that connection. If you change the browser settings, that only affects the browser. The only confusing part is that you can access the connection settings from within IE.



  • From http://www.qadram.com/vcl4php/vcldoc/VCL/_rtl.inc.php.html#functiontextToHtml:

    @VCL for PHP Reference said:

    string textToHtml( string $text, [string $charset = null])

    Converts plain text to html

    This function takes plain text as input, including carriage returns and non html chars, and returns the text in HTML form, by changing carriage returns to
    and all non html chars exchanged by their corresponding entity.

    HTML escaping fail in documentation for an HTML escaping function. Nice!



  • @davedavenotdavemaybedave said:

    @Lingerance said:
    The're giving SSL certs away for free now?
    Yes.

    Not quite, actually. You need to be at least "class 2" to get a code signing cert, and that ain't free!



  • @Enterprise Architect said:

    @davedavenotdavemaybedave said:
    @Lingerance said:
    The're giving SSL certs away for free now?
    Yes.
    Not quite, actually. You need to be at least "class 2" to get a code signing cert, and that ain't free!

    The most amusing part of that: apparently you can get an Object Code [b]Singing[/b] certificate that way. I'd love to have one of those.



  • @blakeyrat said:

    At least if it has the GfW logo, I know it's not going to crash every 10 minutes.

    HAHAHAHAHAHA no. You've obviously never played played Gears of War on a PC; People Can Fly Software should've been nuked for that console port abortion.



  • @The_Assimilator said:

    @blakeyrat said:
    At least if it has the GfW logo, I know it's not going to crash every 10 minutes.

    HAHAHAHAHAHA no. You've obviously never played played Gears of War on a PC; People Can Fly Software should've been nuked for that console port abortion.

     

     

    Yeah, or how about Fallout: New Vegas?



  • @Bumble Bee Tuna said:

    @The_Assimilator said:

    @blakeyrat said:
    At least if it has the GfW logo, I know it's not going to crash every 10 minutes.

    HAHAHAHAHAHA no. You've obviously never played played Gears of War on a PC; People Can Fly Software should've been nuked for that console port abortion.

     

     

    Yeah, or how about Fallout: New Vegas?

     

    I was just going to mention Fallout 3, wherein integrating it with GfW Live causes it to crash every 10 minutes, when it didn't before. GfW Live used to be the only legitimate way to get the DLC, so when a new one came out, many people would install GfW Live, download the DLC, copy the content somewhere else, then uninstall GfW Live so that the game would work properly again.



  • @Someone You Know said:

    @Bumble Bee Tuna said:

    @The_Assimilator said:

    @blakeyrat said:
    At least if it has the GfW logo, I know it's not going to crash every 10 minutes.

    HAHAHAHAHAHA no. You've obviously never played played Gears of War on a PC; People Can Fly Software should've been nuked for that console port abortion.

     

     

    Yeah, or how about Fallout: New Vegas?

     

    I was just going to mention Fallout 3, wherein integrating it with GfW Live causes it to crash every 10 minutes, when it didn't before. GfW Live used to be the only legitimate way to get the DLC, so when a new one came out, many people would install GfW Live, download the DLC, copy the content somewhere else, then uninstall GfW Live so that the game would work properly again.

    Ok, fair enough. None of the games I've played that had the GfW logo were unstable, but I guess some are. Oh well.

    I played Gears and Fallout 3 on Xbox, motto: "the platform that doesn't crash". I haven't played New Vegas yet, I need to get through Halo Reach first, and I've been distracted by Global Alliance.

    (I also did multiplayer network testing for Gears when I was part of the TNT group at Microsoft. Got my name in the credits. Which is weird because I barely touched it-- I tested the shit out of Crackdown and Flight Sim X and don't have my name in the credits of those.)



  • @The_Assimilator said:

    @JakubLedl said:

    Well, thats the best part :) This is a library that's being shipped with RadPHP XE - a 300$ PHP IDE by <font size="7">Embarcadero</font>.

    TRWTF is highlighted in the above sentence. This is the company that thought buying Borland was a good idea, remember?

     

    OK, research fail here.  Embarcadero didn't buy Borland.  They bought Borland's developer tools division, and it's thriving under their leadership.  After that, Borland died of natural causes (namely, their stock price going below $1) and whatever was left was bought out by some "corporate graveyard" company no one's ever heard of.



  • @blakeyrat said:

    Wow, your post is a wall-o-text in the Reply window. Going to do my best here. Excuse the flames, I'm still in a bad mood.

    I agree with your points as to why programs don't get ported to Windows, but I'd like to comment on a few items:

    @Lingerance said:

    Portability. Seriously, FOSS devs usually don't give a shit about Windows, it's either a second or third class OS on the list to port to. It's a bullet point, a simple hurdle to do once, confirm it works for basic things, then it's good to go.

    I think a bigger problem is that Linux developers don't realize these things are broken. They come from a platform that has zero standards on how to do things, didn't have accessibility until recently, has never had a directory server with permissions features like Active Directory/Group Policy.

    How do you get the message out to developers to use the native widget set when the OS they're coming from doesn't even friggin' HAVE a native widget set?

    When somebody points out that things are broken, you usually end up with your argument: "oh well it's just Windows, we don't care." Yes! This is the true Open Source Philosophy(tm) as far as I see it: just throw it out and don't give a shit.

    It also makes you wonder about their goals. What's the goal of writing software if not to get people to use it? Why *wouldn't* you port to the most widely-used OS? Isn't that the point of what you're doing? Shouldn't that be step-freakin'-one? Again: I simply do not understand the open source way of thinking, not one bit.

     

    No, that's not the Open Source Philosophy(tm), it's the FSF Free Software Philosophy(tm), and it's not based on getting people to use it.  It's based on forcing proprietary software developers to bow before their obviously superior ideology.  Any and every other goal or purpose is secondary to this.



  • @Enterprise Architect said:

    From http://www.qadram.com/vcl4php/vcldoc/VCL/_rtl.inc.php.html#functiontextToHtml:

    @VCL for PHP Reference said:

    string textToHtml( string $text, [string $charset = null])

    Converts plain text to html

    This function takes plain text as input, including carriage returns and non html chars, and returns the text in HTML form, by changing carriage returns to
    and all non html chars exchanged by their corresponding entity.

    HTML escaping fail in documentation for an HTML escaping function. Nice!

     

    Umm... what am I missing?  I looked at both your post and the linked documentation, just in case CS mangled your copy-paste or something, and I don't see any HTML escaping fail anywhere.



  • This function takes plain text as input, including carriage returns and non html chars, and returns the text in HTML form, by changing carriage returns to
    and all non html chars exchanged by their corresponding entity.
    This should probably read:
    This function takes plain text as input, including carriage returns and non html chars, and returns the text in HTML form, by changing carriage returns to <br> and all non html chars exchanged by their corresponding entity.


  • @Enterprise Architect said:

    This function takes plain text as input, including carriage returns and non html chars, and returns the text in HTML form, by changing carriage returns to <br /> and all non html chars exchanged by their corresponding entity.
    XHTMLTFY



  • @Mason Wheeler said:

    @The_Assimilator said:

    @JakubLedl said:

    Well, thats the best part :) This is a library that's being shipped with RadPHP XE - a 300$ PHP IDE by <font size="7">Embarcadero</font>.

    TRWTF is highlighted in the above sentence. This is the company that thought buying Borland was a good idea, remember?

     

    OK, research fail here.  Embarcadero didn't buy Borland.  They bought Borland's developer tools division, and it's thriving under their leadership.  After that, Borland died of natural causes (namely, their stock price going below $1) and whatever was left was bought out by some "corporate graveyard" company no one's ever heard of.

    My point was that spending money on anything Borland-releated is a supremely horrifying decision. Delphi was obsoleted by .NET in 2002, yet here in 2010 we have a bunch of dumb fucks trying to revive it by shoehorning Object Pascal into .NET and PHP? Just let it fucking die already so that future developers don't have to be subjected to its extreme brand of shittiness.



  • @The_Assimilator said:

    My point was that spending money on anything Borland-releated is a supremely horrifying decision. Delphi was obsoleted by .NET in 2002, yet here in 2010 we have a bunch of dumb fucks trying to revive it by shoehorning Object Pascal into .NET and PHP? Just let it fucking die already so that future developers don't have to be subjected to its extreme brand of shittiness.

    Again, your research is supremely spotty.  1) Delphi was not "obsoleted" by Microsoft developing a standard Microsoft-style cheap ripoff of it with half the features implemented wrong and calling it the future of development by royal fiat.  2) No one's shoehorning Object Pascal into PHP.  The name "Delphi for PHP" was rather unfortunate because it confused the issue, but there's no actual Delphi code involved in it.  Just PHP, HTML, JS and CSS.  The name was supposed to convey the idea that it would make PHP development as eay as Delphi makes desktop development, but it didn't work so well, which is why Embarcadero changed the name.  3) No one's trying to "revive" Delphi by shoehorning it into .NET.  Borland tried to shoehorn Delphi into .NET in the beginning, and that was a huge flop.  That project is now as dead as Borland.  There's a new Object Pascal for .NET system out there by RemObjects.  It's *mostly* compatible with Delphi, but with a few significant exceptions that really make classify it as a separate but similar language.

    As for letting things die already, why don't we start with C?  In a sane world the C language would have been dead by 1989 after the Morris Worm demonstrated that it's fundamentally unsuitable for its intended purpose.  Security holes would not be something considered inevitable that needs to be patched on a monthly basis, and the next 20+ years of programmers would never have been subjected to all of its horrible, ugly derivatives.  Pascal got imperative programming right before C got it all wrong, and it continues to be an exceptionally productive language, better than anything in the .NET world.  The only significant feature that's come out of .NET that could possibly improve Delphi is LINQ, which I'd love to see added in a future version.



  • @Mason Wheeler said:

    In a sane world the C language would have been dead by 1989 after the Morris Worm demonstrated that it's fundamentally unsuitable for its intended purpose.  Security holes would not be something considered inevitable that needs to be patched on a monthly basis, and the next 20+ years of programmers would never have been subjected to all of its horrible, ugly derivatives.

    Even the dozens of types of security holes that don't have anything to do with buffer overruns?

    @Mason Wheeler said:

    Pascal got imperative programming right before C got it all wrong, and it continues to be an exceptionally productive language, better than anything in the .NET world.

    Wow.

    First of all, Pascal exists in the .NET world, by your own admission.

    Secondly, that's a huge-ass [citation needed] there.



  • @blakeyrat said:

    @Mason Wheeler said:
    In a sane world the C language would have been dead by 1989 after the Morris Worm demonstrated that it's fundamentally unsuitable for its intended purpose.  Security holes would not be something considered inevitable that needs to be patched on a monthly basis, and the next 20+ years of programmers would never have been subjected to all of its horrible, ugly derivatives.

    Even the dozens of types of security holes that don't have anything to do with buffer overruns?

    Dozens?  Really?  Well, obviously avoiding C won't do much to prevent SQL injection attacks, or a whole class of vulnerabilities that can be lumped together and classified as "social engineering" or "user stupidity," but when it comes to software level vulnerabilities in operating systems and network software, you've basically got two kinds of attacks.  Buffer overruns, (or string-format attacks, which are just a slightly different flavor of the same basic problem,) and programmer stupidity, the sort of stuff we see on this site all the time.

    A stupid programmer can and will write bad code in any language. Again, just look at this site for the proof. There's nothing you can do to stop that, besides keeping the stupid programmers as far away from a compiler as possible.  But even experienced, talented coders still get bounds checking and buffers wrong.  Look at the Android vulnerability report that just came out.  22 years after the Morris Worm, people are [i]still[/i] releasing C-based operating systems that are full of buffer overrun vulnerabilities!  Building any network-facing software in C, or any other language without built-in bounds checking at the language level, (funny how all the prominent examples tend to have C in the name,) ought to be regarded as an act of criminal negligence!  Heaven knows it's been responsible for enough billions of dollars of damage to be worth taking someone to court over!

    @Mason Wheeler said:
    Pascal got imperative programming right before C got it all wrong, and it continues to be an exceptionally productive language, better than anything in the .NET world.

    Wow.

    First of all, Pascal exists in the .NET world, by your own admission.

    Secondly, that's a huge-ass [citation needed] there.

    Sorry, I should have been more specific.  Delphi, the native code version, is more productive than any of the .NET alternatives.  (Though if you have to go the .NET route, Delphi Prism is probably your best bet.)  And... citation needed?  Really?  Even if I gave one, (or ten, or a hundred,) if you weren't willing to accept it you'd just end up dismissing it as "biased" anyway.

    As Paul Graham loves to say about Lisp, if people actually understood how Delphi makes them so much more productive they'd be using it already.



  • @Mason Wheeler said:

    And... citation needed?  Really? 

    You obviously don't use Wikipedia much. [Citation needed] means 'I want to cast doubt on what you are saying, but I have nothing to back my point up with, so I'll settle for making it look non-authoritative'.



  • @davedavenotdavemaybedave said:

    @Mason Wheeler said:
    And... citation needed?  Really? 

    You obviously don't use Wikipedia much. [Citation needed] means 'I want to cast doubt on what you are saying, but I have nothing to back my point up with, so I'll settle for making it look non-authoritative'.

    Oh, I know what it means.  I just find it a bit silly to see someone using it on The Daily WTF.



  • @Mason Wheeler said:

    Oh, I know what it means. 

    [Citation needed].



  • @Mason Wheeler said:

    But even experienced, talented coders still get bounds checking and buffers wrong.  Look at the Android vulnerability report that just came out.  22 years after the Morris Worm, people are still releasing C-based operating systems that are full of buffer overrun vulnerabilities!

    Oh I fully agree with your sentiment. Using a non-memory-managed language in 2010 is fucking ridiculous, and seeing buffer overrun errors in 2010 is fucking ridiculous. I've said as much myself on these forums. I just think you're way over-stating the case.

    @Mason Wheeler said:

    As Paul Graham loves to say about Lisp, if people actually understood how Delphi makes them so much more productive they'd be using it already.

    Two points:

    1) Does this mean the majority of programmers in the world, using Java and C#, are all just idiots? (Believe me, I used my share of Pascal back when it was the go-to language on Classic MacOS, and I never was impressed-- I switched to C pretty much as soon as I got the chance. And using Pascal-style strings in C is a pain in the ass.)

    2) People make similar claims about Lotus Notes.



  • @blakeyrat said:

    @Mason Wheeler said:
    But even experienced, talented coders still get bounds checking and buffers wrong.  Look at the Android vulnerability report that just came out.  22 years after the Morris Worm, people are still releasing C-based operating systems that are full of buffer overrun vulnerabilities!

    Oh I fully agree with your sentiment. Using a non-memory-managed language in 2010 is fucking ridiculous, and seeing buffer overrun errors in 2010 is fucking ridiculous. I've said as much myself on these forums. I just think you're way over-stating the case.

    I didn't say anything about memory management.  You can't write an operating system in managed code; somewhere there has to be a layer of real code with real pointers doing real work.  Even the various so-called "managed OS" research projects can't really do it, because it's impossible.  They have to cheat by writing a VM in low-level code that loads the managed OS.

    @Mason Wheeler said:
    As Paul Graham loves to say about Lisp, if people actually understood how Delphi makes them so much more productive they'd be using it already.

    Two points:

    1) Does this mean the majority of programmers in the world, using Java and C#, are all just idiots?

    No.  It's a common mistake to confuse stupidity and ignorance, but the two are separate concepts.  The majority of programmers in the world, using Java and C#, use them because that's what they learned in school.  The most common reaction I tend to get, when I tell other programmers that I use Delphi, isn't "oh, that's not good," it's "what's that?"  Even most of the ones who have heard about it don't know much about what it is.  You'd be surprised how many people today think Delphi is some database language, ala FoxPro or Clipper.

    (Believe me, I used my share of Pascal back when it was the go-to language on Classic MacOS, and I never was impressed-- I switched to C pretty much as soon as I got the chance.

    I remember Classic Mac Pascal.  Great language.  That was when I first started to finally understand the programming concepts that never made any sense in C.  Once you get all that gibberish C calls syntax out of the way and replace it with something actually designed to be read by human beings, things become so much clearer.

    And using Pascal-style strings in C is a pain in the ass.)

    Yeah, for much the same reason using closures or exceptions in C is: because the language has no support for them.  That doesn't mean that the Pascal string model isn't objectively better than the char* variety.  Especially the redesigned variety used in Delphi: it gets rid of the 255 character limit and does a few other things that improve efficiency in real-world use cases.

    2) People make similar claims about Lotus Notes.

    All right.  But not having used Lotus Notes, I'm in no position to evaluate the validity of that claim.



  • @Mason Wheeler said:

    I didn't say anything about memory management.  You can't write an operating system in managed code; somewhere there has to be a layer of real code with real pointers doing real work.  Even the various so-called "managed OS" research projects can't really do it, because it's impossible.  They have to cheat by writing a VM in low-level code that loads the managed OS.

    Saying it can't be done indicates a lack of imagination. Not to say it's a good idea, but it certainly could be done.

    I'd personally call "automatic bounds checking" (which is I assume the feature you're talking about?) a type of memory management, but if you disagree that's fine.

    @Mason Wheeler said:

    I remember Classic Mac Pascal.  Great language.  That was when I first started to finally understand the programming concepts that never made any sense in C.  Once you get all that gibberish C calls syntax out of the way and replace it with something actually designed to be read by human beings, things become so much clearer.

    The beauty was in the Classic API, not in the language. Believe me, it was just as beautiful in C... man I miss that API, a true work of art.

    But .net is close enough that I don't miss it much. The Win32 API, though... what a stinker!

    @Mason Wheeler said:

    That doesn't mean that the Pascal string model isn't objectively better than the char* variety.  Especially the redesigned variety used in Delphi: it gets rid of the 255 character limit and does a few other things that improve efficiency in real-world use cases.

    BTW, one nice thing about C on the Classic Mac is that most, if not all, C runtimes on Classic Mac included a pstring type and all the string handling functions you needed, so the C string -> Pascal string thing wasn't that huge a deal. When doing Classic Mac programming you just ignored the C strings altogether and used pstrings for everything.

    The bigger deal was that it was a complete pain to pass around any piece of text longer than 255 characters, but I guess that applies to Pascal as well.

    @Mason Wheeler said:

    2) People make similar claims about Lotus Notes.

    All right.  But not having used Lotus Notes, I'm in no position to evaluate the validity of that claim.

    My point is that it's the same sort of "WOW I'M A HUGE FAN OF THIS YOU SHOULD ALL TRY IT IT'S SO MUCH BETTER THAN EVERYTHING ELSE!!!" exuberant claim made by fanboys a ton of different products, regardless of their quality. The (implied) claim that Pascal solves all security problems evar you made a few posts back didn't help.



  • @blakeyrat said:

    I'd personally call "automatic bounds checking" (which is I assume the feature you're talking about?) a type of memory management, but if you disagree that's fine.

    Oh, all right.  When you say "memory managed language," I read that as "managed pointers and garbage collection."

    The bigger deal was that it was a complete pain to pass around any piece of text longer than 255 characters, but I guess that applies to Pascal as well.
      Yeah, it does.  See above, re: improved string type in Delphi. :)

    My point is that it's the same sort of "WOW I'M A HUGE FAN OF THIS YOU SHOULD ALL TRY IT IT'S SO MUCH BETTER THAN EVERYTHING ELSE!!!" exuberant claim made by fanboys a ton of different products, regardless of their quality. The (implied) claim that Pascal solves all security problems evar you made a few posts back didn't help.

    To be fair, I did put a disclaimer in there.  But having bounds checking built into your array and string types does solve the biggest security problem.  (And having an explicit string format function that doesn't rely on varargs, and a string output routine that doesn't try to format strings in the process, makes Delphi immune to string format exploits too.)  But there are a handful of other things that make common problems non-issues.  Having an explicit boolean type that's not automatically equivalent to other types means the classic "if x = 5" error doesn't exist.  There's also no & vs && confusion, because with a real boolean type, you don't need different bitwise and logical versions of your operators; the compiler infers the correct operation from context and raises an error if you try to mix them.

    It gets even uglier when these hackish solutions persist even in derivative languages that have outgrown the original problems.  For example, Java and C# both have real boolean types, but they still have & and &&, etc.  Someone mind explaining that one?



  • @Mason Wheeler said:

    For example, Java and C# both have real boolean types, but they still have & and &&, etc.  Someone mind explaining that one?

    & short-circuits, && does not.

  • Discourse touched me in a no-no place

    @Jaime said:

    @Mason Wheeler said:

    For example, Java and C# both have real boolean types, but they still have & and &&, etc.  Someone mind explaining that one?

    & short-circuits, && does not.
    Are you sure about that order? In C it's the other way round - & is the bitwise, and && is the short circuit one.



  • @PJH said:

    @Jaime said:

    @Mason Wheeler said:

    For example, Java and C# both have real boolean types, but they still have & and &&, etc.  Someone mind explaining that one?

    & short-circuits, && does not.
    Are you sure about that order? In C it's the other way round - & is the bitwise, and && is the short circuit one.
    You are correct.


  • @Someone You Know said:

    @Bumble Bee Tuna said:

    @The_Assimilator said:

    @blakeyrat said:
    At least if it has the GfW logo, I know it's not going to crash every 10 minutes.

    HAHAHAHAHAHA no. You've obviously never played played Gears of War on a PC; People Can Fly Software should've been nuked for that console port abortion.

     

     

    Yeah, or how about Fallout: New Vegas?

     

    I was just going to mention Fallout 3, wherein integrating it with GfW Live causes it to crash every 10 minutes, when it didn't before. GfW Live used to be the only legitimate way to get the DLC, so when a new one came out, many people would install GfW Live, download the DLC, copy the content somewhere else, then uninstall GfW Live so that the game would work properly again.

     I never noticed any of those games having any major stability problems (at least not until I encountered a few buggy mods for FO3)



  • @Mason Wheeler said:

    a string output routine that doesn't try to format strings in the process
    Care to name a language that doesn't have an output routine that doesn't format a string?



  • @DescentJS said:

    @Someone You Know said:

    @Bumble Bee Tuna said:

    @The_Assimilator said:

    @blakeyrat said:
    At least if it has the GfW logo, I know it's not going to crash every 10 minutes.

    HAHAHAHAHAHA no. You've obviously never played played Gears of War on a PC; People Can Fly Software should've been nuked for that console port abortion.

     

     

    Yeah, or how about Fallout: New Vegas?

     

    I was just going to mention Fallout 3, wherein integrating it with GfW Live causes it to crash every 10 minutes, when it didn't before. GfW Live used to be the only legitimate way to get the DLC, so when a new one came out, many people would install GfW Live, download the DLC, copy the content somewhere else, then uninstall GfW Live so that the game would work properly again.

     I never noticed any of those games having any major stability problems (at least not until I encountered a few buggy mods for FO3)

     

    YMMV, obviously. But that was my point: plugging a game into GfW Live was not the guarantee of non-crashiness that blakeyrat claimed.

    In the case of Fallout 3, the fault is almost certainly Bethesda's, not Microsoft's — but the other side of that is that the success of games that work well with GfW Live should usually be credited to the games' developers, not Microsoft.



  • @Someone You Know said:

    YMMV, obviously. But that was my point: plugging a game into GfW Live was not the guarantee of non-crashiness that blakeyrat claimed.

    In the case of Fallout 3, the fault is almost certainly Bethesda's, not Microsoft's — but the other side of that is that the success of games that work well with GfW Live should usually be credited to the games' developers, not Microsoft.

    What I was hoping for in the program would be setting a minimum bar of quality. Xbox 360 games can suck, but they don't crash-- because Microsoft won't let games that crash onto their platform. This is a good thing, IMO, especially since Windows games are traditionally so fucking crash. Especially if they come from EA/DICE.

    GfW should be like the FDA. The food might taste like shit, but at least you know there's not actual shit in it. Right now, Windows gaming is The Jungle, where you just grind up the bugs from the last game and re-insert them in the next game as filler.



  • @blakeyrat said:

    Xbox 360 games can suck, but they don't crash-- because Microsoft won't let games that crash onto their platform

    Wait, what? Do you know how many times I've had Oblivion crash on me? Or Guitar Hero? Or Dragon Age: Origins?



  • @toth said:

    @blakeyrat said:
    Xbox 360 games can suck, but they don't crash-- because Microsoft won't let games that crash onto their platform

    Wait, what? Do you know how many times I've had Oblivion crash on me? Or Guitar Hero? Or Dragon Age: Origins?

    No, but I can guess: 0, 0, 0?

    I played Oblivion for over 100 hours on the same save file, and it never crashed. (Sometimes I saw items hovering in the air, but no crashing.) Guitar Hero, I've never seen crash, but I only own Guitar Hero 2. Dragon Age I don't own because it's an EA game.



  • @blakeyrat said:

    No, but I can guess: 0, 0, 0

    Nope, nope, nope.

    Oblivion crashes...well, not all the time, certainly, but much more frequently than I'd like. And it's often a persistent crash--I'll be following Modreyn Oreyn somewhere or something and it'll crash, I'll do a hard reboot, load up the save, and it crashes in pretty much the same place. I usually have to load an older save.

    Guitar Hero (technically, I think it was Guitar Hero V) would crash all the time when loading a song. I ended up installing it on my hard drive, and that seemed to resolve it, but still...

    DA:O has actually only done it once or twice.



  • You're obviously using the wrong platforms for gaming. The only Software for Nintendo consoles that ever crashed on me was homebrew.


Log in to reply