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

FOLLOW THE SIMPLE RULES

Name: Anonymous 2009-08-13 2:54

http://lisperati.com/landoflisp/

I'm sure everyone on /#haskell/ /prog/ has seen this already but I didn't find a reference to it in my cursory evaluation of this board's activity from the past year or two (ie. by glancing at the front page; anything else would require side effects).

Name: Anonymous 2009-08-13 2:58

It was a fun little comic.

Name: Anonymous 2009-08-13 3:11

sqlite> select "http://dis.4chan.org/read/prog/" || thread || "/" || id from posts where body like '%lisperati.com/landoflisp%';
http://dis.4chan.org/read/prog/1207139373/1
http://dis.4chan.org/read/prog/1207139373/4


http://github.com/Cairnarvon/progscrape/tree/master

Get with it, man.

Name: Anonymous 2009-08-13 4:35

>>3
How hard is this to modify for python 2.6?

Name: Anonymous 2009-08-13 5:15

>>4
It should work without modifications.
Won't work for Py3k, though, though I can't remember why. Maybe the sqlite3 library hadn't been ported, or something.

Name: Anonymous 2009-08-13 5:21

>>5
It seems to complain about a number of entries to subject.txt and it spits up
Traceback (most recent call last):
  File "./progscrape.py", line 166, in <module>
    db.execute('INSERT INTO posts (thread, id, author, email, trip, time, body) VALUES (?, ?, ?, ?, ?, ?, ?)', b)
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
when run. I'll just going to run it through the python debugger and see if I can get more info, but IIRC they made some string changes to py2.6 that may be at fault

Name: Anonymous 2009-08-13 5:49

>>6
What happens if you stick random us in front of strings?

Name: Anonymous 2009-08-13 6:21

>>7
うううう~

Name: Anonymous 2009-08-13 6:23

>>7
I get a message asking if you're okay. Cudder are you okay? are you okay cudder?

Name: Anonymous 2009-08-13 7:44

>>7
Unsurprisingly, it didn't work. So I just took the lazy route and converted all the data going into the database to unicode. Seems to be working fine, but I won't know till I've done a full update.

Name: Anonymous 2009-08-13 7:46

>>10
Typical, it choked as soon as I pressed Reply

Name: Anonymous 2009-08-13 8:32

So, somebody fucking fix it then

I want to get my /prog/scrape on

Name: Anonymous 2009-08-13 8:37

>>12
It's fine if you're using python 2.5, my port to 2.6 is ongoing

Name: Anonymous 2009-08-13 8:54

>>13
Bonus points if it's backward compatible. I'd do it myself, but I can't even get 2.6 to load the sqlite module.

Name: Anonymous 2009-08-13 9:08

>>12
If you just want the database to play with, try this: http://cairnarvon.rotahall.org/misc/prog.db.lzma
That's current as of a few minutes ago.

Building it from scratch will take over two hours even when dis is playing nice.

Name: Anonymous 2009-08-13 10:52

>>15
What the fuck is this format? I can't open it on Windows 95

Name: Anonymous 2009-08-13 11:01

Name: Anonymous 2009-08-13 11:28

>>16
Step 1: Use Linux.
Step 2: Use the unlzma command.
Step 3: There is no step 3.

Name: Anonymous 2009-08-13 13:23

Quick Update:
After a quicklong time building the database from scratch, there are only 12 Unicode Errors to fix.
If you care, see http://prog.pastebin.com/mad7088c for more details

Name: Anonymous 2009-08-13 23:31

http://cairnarvon.rotahall.org/misc/whut.mp3
Xarn's phunky Phlemish beat-breaks.

Name: Anonymous 2009-08-14 0:29

Trust me: you'd much rather hang with a couple of guys like us and not live in a sterile totalitarian state like on the other side.

Name: Anonymous 2009-08-14 4:36

>>20
whut?

Name: Anonymous 2009-08-14 13:18

>>1
What's the moral of that story? Do they want us to use functional programming or not?

