|
1337JiveTurkey posted:You have to explicitly tell the standard Java regex to backtrack with (.*?) because it can significantly affect performance. Is this true? If so, that's just amazingly awful.
|
# ? Apr 13, 2011 18:07 |
|
|
# ? May 16, 2024 11:04 |
|
The Java regex system can also crash.code:
|
# ? Apr 13, 2011 18:11 |
|
yaoi prophet posted:Huh, this looks interesting. Any idea why the mentioned languages don't use his approach?
|
# ? Apr 13, 2011 20:04 |
|
Smugdog Millionaire posted:Is this true? If so, that's just amazingly awful. Hey guys! Let's use a nearly-the-same syntax, and make it mean different things than everything else that uses the syntax! Yeah! And then we can go suck each other's cocks over how you can write it once and run it anywhere and isn't it great that our language is so loving PURE! OHHH GOD gently caress YEAH UNNNNNNG gently caress Java, gently caress it forever and ever. I would rather write an AJAX version of Office 2010 in PHP 3 than write one line of code in Java.
|
# ? Apr 13, 2011 20:07 |
|
1337JiveTurkey posted:You have to explicitly tell the standard Java regex to backtrack with (.*?) because it can significantly affect performance.
|
# ? Apr 13, 2011 20:17 |
|
wellwhoopdedooo posted:Hey guys! Let's use a nearly-the-same syntax, and make it mean different things than everything else that uses the syntax! Yeah! And then we can go suck each other's cocks over how you can write it once and run it anywhere and isn't it great that our language is so loving PURE! OHHH GOD gently caress YEAH UNNNNNNG u mad?
|
# ? Apr 13, 2011 20:39 |
|
wellwhoopdedooo posted:Hey guys! Let's use a nearly-the-same syntax, and make it mean different things than everything else that uses the syntax! Yeah! And then we can go suck each other's cocks over how you can write it once and run it anywhere and isn't it great that our language is so loving PURE! OHHH GOD gently caress YEAH UNNNNNNG You should calm down.
|
# ? Apr 13, 2011 20:44 |
|
wellwhoopdedooo posted:gently caress Java, gently caress it forever and ever. I would rather write an AJAX version of Office 2010 in PHP 3 than write one line of code in Java. edit: but signed bytes are gently caress
|
# ? Apr 13, 2011 20:48 |
|
wellwhoopdedooo posted:Hey guys! Let's use a nearly-the-same syntax, and make it mean different things than everything else that uses the syntax! Yeah! And then we can go suck each other's cocks over how you can write it once and run it anywhere and isn't it great that our language is so loving PURE! OHHH GOD gently caress YEAH UNNNNNNG I believe the trifecta of things that have perpetually held back technological progression so far have been PHP, Java/Sun, and Windows. I would rather write an app in Java than PHP any single day, anytime. The syntax is loving atrocious, you need an IDE to get over the repetitive bullshit, but you can kind of bend it to your will. At the very least you can track down what the hell is going on in Java through some hosed up class hierarchy, rather than the gigantic Goldberg machine mess of global everything that most PHP projects are. Spend a week trying to work with Drupal and you'll see.
|
# ? Apr 13, 2011 23:45 |
|
NotShadowStar posted:I believe the trifecta of things that have perpetually held back technological progression so far have been PHP, Java/Sun, and Windows. Certainly software patents deserve a spot. Look at the HTML5 video mess. I'd rank software patents as more destructive to progress than Java.
|
# ? Apr 14, 2011 00:18 |
|
Volte posted:It would have been nice if true regular expressions were kept and the expanded type of matching expression given a new name though. At least in Perl-land it's common to refer to true regular expressions as "regular expressions" and the superset of matching expressions supported by Perl as "regexes" or (esp. among perl 6 hackers) "regexps", thus: 'not all regexes are regular expressions' and similar
|
# ? Apr 14, 2011 01:46 |
|
Volte posted:It's because Thompson's implementation is a true regular expression implementation and can only match regular languages. Perl regex with recursion can match at least some context-free languages (messily), and most people who use regex in practice would prefer increased power over performance. It would have been nice if true regular expressions were kept and the expanded type of matching expression given a new name though. perl regexes are pretty much turing complete, not just context-free if they were context free it would be possible to bound them in cubic time
|
# ? Apr 14, 2011 02:07 |
|
They're still well short of Turing complete.
|
# ? Apr 14, 2011 02:17 |
|
rjmccall posted:They're still well short of Turing complete. You can embed arbitrary Perl expressions in a Perl regexp.
|
# ? Apr 14, 2011 02:23 |
|
tef posted:perl regexes are pretty much turing complete, not just context-free
|
# ? Apr 14, 2011 02:42 |
|
ShoulderDaemon posted:You can embed arbitrary Perl expressions in a Perl regexp. Huh. Things I did not know. It looks like it bounds recursive depth before advancement; I'm not certain you could actually simulate a Turing machine with that other than by cheating.
|
# ? Apr 14, 2011 03:09 |
|
I was disappointed when I dug this up and found it doesn't involve regexes as I remembered, but hey, it's still one of the most glorious wastes of human ingenuity that software development was wrought, so here it is again:code:
|
# ? Apr 14, 2011 07:11 |
|
Perl: Syntax so bizarre you can make ASCII art out of it!
|
# ? Apr 14, 2011 07:15 |
|
NotShadowStar posted:I believe the trifecta of things that have perpetually held back technological progression so far have been PHP, Java/Sun, and Windows. Well one condition of my angrypost was that I'd get to write one all by my self. If my choice was to extend or bugfix an in-use Java or PHP app I'd just go gas myself and be done with it.
|
# ? Apr 14, 2011 07:17 |
|
PalmTreeFun posted:Perl: Syntax so bizarre you can make ASCII art out of it!
|
# ? Apr 14, 2011 07:19 |
|
Mustach posted:You gotsta run that code, my man. Holy poo poo. For the lazy ones: it animates the loving spiral.
|
# ? Apr 14, 2011 08:21 |
|
I keep that code in my sig for handy reference
as seen on hacker news
|
# ? Apr 14, 2011 09:04 |
|
BlackMK4 posted:Holy poo poo. Every frame of which is valid code to continue the spiral
|
# ? Apr 14, 2011 09:07 |
|
it's a series of programs that print the source code of the next one, in a loop, and each program happens to be in the shape of a spiral, rotated slightly. it's drat awesome. please to not be forgetting http://search.cpan.org/~asavige/Acme-EyeDrops-1.55/lib/Acme/EyeDrops.pm
|
# ? Apr 14, 2011 09:41 |
|
Mustach posted:You gotsta run that code, my man. A language that gets poo poo done and trolls people? Why do people keep using PHP when this gem is around??
|
# ? Apr 14, 2011 12:06 |
|
it's the best languages for reliable top quality hosting like dreamhost
|
# ? Apr 14, 2011 13:10 |
|
nielsm posted:Remember that the two graphs on the top have different vertical scales. The Perl one measures seconds, the DFM one measures microseconds. So it is. The real horror is labelling graphs that way.
|
# ? Apr 14, 2011 13:19 |
|
Zombywuf posted:So it is. The real horror is labelling graphs that way. oh no you didn't just diss logarithmic scales. How dare you sir.
|
# ? Apr 14, 2011 15:58 |
|
logarithmic scales are the best, especially in cases like this. "Wow, perl's performance is pretty bad." "No, actually it's much worse."
|
# ? Apr 14, 2011 16:19 |
|
wellwhoopdedooo posted:oh no you didn't just diss logarithmic scales. How dare you sir. no he didnt
|
# ? Apr 14, 2011 16:47 |
|
having two scales on the same graph was what confused him, not log scales
|
# ? Apr 14, 2011 16:47 |
|
BlackMK4 posted:Holy poo poo. Holy mother of god that is amazing. Perl: Syntax so bizarre, you can animate the source code!
|
# ? Apr 14, 2011 21:00 |
|
PalmTreeFun posted:Holy mother of god that is amazing. Ruby has some neat quines too. This is "The Qlobe" and it rotates the earth 45 degrees when you execute it and you can pass it however many degrees you want it to rotate. It doesn't self animate like the perl one does, but you can easily write a single liner command to do so. code:
|
# ? Apr 14, 2011 21:37 |
|
Mustach posted:I was disappointed when I dug this up and found it doesn't involve regexes as I remembered, but hey, it's still one of the most glorious wastes of human ingenuity that software development was wrought, so here it is again: There's a regex substitution being used on the default argument before the eval to effect a pseudo-source filter that removes all whitespace (this is what allows eg. the keyword 'while' to be split between two lines)
|
# ? Apr 14, 2011 22:28 |
|
the best quine "This is a Ruby program that outputs a Python program that outputs a Perl program that outputs a Lua program that outputs a OCaml program that outputs a Haskell program that outputs a C program that outputs a Java program that outputs a brainfuck program that outputs a Whitespace program that outputs a Unlambda program that outputs the program itself." code:
Scaevolus fucked around with this message at 03:22 on Apr 15, 2011 |
# ? Apr 15, 2011 03:17 |
|
The COBOL quine is still fairly impressive considering how wordy the languague is:code:
|
# ? Apr 15, 2011 04:05 |
|
php quinephp:<? echo file_get_contents($_SERVER['SCRIPT_FILENAME']); ?>
|
# ? Apr 15, 2011 04:28 |
|
It's pretty boring.
|
# ? Apr 15, 2011 04:30 |
|
bobthecheese posted:php quine You've found the one thing that PHP is good for.
|
# ? Apr 15, 2011 04:37 |
|
|
# ? May 16, 2024 11:04 |
|
hq9+ quinecode:
|
# ? Apr 15, 2011 06:00 |