Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Best way to search /prog/

Name: Anonymous 2008-09-05 16:55

Any one have any good scripts/ways to search /prog/?  I tried google but it sucks at finding /prog/ content.

Name: curtains and a dog !NAMdiwz0Sw 2008-09-05 17:19

Have you tried searching with 'site:dis.4chan.org'? The /prog sub-directory doesn't return useful results.

Name: Anonymous 2008-09-05 17:32

One word, sqlite3, world4ch_archive.db and a LIKE statement.

Name: Anonymous 2008-09-05 17:46

>>3
more like 6 words.

Name: Anonymous 2008-09-05 18:18

>>2
this is because the threads are on http://dis.4chan.org/read :it101:
p. sure site:dis.4chan.org/read/prog would work well enough.

Name: Anonymous 2008-09-05 18:38

Name: Anonymous 2008-09-05 18:45

Name: Anonymous 2008-09-05 20:47

Name: Anonymous 2008-09-05 21:05

>>7
D'oh, I'm a tard. I meant it to find http://dis.4chan.org/read/prog/1205007075/25 but obviously that search wouldn't work for that.

Name: Anonymous 2008-09-06 0:50

$ mkdir prog
$ mount -t shiichan http://dis.4chan.org/prog/ prog/
$ grep 'Best way to search /prog/' prog/*
prog/1220647315:Best way to search /prog/
$ umount prog/
$ rm -r prog/

Name: Anonymous 2008-09-06 1:18

Obligatory: http://cairnarvon.rotahall.org/misc/progfind
Only searches thread titles, though.

Name: Anonymous 2008-09-06 1:22

>>10
You have a 4chan Shiichan system translator?

Name: Anonymous 2008-09-06 1:27

>>12
It wouldn't be that hard to write, but it would be slow as fuck.

Name: Anonymous 2008-09-06 1:32

>>11
#!/bin/sh

if [ -z $1 ]
then
 echo "USAGE: $0 [regex]" 1>&2
fi

wget -qO- http://dis.4chan.org/prog/subject.txt | sed '/'"$*"'/!d;s/^\(.*\)<>.*<>.*<>\(.*\)<>.*<>.*<>\(.*\)$/echo; echo Title: \1; echo URL: http:\/\/dis.4chan.org\/read\/prog\/\2; echo -n "Posted: "; date -d @\2; echo -n "Last Post: "; date -d @\3; echo/' | sh

Name: Anonymous 2008-09-06 2:03

>>12
No. No it wouldn't be slow. Download whole /prog/ and scan http://dis.4chan.org/prog/subject.txt for changes with demon.

Name: Anonymous 2008-09-06 2:16

>>15
Good point.
Downloading all of subject.txt still takes five to ten seconds on a good day, but I suppose you would only need the first few lines every time.

Name: Anonymous 2008-09-06 2:20

>>14
Not exactly cross-platform, is it?

Name: Anonymous 2008-09-06 2:25

>>17
Poor thing.

Name: Anonymous 2008-09-06 3:05

>>17
that can be fixed pretty easily...
#!/bin/sh

if [ -z $1 ]
then
 echo "USAGE: $0 [regex]" 1>&2
 exit
fi

GET='basename \`which fetch curl wget lynx w3m links elinks | head -n1\``
case $GET in
 fetch)
  GET_OPTS="-qo-"
  ;;
 curl)
  GET_OPTS="-s"
  ;;
 wget)
  GET_OPTS="-qO-"
  ;;
 lynx)
 links)
 elinks)
  GET_OPTS="-source"
  ;;
 w3m)
  GET_OPTS="-dump_source"
  ;;
 *)
 echo "ERROR: could not find one of: fetch curl wget lynx w3m links elinks" 1>&2
 exit
 ;;
esac

if date --help 2>&1 >/dev/null
then
 DATECMD="date -d @" # assume gnu date if --help works
else
 DATECMD="date -r " # assume bsd date otherwise
fi

$GET $GET_OPTS http://dis.4chan.org/prog/subject.txt | sed '/'"$*"'/!d;s/^\(.*\)<>.*<>.*<>\(.*\)<>.*<>.*<>\(.*\)$/echo; echo Title: \1; echo URL: http:\/\/dis.4chan.org\/read\/prog\/\2; echo -n "Posted: "; $DATECMD\2; echo -n "Last Post: "; $DATECMD\3; echo/' | sh


and if your system's date utility doesn't work like the gnu or bsd one, you can just grab the source from http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/date/ and compile it.
and the rest of it is all POSIX.

Name: Anonymous 2008-09-06 3:06

>>19
oops...
#!/bin/sh

if [ -z $1 ]
then
 echo "USAGE: $0 [regex]" 1>&2
 exit
fi

GET=`basename \`which fetch curl wget lynx w3m links elinks | head -n1\``
case $GET in
 fetch)
  GET_OPTS="-qo-"
  ;;
 curl)
  GET_OPTS="-s"
  ;;
 wget)
  GET_OPTS="-qO-"
  ;;
 lynx)
 links)
 elinks)
  GET_OPTS="-source"
  ;;
 w3m)
  GET_OPTS="-dump_source"
  ;;
 *)
 echo "ERROR: could not find one of: fetch curl wget lynx w3m links elinks" 1>&2
 exit
 ;;
esac

if date --help 2>&1 >/dev/null
then
 DATECMD="date -d @" # assume gnu date if --help works
else
 DATECMD="date -r " # assume bsd date otherwise
fi

$GET $GET_OPTS http://dis.4chan.org/prog/subject.txt | sed '/'"$*"'/!d;s/^\(.*\)<>.*<>.*<>\(.*\)<>.*<>.*<>\(.*\)$/echo; echo Title: \1; echo URL: http:\/\/dis.4chan.org\/read\/prog\/\2; echo -n "Posted: "; $DATECMD\2; echo -n "Last Post: "; $DATECMD\3; echo/' | sh

Name: Anonymous 2008-09-06 7:13

>>14,15
This may surprise you, but scanning subject.txt is absolutely fucking useless, since it contains only thread names.

Name: Anonymous 2008-09-06 7:15

>>21
One of those numbers at the end is the date of the most recent post in that thread. It's a perfectly sensible way of keeping track of changes.

Name: Anonymous 2008-09-06 7:17

>>22
Do you realize the topic of this thread is ``Best way to search /prog/'', not ``Best way to track /prog/ changes'' (there was a practical /prog/ challenge about the latter topic some time ago, by the way)?

Name: Anonymous 2008-09-06 8:32

>>23
And >>15 is about keeping a hypothetical Shiitchan filesystem up to date for easy searching, for which subject.txt is perfect. Learn to read.

Name: Anonymous 2008-09-06 10:10

>>24
I am >>15 and I was talking about dumping /prog/ to local system. Maybe you missed the Download whole /prog/ while you were reading.
And, >>23, this may surprise you, but we here in /prog/ don't really care about thread topics.

Name: Anonymous 2008-09-06 13:06

>>25
You managed to miss the point of both posts you're replying to.

Name: Anonymous 2008-09-06 14:02

>>25
(load "facepalm.scm")

Name: Anonymous 2008-09-09 7:25

yeh, jus download the whole thing and then grep -ri it. easy

Name: Anonymous 2008-09-09 9:23

>>1
You're going to have to maintain your own index of /prog/ if you want to search it. Now that I think about it, I feel like doing a Haskell bot to index the whole of /prog/.

Name: Anonymous 2008-09-09 10:11

>>29
easier in python (no troll, srsly)

Name: Anonymous 2008-09-09 11:09

>>30
The Abelson?!

Name: Anonymous 2008-09-09 11:47

>>30
I challenge you to do it in COBOL.

(It's easier than you think.)

Name: Anonymous 2008-09-09 12:00

>>30 here
i say it's easier in python because of easy sockets and sqlite3 integration.

i mite post some code later on...

Name: Anonymous 2008-09-09 12:13

>>33
Because those are Python-only constructs, of course.

Name: Anonymous 2008-09-09 12:20

>>34
>Because those are Python-only constructs, of course.

no one said that.

Name: Anonymous 2008-09-09 16:20

>>34 has a point, it would be just as easy to do in PHP.

Name: Anonymous 2008-09-10 0:22

I love Java!!!

Name: Anonymous 2008-09-10 0:26

>>36
It's just as easy to do in lisp.

Name: Anonymous 2008-09-10 6:55

Needs more Shiichan FUSE module.

Name: Anonymous 2008-12-01 13:31

Name: Anonymous 2008-12-01 13:42

hax my anus

Name: Anonymous 2008-12-01 13:44

>>41

hax MY anus??

Name: Anonymous 2008-12-01 14:10

>>42
It's more likely than you think.

Name: Anonymous 2008-12-01 21:32

site:dis.4chan.org/read/prog/ ""

Name: Anonymous 2008-12-01 23:29

stop bumping my old threads damn it.

Name: Anonymous 2008-12-02 8:18

>>45
Bumping with legitimate content is rare enough that I think it can be justified in this case.

Name: Anonymous 2008-12-02 20:35

I know how to search /prog/.  And I can tell you how.

(661) 333-0012
EXPERT PROGRAMMER'S OFFICE of California, apply now!

Name: Anonymous 2009-02-25 7:07

-qo?

Name: Anonymous 2010-12-27 14:35


Don't change these.
Name: Email:
Entire Thread Thread List