Slashdot Mirror


User: Shin+Chan

Shin+Chan's activity in the archive.

Stories
0
Comments
45
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 45

  1. Re:United States - 0 South East Asia : 1 on Johnny Can So Program · · Score: 1

    Absolutely 100% true. Mod parent up :)

  2. Re:Use a real language. on Perl Medic · · Score: 1

    print substr_count("string"," ") + 1;
    ?>

    e.g. "this is a test" --> 3 spaces, 4 words. :)

  3. Re:Use a real language. on Perl Medic · · Score: 2, Interesting

    Let's see (just a real life thing I tested earlier today... so yes, before this article got published)

    Running a "BOT" on the MSN Messenger network. Sending a 300 meg ISO to it, memory only "shot up" by an "amazing" 100KB. Average speed on sending, 150KB/s (as good as it get's on my connection).

    Now we hook up another conversation. Response time is excellent, transfer is not suffering nor are other connections. Ping time is 0.0788 seconds (that is, me server perl app, so it has to pass 4 "pipes", 2 to my app, 2 back to me).

    CPU usage stayed below 5% all the time. . The script has been running for nearly 3 days now, too. I'm sure your C app can shave off an amazing 0.01 something seconds and minimize memory usage to maybe only half. Point remains, Perl isn't slow when well written :)

  4. Zonk.. on Current Crypto Trends with Bruce Schneier · · Score: 1, Funny

    from the my-password-is-***** dept.

    Has a weak password.

  5. Re:Perl != maintainable on Perl Medic · · Score: 1

    Fairly easy. I work on some with a friend (which, even though a bit unrelated, is at the other end of the planet). I work on it for a bit, then swap code and he works on it. We have always been able to read each others code perfectly fine even though we have different ways of writing Perl. We don't usually do weird stuff, either ("Keep it simple, Stupid!") so I think the code would be fairly simple for someone else to read. If it were open source, that is.

  6. Re:Nay on Perl Medic · · Score: 1

    Though I don't know very much Perl at all, it looks like map{} can be done with array_map. For grep{} with regular expressions, there's preg_grep and for the general case, array_filter.i

    array_map is great, but requires an extra function. map{} can handle pretty much any perl code instantly, without any extra subs or other weird constructs. While it's not a "real" problem, I am annoyed at PHP for the fact that I have to write a whole function for every simple map I want to perform, whereas perl can do them in a line. For larger projects, you might even want to create a whole file filled with just those functions.

    preg_grep is great, too.. But lacks code support. For example, one could use functions, or any other expression that returns something (or nothing, undef) in Perl, whereas preg_grep only does regular expressions. array_filter is great too, but again requires additional functions.

    This also immediatly shows the problem with PHP: Why does it require a gazillion functions for a couple of tasks that only one function could quite well accomodate? IMHO, this is mainly the reason for the "core bloatness" of PHP; the PHP developers have created a function for pretty much every simple task (and a whole lot of functions so obscure you will probably never will be able to use).

    For example, you can do php.net/explode or php.net/strings and it'll take you to the proper pages. It's an example of documentation done right and while it does not address the issues you brought up, it does make them more bearable

    As for the documentation, yes, I love the way PHP has set it up. Perl's manpages are nice, but still harder to read and slower to access. The php.net/function redirect is a very nice idea, indeed :)

    On a sidenote, I still use PHP frequently when creating simple websites that don't need the power of Perl or need to quickly done. PHP is great for starters, but eventually you will want to try something else.

  7. Re:Nay on Perl Medic · · Score: 2, Interesting

    PHP?! PHP?!?!

    Okay. Sure. PHP does give some advantages over Perl.. To lazy programmers that is. Really, PHP has over 3125 core functions, while Perl has "only" some 150. Include a module and whoop, some more functionallity, including only those things you need.

    Really, how often do you have to look up a PHP function's working (or even name, hence PHP isn't very consistant, something2something, something_to_something, somethingtosomething... the list goes on)? When I haven't worked with PHP for a while that starts to faint. Perl never does.

    Oh and, rewriting a map{} and grep{} is left as an exercise to the reader ;)

  8. Re:Perl != maintainable on Perl Medic · · Score: 1

    Maybe you should learn how to write maintainable Perl scripts/apps then. I too have used for nearly 2 years now and have never had a problem with maintainabillity of one of my scripts. Not even of those from the very beginning.

  9. In other news... on Black Hole Birth Detected this Morning · · Score: 2

    ... This years intergalactic golf competition has started with a complete revamp of the course including a new hole deep into the galaxy! This looks like a promising season to me, so everyone, get your space-clubs out and try not to hit your little ball into that newly formed gas cloud! Oh, and, we appologize 2.2 billion year delay of "this" years golf magazine from outer space.

  10. Re:Patched in the future apparantly! on New Mozilla Firefox 1.0.3 Exploit · · Score: 0

    It's called "time zones". Google it.

  11. Re:Before Screenshot? on HP Deletes Negative Corporate Blogger Comments · · Score: 0

    paragraph - Pronunciation Key (pr-grf) n. 1. A distinct division of written or printed matter that begins on a new, usually indented line, consists of one or more sentences, and typically deals with a single thought or topic or quotes one speaker's continuous words. 2. A mark ( ) used to indicate where a new paragraph should begin or to serve as a reference mark. 3. A brief article, notice, or announcement, as in a newspaper.

  12. Re:Trillian vs MSN? on Microsoft Messenger Virus Hits Reuters IM · · Score: 0

    May I kindly point out that in MSN Msgr 7 there is a so called "Shield.xml" file that is being sent over the NS ("Notification Server", the main server that handles login, contactlist, etc) which is able to disable certain features?

    For example, they did a testing "drill" in the BETA program not too long ago where they disabled Winks and DDPs, in another drill they disabled all clickable links. This in case a widespread virus would hit, they had the power to force the MSN Messenger 7 clients to stop accepting such material. Sure this can be circumvented by either a "man in the middle" or something similar, but if that happens then your PC has already been compromised.

    Also, the dreaded .pif links have been disabled server-wise (all your messages containing ".pif" immediatly terminate the connection). On top of that there is file extension blocking in MSN Messenger 7, sending an exe for example will fail because the file is automatically being rejected. Microsoft can also force certain clients to be updated, for example when the PNG exploits appeared in the PNG library used by Messenge rthey forced 6.2 users to upgrade to the latest build. When there was an exploit found in the first leaked build of MSN Messenger 7 they disabled thae build from logging in as well (even though the blocking could be circumvented by a so called "CVR Patch", made by me ;-).

    It's not the companies which create the products are responsible anymore, they already do their best; instead, the users need to "grow up". There are dangerous links, they should learn about that. There are tons of patches out there to circumvent the protection put there by Microsoft. If a user applies those then hell I dont blame Microsoft if the user gets infected, its the users own stupid fault because they dilebaretly crippled the programs security features.

    As for Trillian vs MSN argument, I find that Trillian and other clients (like gAIM, which for example cna't view DPs of people who dont have YOU on their contactlist while there is no technical limitation to this) still lack certain features I like to use. Sure, if sending messages is all you need then go with either, but I still prefer the official client over the 3rd party applications. They just don't cut it. Yet.

  13. Re:yahoo & msn messenger on Congress Debates Anti-Spyware Bill · · Score: 0

    Not to mention that the toolbar and what not more are OPTIONAL. Or did you miss those checkboxes and license agreement while racing through the setup like any John Doe does nowadays?

  14. Re:Ooh! Animals as they existed DECADES ago! on Resurrection Ecology Gives Life to Old Eggs · · Score: 0

    In 1950 they were still swimming around in oceans.. you know :)

  15. Re:There goes the Death Star... on Huge Star Quake Rocks Milky Way · · Score: 0

    Wouldn't it take nearly 50000 years for the light to reach us in the first place? *wonders*

  16. Oil on World's First Practical Plastic Magnet · · Score: 0

    Hoorah, more stuff to waste oil on -_- But nice nevertheless

  17. Re:Imagine... on NASA To Get 10,240 Node Itanium 2 Linux Cluster · · Score: 0

    http://neowin.net/comments.php?category=main&id=23 076#comment261899 Humtidum.. *Whistles*

  18. Re:Same here(Word 2003), and clicking yes ... on MSN, Word Vulnerable To Shell: URI Exploit · · Score: 0

    As I can seem to edit my post: http://www.bot2k3.com/shell.gif

  19. Re:Same here(Word 2003), and clicking yes ... on MSN, Word Vulnerable To Shell: URI Exploit · · Score: 0

    In MSN Messenger typing shell:\windows\system32\calc.exe prompted me to download my own calculator, with all the latest patches in place.

  20. Backyard on Atlantis: Discovered at Last? · · Score: 0

    You mean the thing in my backyard is not Atlantis?!