|
fritz posted:is there any reason to use awk instead of perl there is absolutely no reason to use awk instead of perl. none. anyone who tells you to use awk either hasn't learned anything new in 20 years, doesn't know perl, or most probably, both. i'm going to give mononqc the benefit of the doubt and assume he's in the "doesn't know perl" category.
|
# ? Oct 23, 2013 20:18 |
|
|
# ? Jun 5, 2024 06:48 |
|
qntm posted:a way back but: don't use double quotes, just backslash-escape every non-alphanumberic character including spaces my solution is dont use bash
|
# ? Oct 23, 2013 20:18 |
|
PrBacterio posted:dont worry awk is terrible too, it's snobol where its really at so you fit right in! extended regex languages became popular because unix users were already obliged to know regex to use basic tools, so the extended languages were incremental and easy to learn learning a brand new way express grammars or whatever is a massive barrier to entry. not gonna catch on with the oneliner crowd.
|
# ? Oct 23, 2013 20:20 |
|
Notorious b.s.d. posted:extended regex languages became popular because unix users were already obliged to know regex to use basic tools, so the extended languages were incremental and easy to learn so in short because
|
# ? Oct 23, 2013 20:26 |
|
Notorious b.s.d. posted:there is absolutely no reason to use awk instead of perl. none. Don't know Perl, only used it in some homework to do conway's game of life and then never touched it again. Again Awk takes 15 minutes to learn (my post covers a huge part of the basics on its own). I'm also interested in comparing the speed of both, because when parsing 3-4GB files, a good speedup is worth the 15 minutes investment.
|
# ? Oct 23, 2013 20:31 |
|
MononcQc posted:Don't know Perl, only used it in some homework to do conway's game of life and then never touched it again. Again Awk takes 15 minutes to learn (my post covers a huge part of the basics on its own). I'm also interested in comparing the speed of both, because when parsing 3-4GB files, a good speedup is worth the 15 minutes investment. does awk use "extended" or regular (hah!) regexes? because if it uses just plain old regular expressions, thats probably where the speedup comes from
|
# ? Oct 23, 2013 20:33 |
|
PrBacterio posted:does awk use "extended" or regular (hah!) regexes? http://www.math.utah.edu/docs/info/gawk_5.html#SEC28 seems to say it supports both POSIX and extended 'unix stuff', so probably not PCRE. I guess that's where the speedup is, yeah.
|
# ? Oct 23, 2013 20:34 |
|
http://perldoc.perl.org/perlcheat.html is printed out on my cube wall and will never leave. I still glance at it several times a day
|
# ? Oct 23, 2013 20:45 |
|
mn9 posted:i think pycharm is pretty cute. they also released a free version somewhat recently that has most of the functionality that you would need unless you do a lot of web stuff. cool so my options are pycharm, komodo and wing, ty dudes i shall ~investigate~ (and somehow figure out a parallels setup so i can do the dev on mac but just compile it on windows in a vm thing srsly i love deving on my mbp) JewKiller 3000 posted:what is a python ide going to do for you that vim doesn't? i guess you can have one window containing code, a directory tree, and a console, great. what about any of the actual features that make ides useful? you're limited by python to no more than a gui for grep well replace vim for sublime text because i dont have autism but essentially an intellisense clone. all good the poo poo vs and xcode do that sublime doesnt
|
# ? Oct 23, 2013 20:57 |
|
there's a reason objective c/cocoa doesnt have a native regex library
|
# ? Oct 23, 2013 21:00 |
|
MononcQc posted:Don't know Perl, only used it in some homework to do conway's game of life and then never touched it again. Again Awk takes 15 minutes to learn (my post covers a huge part of the basics on its own). I'm also interested in comparing the speed of both, because when parsing 3-4GB files, a good speedup is worth the 15 minutes investment. if parsing 4 GB of logs takes you more than 15 minutes, invest in some hardware from this decade first, worry about code later seriously on any PC from after like 2003 you should have no problem churning through 100 MB/s with naive perl regex. what the gently caress is wrong with your setup?
|
# ? Oct 23, 2013 21:06 |
|
USSMICHELLEBACHMAN posted:there's a reason objective c/cocoa doesnt have a native regex library it's penny ante crap developed at minimum cost to sell hardware?
|
# ? Oct 23, 2013 21:07 |
|
yo is it just me or is git the absolute worst loving version control system also is there a decent way to merge pbxproj yet because jesus christ
|
# ? Oct 23, 2013 21:29 |
|
Notorious b.s.d. posted:if parsing 4 GB of logs takes you more than 15 minutes, invest in some hardware from this decade first, worry about code later for a discussion about parsing you aren't doing it very well the 15 minute investment isn't for every single time you use awk, it's learning awk the one time and then you potentially save time with each file you parse with awk in the future
|
# ? Oct 23, 2013 21:30 |
|
THC posted:yo is it just me or is git the absolute worst loving version control system it's better than subversion, and better than clearcase at many things
|
# ? Oct 23, 2013 21:31 |
|
Deacon of Delicious posted:for a discussion about parsing you aren't doing it very well Exactly this.
|
# ? Oct 23, 2013 21:33 |
|
Mr SuperAwesome posted:well replace vim for sublime text because i dont have autism but essentially an intellisense clone. all good the poo poo vs and xcode do that sublime doesnt that's what i'm saying though, it's not going to do that, because it can't. there is no static type information
|
# ? Oct 23, 2013 21:49 |
|
THC posted:yo is it just me or is git the absolute worst loving version control system look at this guy
|
# ? Oct 23, 2013 22:04 |
|
http://search.cpan.org/~nwclark/perl-5.8.3/pod/perl.pod posted:If you have a problem that would ordinarily use sed or awk or sh, but it exceeds their capabilities or must run a little faster, and you don't want to write the silly thing in C, then Perl may be for you.
|
# ? Oct 23, 2013 22:05 |
|
writing that thread parser, and i'm working on just getting a page to be pulled from the server, and search through for any href links containing the string 'youtube', then saving them to a txt file that i will use to make the playlist later. i can't seem to pull more than just the php head, it doesn't get the whole page. how do i work with this? trigger warning: ugly loving code code:
http://pastebin.com/urbzxf2J
|
# ? Oct 23, 2013 22:09 |
|
hubris.height posted:writing that thread parser, and i'm working on just getting a page to be pulled from the server, and search through for any href links containing the string 'youtube', then saving them to a txt file that i will use to make the playlist later. i can't seem to pull more than just the php head, it doesn't get the whole page. how do i work with this? try logging in
|
# ? Oct 23, 2013 22:43 |
|
Deacon of Delicious posted:for a discussion about parsing you aren't doing it very well i'm parsimonious in my parser selection perl is useful for everything under the sun. if i write a quick dirty one liner i can re-use it elsewhere. awk is 1980s crap. even if it manages to be slightly faster at splitting on a tab, it's a less capable tool and no one else knows it.
|
# ? Oct 23, 2013 22:50 |
|
yeah but perl is a p-lang
|
# ? Oct 23, 2013 22:56 |
|
perl-lang. p-erlang?
|
# ? Oct 23, 2013 23:00 |
|
MononcQc posted:yeah but perl is a p-lang yeah but using it for dumb little scripts is exactly the job of a p-lang
|
# ? Oct 23, 2013 23:07 |
|
MononcQc posted:yeah but perl is a p-lang a powerful and productive language
|
# ? Oct 23, 2013 23:13 |
|
USSMICHELLEBACHMAN posted:there's a reason objective c/cocoa doesnt have a native regex library autolayout has its own expression language and that's part of the reason autolayout can be such a drat pain. Doc Block fucked around with this message at 23:51 on Oct 23, 2013 |
# ? Oct 23, 2013 23:49 |
|
I'm just surprised Notorious b.s.d. isn't telling people to do it in Java or something
|
# ? Oct 23, 2013 23:50 |
|
MononcQc posted:I'm just surprised Notorious b.s.d. isn't telling people to do it in Java or something in lieu of that its p hilarious that someone got hubris to install vs to write a scraper in c#
|
# ? Oct 24, 2013 00:33 |
|
Stringent posted:in lieu of that its p hilarious that someone got hubris to install vs to write a scraper in c# using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\\Users\\Minerva\\testfolder\\site.txt")) lmfao is that how you open a file for writing in c#
|
# ? Oct 24, 2013 00:36 |
|
you can actually just say code:
|
# ? Oct 24, 2013 00:41 |
|
PrBacterio posted:I really do wonder though how regex based languages became so utterly dominant to the point that the "regexes" they parse arent even regular anymore but some sort of hybrid hellspawn of backtracking and exponential running time, when context free grammar parsing has been a solved problems for so long now. I mean obviously snobol and its successors are poo poo too, but why havent any modern, usable CFG based parsing languages been invented for whats literally decades now, when its quite obvious to anyone with a brain that regexes arent really what people actually want or need for parsing in most cases as, for one, what people call regexes nowadays actually arent because debugging lalr is painful, recursive descent is easy, and ll is really loving trivial and lr isn't. actual cfg parsing is still slow and clumsy.
|
# ? Oct 24, 2013 00:50 |
|
tef posted:because debugging lalr is painful, recursive descent is easy, and ll is really loving trivial and lr isn't. actual cfg parsing is still slow and clumsy.
|
# ? Oct 24, 2013 01:05 |
|
Notorious b.s.d. posted:i'm parsimonious in my parser selection if you write a quick dirty one liner, you throw it the gently caress away. in the loving trash. you don't turn it inside out and use it again. the plural of lovely hacks is not library
|
# ? Oct 24, 2013 01:15 |
|
Posting Principle posted:you can actually just say neat
|
# ? Oct 24, 2013 01:19 |
|
Brain Candy posted:the plural of lovely hacks is not library
|
# ? Oct 24, 2013 02:08 |
|
on the other hand, if a codebase doesn't have any lovely hacks its practically guaranteed that it doesn't do anything interesting SWIM should research optimal lovely hack density in kludges/KLOC and report back
|
# ? Oct 24, 2013 02:12 |
|
Nomnom Cookie posted:SWIM should research optimal lovely hack density in kludges/KLOC and report back if you also posit that lovely hacks encourage lovely hacks in connected classes, i reckon there're some interesting questions to be asked about contagion in codebases Brain Candy posted:the plural of lovely hacks is not library lol
|
# ? Oct 24, 2013 02:47 |
|
Brain Candy posted:the plural of lovely hacks is not library
|
# ? Oct 24, 2013 02:57 |
|
|
# ? Jun 5, 2024 06:48 |
|
coffeetable posted:call a node in a dependency graph "dirty" if it contains a lovely hack. define a utility function that is positively related to the number of dirty nodes, but (very) negatively related to the size of the largest all-dirty connected subgraph i embedded my connected subgraph in your mam's spanning tree last night
|
# ? Oct 24, 2013 03:08 |