|
Janin posted:Entities in general are just silly. I can't think of any reason to use them that isn't better handled by a different concept. quote:I think that's natural; XML is a markup language, and non-trivial validation requires a Turing-complete language. quote:No, no, no. XSLT is not OK for anything. It's easily one of the worst ideas to come out of the "enterprise ecosystem".
|
# ? Apr 4, 2011 20:54 |
|
|
# ? May 16, 2024 22:01 |
|
Zombywuf posted:It's an ok way to escape control and out-of-charset characters. Zombywuf posted:I'm guessing you are unaware of RNG compact and the fact that XSLT is Turing complete. Zombywuf posted:Why is it bad when used as a templating language? I know it is abused horribly, see above.
|
# ? Apr 4, 2011 21:06 |
|
Janin posted:I am aware of both. Re-read my post; non-trivial validation (eg, more than "this attribute is a number") requires a a Turing-complete language. I'm pretty sure you can't encode requirements like "if parent attribute 'framing' is 'STAGGERED', any child elements must have a 'check' element containing '16' or '32' " in RELAXNG. Well, it sounds like someone forgot to design the schema and just slapped a bunch of elements together. But yes, RelaxNG cannot be used to validate schemas that have been incompletely specified. I think you're confusing validation with functional testing. quote:You were in gfdev too, right? Go look at the killboard some time. I have no idea what you are talking about.
|
# ? Apr 4, 2011 21:27 |
|
Zombywuf posted:I have no idea what you are talking about.
|
# ? Apr 4, 2011 22:00 |
|
Janin posted:I thought you were in the developer group for SA's eve online alliance. If not, count yourself lucky; their internal websites are entirely XSLT-based for "performance reasons". Yep http://killboard.goonfleet.com It serves an XML file and points to an XSLT that transforms it into an HTML file. I have no idea what the hell.
|
# ? Apr 4, 2011 22:13 |
|
Aaaaaand using XSLT as a templating language is bad why? EDIT: They'd get better perf out of their solution if they set Expires headers and used renaming if they needed to flush the cache, but the client side template approach keeps the page size down. Zombywuf fucked around with this message at 23:02 on Apr 4, 2011 |
# ? Apr 4, 2011 22:57 |
|
I use troff macros for my all data interchange and templating.
|
# ? Apr 4, 2011 23:19 |
|
xslt gives me flashbacks
|
# ? Apr 4, 2011 23:34 |
|
Zombywuf posted:Aaaaaand using XSLT as a templating language is bad why? Zombywuf posted:EDIT: They'd get better perf out of their solution if they set Expires headers and used renaming if they needed to flush the cache, but the client side template approach keeps the page size down.
|
# ? Apr 4, 2011 23:43 |
|
Janin posted:They'd get better perf if they moved expensive processing off PHP, but instead Solo worries about simlinks in htdocs/ because serving linked scripts requires an extra stat() Heh, I doubt either of those would shave 1.8 seconds off the 2.7 it took the page to load for me. Expires headers would.
|
# ? Apr 4, 2011 23:52 |
|
Zombywuf posted:Heh, I doubt either of those would shave 1.8 seconds off the 2.7 it took the page to load for me. Expires headers would.
|
# ? Apr 5, 2011 00:15 |
|
If you're going to say things like that could you at least check the number of 304's that are served and the dependencies between them.
|
# ? Apr 5, 2011 00:23 |
|
Zombywuf posted:If you're going to say things like that could you at least check the number of 304's that are served and the dependencies between them. code:
|
# ? Apr 5, 2011 00:40 |
|
Janin posted:Firebug is reporting four 304 responses: I think you might have left a filter on there:
|
# ? Apr 5, 2011 01:05 |
|
That's great. Nearly 1:1 between Waiting and actual Receiving.
|
# ? Apr 5, 2011 01:11 |
|
BonzoESC posted:The best part was the simple XSLT used to rename a variable, and Tim Bray crying from laughter in the audience. watching this now, the whole 'bad ideas -> software in search of a problem -> creates more problems -> more bad ideas -> in some terrible spiral' rings true especially. it's the sort of sunk cost thing where instead of fixing the original problem, they spend all the times fixing problems with the solution.
|
# ? Apr 5, 2011 02:29 |
|
code:
|
# ? Apr 7, 2011 18:20 |
|
yaoi prophet posted:
I thought I knew a fair bit about perl regex, but I can't read this drat thing. What's it supposed to parse? zeekner fucked around with this message at 23:33 on Apr 7, 2011 |
# ? Apr 7, 2011 23:27 |
|
Geekner posted:I thought I knew a fair bit about perl regex, but I can't read this drat thing. poo poo that looks like "(PP (IN in) (NP (JJ full) (NN swing)))". The (?<node>) syntax means 'this pattern is called 'node'' and (?&node) means 'the pattern 'node'. So basically you can recurse back into the pattern from itself.
|
# ? Apr 7, 2011 23:31 |
|
yaoi prophet posted:poo poo that looks like "(PP (IN in) (NP (JJ full) (NN swing)))". The (?<node>) syntax means 'this pattern is called 'node'' and (?&node) means 'the pattern 'node'. So basically you can recurse back into the pattern from itself. Amazing. No, wait, the other thing: Tedious. Are there any practical limitations on how far that kind of regex can recurse? zeekner fucked around with this message at 23:38 on Apr 7, 2011 |
# ? Apr 7, 2011 23:36 |
|
Geekner posted:Amazing. No, wait, the other thing: Tedious. No drat clue, but it works fine enough for our purposes since we're probably only ever going to recurse maybe 6-7 deep.
|
# ? Apr 7, 2011 23:41 |
|
yaoi prophet posted:
Every time I see this poo poo I feel it's my duty to lock the author up with nothing but Ragel and gcc until they come out with a beard and a new enlightenment.
|
# ? Apr 8, 2011 00:09 |
|
yaoi prophet posted:
Interesting mixture of POSIX and Perl syntax, I honestly forgot PCRE/Perl supported that
|
# ? Apr 8, 2011 00:13 |
|
PCRE != Perl regex Most of the basic stuff is the same, but that regex wouldn't work in Perl. (Perl's syntax isn't any prettier)
|
# ? Apr 8, 2011 05:56 |
|
Haarg posted:PCRE != Perl regex According to perlre, the posix character classes and some gnu extensions (like [[:blank:]]) are supported, and of course named captures have been around since 5.10, I don't see what would blow up Also if Perl-Compatible Regular Expressions were anything but a subset of the regexes that Perl supports, something is horribly wrong Blotto Skorzany fucked around with this message at 06:16 on Apr 8, 2011 |
# ? Apr 8, 2011 06:13 |
|
Otto Skorzeny posted:Also if Perl-Compatible Regular Expressions were anything but a subset of the regexes that Perl supports, something is horribly wrong why would you do that
|
# ? Apr 8, 2011 07:11 |
|
Because you started out making a Perl compatible RE library, and then kept enhancing it to meet your users needs?
|
# ? Apr 8, 2011 07:35 |
|
yaoi prophet posted:
PCREs support whitespace and comments so I think this would work: code:
|
# ? Apr 8, 2011 09:29 |
|
Haarg posted:PCRE != Perl regex Considering I tested it in Perl I'd have to disagree. e: code:
Opinion Haver fucked around with this message at 13:42 on Apr 8, 2011 |
# ? Apr 8, 2011 13:33 |
|
Yeah, I was wrong about that in this case. Was forgetting the named capture syntax. PCRE supported named captures before Perl did, but using a different syntax. they have since adjusted it to be compatible with Perl.
|
# ? Apr 8, 2011 15:51 |
|
Haarg posted:Yeah, I was wrong about that in this case. Was forgetting the named capture syntax. Well that's not very Perl Compatible Regular Expression then!
|
# ? Apr 8, 2011 16:39 |
|
code:
|
# ? Apr 9, 2011 05:02 |
|
Aleksei Vasiliev posted:
I got a good laugh out of that. Needlessly constructing one liners at the sake of readability is AWESOME.
|
# ? Apr 9, 2011 07:45 |
|
in[ip+1+1+1] What the gently caress is this poo poo.
|
# ? Apr 9, 2011 07:54 |
|
That looks like generated code to me.
|
# ? Apr 9, 2011 07:55 |
|
Volte posted:That looks like generated code to me. It's not generated code, it's a partial port of MiniLZO from C.
|
# ? Apr 9, 2011 08:15 |
|
I bet the C implementation had a macro there, and the Java version is a copy & paste of the preprocessor output.
|
# ? Apr 9, 2011 08:20 |
|
Aleksei Vasiliev posted:https://code.google.com/p/java-compress/source/browse/src/org/jvcompress/lzo/MiniLZO.java#137 code:
|
# ? Apr 9, 2011 08:23 |
|
Aleksei Vasiliev posted:https://code.google.com/p/java-compress/source/browse/src/org/jvcompress/lzo/MiniLZO.java#137 That doesn't mean it isn't generated, I write code generating scripts all the time.
|
# ? Apr 9, 2011 08:24 |
|
|
# ? May 16, 2024 22:01 |
|
The original C source line is DINDEX1(dindex,ip), in case you were wondering. #define DINDEX1 D_INDEX1 #define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) etc.
|
# ? Apr 9, 2011 08:46 |