Name: Anonymous 2009-08-14 13:24

>>23
They're using functional programming anyway.
The moral of the story is that while Haskell is good and all, non-purely functional dynamic languages like lisp (without strict typechecking) have a place too.

Name: Anonymous 2009-08-14 13:25

>>23
Based on that story, I'd say not. But with lisps, you generally code as you see fit, rather than sticking to a particular model.

Name: Anonymous 2009-08-14 13:28

>>22
American patriots who are against big government.

Name: Anonymous 2009-08-14 14:37

>>24
The comic says nothing about type systems, although smug Lisp weenies would still rather have you using Scheme than OCaml.

By the way, the irony in the comic that you failed to notice (or ignored, you roguish troll, you) is the way that "cheating" with side effects is portrayed as unsafe. The Lisp programmers manage to demolish a forest and vaporize a cat in the course of writing their programs, and these are real dangers that programmers face every day in impure languages like C and Prolog. Basically, the whole thing is satirizing the Lisp community even more than it's making fun of Haskell.

Name: Anonymous 2009-08-14 14:57

>>3
Someone should re-write this in Haskell... or maybe a Lisp.

Name: Anonymous 2009-08-14 15:01

>>27
It actually does mention type systems in panel 60, but I suspect >>24 believes ``side-effects'' means ``dynamic typing''.

Name: Anonymous 2009-08-14 15:05

This was a good comic, and I wish to see more content like this posted on /prog/

Name: Anonymous 2009-08-14 15:52

>>28
Oh god, I lol'd. As if an academic language is capable of expressing a useful program like that...

Name: Anonymous 2009-08-14 16:04

>>31
Do I hear a challenge?

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-14 16:09

Side-effects are just like using global variables. They are very useful in practice and require non-trivial code workarounds(like monads,uniqueness) to replace(for perceived stability/bugless code).



________________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
Men who long for freedom begin the attempt to obtain it by entreating their masters to be kind enough to protect them by modifying the laws which these masters themselves have created!

Name: Anonymous 2009-08-14 16:22

>>33
(for perceived stability/bugless code)
I like how you worded that to indicate that the reduction in bugs is completely imaginary. You're right, but you'll never get into college saying stuff like that.

Name: Anonymous 2009-08-14 16:41

>>33
Spoiler: [spoiler]Haskell allows side-effects, it just requires that "functions" declare their use of side-effects in their types.[spoiler] It's not that hard.


main = do
    stuff <- getContents
    putStrLn "Here's the stuff you typed in."
    putStrLn stuff

Name: Anonymous 2009-08-14 16:52

>>35
It's not that hard.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-08-14 17:00

http://www.cs.auckland.ac.nz/references/haskell/haskell-intro-html/io.html
So, in the end, has Haskell simply re-invented the imperative wheel?

In some sense, yes. The I/O monad constitutes a small imperative sub-language inside Haskell, and thus the I/O component of a program may appear similar to ordinary imperative code. But there is one important difference: There is no special semantics that the user needs to deal with. In particular, equational reasoning in Haskell is not compromised. The imperative feel of the monadic code in a program does not detract from the functional aspect of Haskell. An experienced functional programmer should be able to minimize the imperative component of the program, only using the I/O monad for a minimal amount of top-level sequencing. The monad cleanly separates the functional and imperative program components. In contrast, imperative languages with functional subsets do not generally have any well-defined barrier between the purely functional and imperative worlds.



_________________________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
However, this campaign is not about killing Spartacus. It is to kill the legend of Spartacus.

Name: Anonymous 2009-08-14 17:29

>>35
However, Haskell does not allow global state, meaning you have to pass state arguments all over hell's half acre. This is just as bad as not allowing side effects.

Name: Anonymous 2009-08-14 17:41

>>35
Spoiler: Spoilers are not that hard

Name: Anonymous 2009-08-14 17:57

>>38
You suck at Haskell, and presumably functional programming in general. Perhaps you knew this already.

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