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

/prog/ is

Name: Anonymous 2012-03-11 19:41

probably the most popular Western text board on the Web.

Name: Anonymous 2012-03-11 19:45

Is that so?

Name: Anonymous 2012-03-11 20:01

>>2
Soo, desu!

Name: Anonymous 2012-03-11 20:04

this isn't the web this is my monitor you are all little bugs that live in my monitor and come out when I summon you with my magical song

oh my god lisp

lisp lisp lisp

smoke weed everyday, it makes /prog/ less annoying

>>5
JACKSON 5 GET

Name: Anonymous 2012-03-11 21:18

Does anyone have a script to remove newlines from a text file, unless they form a line break with a blank line in the middle?

Sick of old text files capped at 72/80 character widths fucking up my shit.

Name: Anonymous 2012-03-11 22:40

have some lua:


#!/usr/bin/lua


local function line_is_empty(str)
  return str == '' or str:match('^%s*$')
end

local function filter_file(input, output)
  local loop
  loop = function(previous_line, current_line)
    if current_line == nil then
      output(previous_line .. '\n')
    elseif line_is_empty(previous_line) or line_is_empty(current_line) then
      output(previous_line .. '\n')
      loop(current_line, input())
    else
      output(previous_line .. ' ')
      loop(current_line, input())
    end
  end
  local first_line = input()
  if first_line ~= nil then
    loop(first_line, input())
  end
end

local function main()
  filter_file(io.lines(), function(str) io.write(str) end)
end

main()

Name: Anonymous 2012-03-11 22:42

Reminds me of Python. Looks like shit.

Name: Anonymous 2012-03-11 22:45

Here, I'll make it look better:


$ cat s.lua | s.lua
#!/usr/bin/lua


local function line_is_empty(str)   return str == '' or str:match('^%s*$') end

local function filter_file(input, output)   local loop   loop = function(previous_line, current_line)     if current_line == nil then       output(previous_line .. '\n')     elseif line_is_empty(previous_line) or line_is_empty(current_line) then       output(previous_line .. '\n')       loop(current_line, input())     else       output(previous_line .. ' ')       loop(current_line, input())     end   end   local first_line = input()   if first_line ~= nil then     loop(first_line, input())   end end

local function main()   filter_file(io.lines(), function(str) io.write(str) end) end

main()
$

Name: Anonymous 2012-03-12 5:52

>>1
There are plenty of interesting mailing lists and usenet groups that are quite active.
I'm not so sure /prog/ is that popular if you consider those, but they are not really text-boards and don't have a culture of anonymity. I do think their quality tends to be higher than /prog/'s, but /prog/ has its own advantages which they don't have.

Name: Anonymous 2012-03-12 19:36

niggers

Name: Anonymous 2012-03-12 19:44

check le dub

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