#perl
02 November 2007
Total 47 pages. You are browsing page 1/47.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Fri Nov 02 00:00:08 2007
00:00 <****> lol, nice bot.
00:01 * noon scratches his head for a minute
00:01 <****> noon: ' ' is a special thing
00:02 <****> whats ' '
00:02 <****> split ' ', $foo
00:02 <****> String::ShellQuote is nice...wish I knew about it before I wrote a monstrosity with hand quoted commands for running via ssh through ssh....
00:02 <****> heh
00:03 <****> jagerman: was split ' ', $foo an answer? lol
00:04 <****> I suppose it could be, if someone asked a particular question.
00:04 <****> LeoNerd: whats the m in: m/ /
00:04 <****> noon: It's optional
00:04 <****> noon: It does nothing
00:04 <****> noon: However, m allows you to use different delimiters
00:05 <****> m!a.*b! etc.
00:05 <****> you said split ' ' was a special thing, i tried it and it worked fine. so i guess im missing the special
00:06 <****> I just prefer it because it looks more readable
00:06 <****> noon: It is special!!
00:06 <****> noon: Look at the difference up there in the bot's output
00:06 <****> Random naked / signs about the place tend to be a bit invisible
00:08 <****> jagerman: i see that it eats up all the white space between words. lol, this what youre trying to point out?
00:08 <****> Yes
00:08 <****> / does not, it splits on every space character
00:09 <****> / /, that is.
00:09 <****> yeah
00:09 <****> boo / /
00:09 <****> hooray split with no params
00:09 <****> is there a Perl i/f to mlock() ?
00:09 <****> ;split;
00:10 <****> variable oriented if possible (esp hash and array)
00:13 <****> _abc_: I don't see anything on cpan
00:13 <****> I didn't see anything either that's why I asked
00:14 <****> How hard ist it to hack a quick I/F in Perl + C to implement it
00:14 <****> Try it and let us know.
00:15 <****> Basically if I know a variable name how can I find out its storage address and size(s) (I assume there is more than one place where things are stored)
00:15 <****> dwu thanks for the support. I knew I could count on you as before.
00:16 <****> No, seriously, try it and let us know, then upload it. People will actually use it, even.
00:16 <****> I am not at all familiar with Perl internals
00:16 <****> GumbyBRAIN who is dwu ?
00:16 <****> Dwu makes a class as much as scum parents who clearly don't give a fuck who dwu is.
00:16 <****> oh
00:16 <****> _abc_: you should start with scalars, since they are one piece of memory
00:16 <****> perlbot: dwu
00:16 <****> not to appear in any factoids ;)
00:17 <****> _abc_: you could probably hack something together with Inline::C fairly quickly
00:17 <****> Yes, but my interest lies especially with hashes. For obvious reasons I think. I have a set of hashes that sum up to 60MB and I got my prog to run at IO speed. Excepting when it swaps.
00:18 <****> c**p I pushed the wrong button
00:18 <****> Say again Caelum ? C::Internals ?
00:19 <****> _abc_: Inline::C
00:19 <****> 539 nick on this chan
00:19 <****> how many active ?
00:19 <****> ok, I'll check it
00:19 <****> ^^
00:19 <****> dermiste who cares.
00:19 <****> right
00:19 <****> dermiste: do you need anything?
00:19 <****> dermiste: 864 active.
00:19 <****> not on Perl precisely
00:20 <****> It had better not be PCRE or HTML or PHP
00:20 <****> when editing perl on emacs with perl mode
00:20 <****> _abc_: you could probably make something that mlocks all the values of a hash...
00:20 <****> is there a special sequence to execute the script directly from emacs ?
00:21 <****> #emacs ;)
00:21 <****> w/o having to go back to a term
00:21 <****> Caelum I guess so. For now I need quick and dirty so unlocking later is not needed. I'll see how it works later to maintain a persistent table so I can also unlock things without sniking the ship.
00:22 <****> _abc_: you might also consider just using BerkeleyDB...
00:22 <****> what is wrong in this regexp ? (\/\/.*)|(\/\*[.\n]*\*\/)
00:22 <****> ugh
00:22 <****> for catching comments
00:23 <****> don't use / as a delimeter when matching /s
00:23 <****> leaning toothpick syndrome
00:23 <****> sup dudes...
00:23 <****> DB42: It has too many backslahes so I have trouble reading it.
00:23 <****> Caelum how would that help ? I have tried to use an on disk hash but it's git the same problems.
00:23 <****> perlbot, lts
00:23 <****> Leaning Toothpick Syndrome. Change your delimiter if you are having to escape all the / in your RE.
00:23 <****> i'm using this in FLEX not in PERL
00:23 <****> DB42: and no # at all in the pattern, :)
00:23 <****> perlbot, pcre
00:23 <****> PCRE is crap. It is hardly comparable to Perl's regular expression engine. Don't bother inquiring for help with a regular expression in perl related channels as the answer you'll get will most likely not work since PCRE is missing most of the "powerful" features that perl's regex engine contains. See also: LPBD
00:23 <****> and /* */
00:23 <****> Yeah, use another delimiter :)
00:23 <****> DB42: [.\n] only matchs . and \n
00:24 <****> _abc_: *shrug* it does its own memory management, and according to what I've heard its performance is quite good
00:24 <****> in lex . is Everything but \n
00:24 <****> DB42: not inside []
00:24 <****> DB42: *not* inside a character class
00:24 <****> ahh
00:24 <****> so how can i do match it all ?
00:24 <****> [\s\S] perhaps
00:24 <****> Caelum true but I do not remember a mlock() flag in GDBm or Berkeley DB. Nor in sqlite3 for that matter
00:25 <****> (?s:.*) if your regex supports that.
00:25 <****> (.|\n) :)
00:25 <****> k, i'll try it
00:25 <****> /s makes . also match \n again, if your regex supports it
00:25 <****> i have no idea what regex flex uses
00:25 <****> _abc_: BerkeleyDB uses mlock internally
00:25 <****> dkr: He doesn't want /s for the first . though
00:25 <****> you should also make it non-greedy or you will math /*foo*/live code/*bar*/ as a single comment
00:25 <****> Is some guru here familiar with the storage internals of Perl ? My hashes will be at the top level always.
Total 47 pages. You are browsing page 1/47.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
