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

Pages: 1-4041-

SICP, other texts

Name: Anonymous 2010-04-25 15:41

What's the big deal with SICP? Why does /prog/ recommend it for people learning programming? Is it because of the general outlook it gives you on programming (ex: programs aren't just instructions for a computer, but rather methodological paths to implement goals) and therefore gives a better understanding of how programming isn't a task but instead a definition that goes beyond computing? Is it because the language gives you insight into the fact that there are many different ways to get something done, unlike "modern" languages that simplify the API-calling-API-calling-API-calling-API system such that many programmers no longer have any idea of what they're actually doing?

Are there any other books or learning tools that /prog/ would recommend for functional (not functional vs imperative, but functional as in getting-things-done) learning?

Finally, what do the people of /prog/ do with their knowledge in programming with respect to computers and software? Hackers, task-men, etc.?

Name: Anonymous 2010-04-25 15:47

NO EXCEPTIONS

Name: Anonymous 2010-04-25 16:15

Finally, what do the people of /prog/ do with their knowledge in programming with respect to computers and software?
We meditate our lives away, contemplating abstract mathematical bullshité.

Name: Anonymous 2010-04-25 16:26

What's the big deal with lurking more? Why does /b/ recommend it for people learning 4chan? Is it because of the general outlook it gives you on postings (ex: posts aren't just text on a computer, but rather methodological words to implement trolls) and therefore gives a better understanding of how trolling isn't a task but instead a lifestyle that goes beyond computing? Is it because the troll gives you insight into the fact that there are many different ways to take something too seriously, unlike "modern" posters that simplify the meme-spamming-meme-spamming-meme-spamming-meme system such that many trolls no longer have any idea of what they're actually doing?

Are there any other copypasta or learning tools that /b/ would recommend for functional (not functional vs functional, but functional as in functional) learning?

Finally, what do the people of /b/ do with their knowledge in trolling with respect to forums and friends? Trollers, troll-men, etc.?

Name: Anonymous 2010-04-25 23:18

>>4
7/10. would read again

Name: Anonymous 2010-04-26 0:13

I contribute to libjit.

Name: Anonymous 2010-04-26 1:17

What's the big deal with SICP? Why does /prog/ recommend it for people learning programming?
If you read it you'll understand. That sounds trite, but it's true. The concepts hard to defend without explaining them fully. So just read it already.

Finally, what do the people of /prog/ do [...]
I write some ARM-targeted software. (With and without an OS.) Aside from that, I work on audio synthesis and mixing software. None of it is OSS. I don't really feel bad about that.

Name: Anonymous 2010-04-26 3:52

>>7
I agree. Same goes for the Bible.

Name: Anonymous 2010-04-26 4:36

>>8
what?

Name: >>9 2010-04-26 4:53

Nevermind, I thought that >>8 responded to the last sentence of >>7's post.

Name: Anonymous 2010-04-26 6:18

>>9

me too

had a nice "wut" moment

Name: Anonymous 2010-04-26 7:10

WUT MY ANUS

Name: Anonymous 2010-04-26 7:45

wut
* what

Name: Anonymous 2010-04-26 16:56

OP here:

>>3
I already knew that one.

>>4
Yeah, that was actually really well done.

>>6
Oh, hey, cool.

>>7
I've actually already gone through it. I'm asking what the people of /prog/ have derived from it and why they feel it's important. Regardless, I do understand what you mean - I know of many "programmers" who go deer-eyed when they realize that programming isn't meant to just be a hacked together set of plagiarized code.

Interesting work, though. I see no reason to feel bad about doing closed-source work. My only problem with it is when people let a free project atrophy and continue to claim it'll "get better" until people are finally fed up and start doing it on their own (Project64/Mupen64+). Yet, I still feel as though some software should almost always be open source. For me it's drivers. Companies have taken forced obsolescence and proprietization too far, like nVidia disabling CUDA as soon as you install an ATI graphics chip alongside it.

Name: Anonymous 2010-04-26 17:39

sagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesagesage>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14>>14

Name: Anonymous 2010-04-28 23:19

What else is there beside SICP?

Name: Anonymous 2010-04-28 23:36

Name: Anonymous 2010-04-29 0:12

how do i fucking sage???

Name: 18 2010-04-29 0:18

how do i do this >>15

like display code just as everybody else does on /prog/

Name: EXPERT PROGRAMMER 2010-04-29 0:55

>>19
WITH BBCODE MOTHERFUCKER

Name: Anonymous 2010-04-29 6:21

EXPERT BBCODEEXPERT BBCODEEXPERT BBCODE

Name: Anonymous 2010-04-29 10:28

>>21
There goes the thread, off on another BBCode tangent.

Name: Anonymous 2010-04-29 11:06

>>21
Your asymptotes are beautiful.

Name: Anonymous 2010-04-29 11:35

>>22
I was trying to incorporate a tangent pun myself, but couldn't think of anything really clever. Thanks.

Name: Anonymous 2010-04-29 12:48

>>21
TAN MY ANUS

Name: Anonymous 2010-04-29 14:45

>>25
Why do I get the feeling you're more interested in things cotangental to your ass?

Name: Anonymous 2010-04-29 15:07

>>26
would you like to have secs with me?

Name: Anonymous 2010-04-29 15:11

No, I would not like to have secs with you.

Name: Anonymous 2010-04-29 15:19

>>26
Don't speak to it.

Name: Anonymous 2010-04-29 19:14

Why did the hypotenuse cross the road?

To get to the sine store

Name: Anonymous 2010-04-29 20:27

code complete 2nd edition

Name: Anonymous 2010-04-29 20:30

Name: Anonymous 2010-04-29 20:31

woops fail

Name: Anonymous 2010-04-29 20:47

>>33
On more levels than you know.

Name: Anonymous 2010-04-29 21:10

how so?

Name: Anonymous 2010-04-29 21:11

how so?

Name: Anonymous 2010-04-29 21:26

>>32
I have not read one single book in that list.

Name: Anonymous 2010-04-29 22:53

>>37
I really have to agree with him on that Programming Pearls graph. It is beautiful.

There are a few pretty good books in there. Mastering Your Second Problem is probably a must-read for anyone with that kind of... problem.

Name: Anonymous 2010-04-30 2:15

Jeff Atwood? More like Jeff Fatwood amirite?

Name: Anonymous 2010-04-30 12:46

Don't mind me, I'm just

TESTING EXPERT BBCODE TANGENT testing expert bbcode tangent1234567890

Name: Anonymous 2010-04-30 15:44

>>40
Post your code, anuslord

Name: Anonymous 2010-04-30 17:04

>>41
I feel kind of bad about this code.

--BBCODE TANGENT
tangent "" = ""
tangent x = x1 ++ x2 ++ x3 ++ sup (x4 ++ x5 ++ sup (x6 ++ x7 ++ nest "sup" (x8 ++ nest "sup" (x9 ++ (nest "sup" x10 10)) 2) 2)) ++ sub(sub((sub((sub ((nest "sub" ((nest "sub" ((nest "sub" x11 10) ++ x12) 4) ++ x13) 2) ++ x14)) ++ x15))++x16++x17) ++ x18 ++ x19 ++ x20) ++ tangent xs where
    (x1,rest)= splitAt 1 x
    (x2,rest1)=splitAt 1 rest
    (x3,rest2)=splitAt 1 rest1
    (x4,rest3)=splitAt 1 rest2
    (x5,rest4)=splitAt 1 rest3
    (x6,rest5)=splitAt 1 rest4
    (x7,rest6)=splitAt 1 rest5
    (x8,rest7)=splitAt 1 rest6
    (x9,rest8)=splitAt 1 rest7
    (x10,rest9)=splitAt 1 rest8
    (x11,rest10)=splitAt 1 rest9
    (x12,rest11)=splitAt 1 rest10
    (x13,rest12)=splitAt 1 rest11
    (x14,rest13)=splitAt 1 rest12
    (x15,rest14)=splitAt 1 rest13
    (x16,rest15)=splitAt 1 rest14
    (x17,rest16)=splitAt 1 rest15
    (x18,rest17)=splitAt 1 rest16
    (x19,rest18)=splitAt 1 rest17
    (x20,xs)=splitAt 1 rest18

--[t][t]x[/t][/t]
nest _ _ 0 = []
nest t x 1 = "[" ++ t ++ "]" ++ x ++ "[/" ++ t ++ "]"
nest t x n =  "[" ++ t ++ "]" ++ (nest t x (n - 1)) ++ "[/" ++ t ++ "]"

--[sup]x[/sup]
sup x=nest "sup" x 1

--[sub]x[/sub]
sub x=nest "sub" x 1

Name: Anonymous 2010-04-30 17:08

>>42
THIS CODE IS BAD AND YOU SHOULD FEEL BAD

Name: Anonymous 2010-04-30 23:57

>>42
splitAt splitAt splitAt splitAt splitAt splitAt splitAt splitAt splitAt
Are you fucking serious.

Name: この>>44さま 2010-05-01 0:06

Here, I made it less retarded for you. Thank me later.

--BBCODE TANGENT
tangent "" = ""
tangent x = x1 ++ x2 ++ x3 ++ sup (x4 ++ x5 ++ sup (x6 ++ x7 ++ nest "sup" (x8 ++ nest "sup" (x9 ++ (nest "sup" x10 10)) 2) 2)) ++ sub(sub((sub((sub ((nest "sub" ((nest "sub" ((nest "sub" x11 10) ++ x12) 4) ++ x13) 2) ++ x14)) ++ x15))++x16++x17) ++ x18 ++ x19 ++ x20) ++ tangent xs where
    (x1:x2:x3:x4:x5:x6:x7:x8:x9:x10:x11:x12:x13:x14:x15:x16:x17:x18:x19:x20:y)=
      map (:[]) x ++ replicate 20 ""
    xs = concat y

Name: >>42さん 2010-05-01 1:56

*★〜度もありがとうございました。〜★* >>44さま

Also, I just realised I forgot patterns for empty strings, so that retarded stuff like this []x[/] or this [t][/t] doesn't happen.


--[t][t]x[/t][/t]
nest _  _ 0 = []
nest _ [] _ = []
nest [] _ _ = []
nest t  x 1 = "[" ++ t ++ "]" ++ x ++ "[/" ++ t ++ "]"
nest t  x n =  "[" ++ t ++ "]" ++ (nest t x (n - 1)) ++ "[/" ++ t ++ "]"

Name: Anonymous 2010-05-01 3:40

nest :: String -> String -> Int -> String
nest _ "" _ = ""
nest t s n = open ++ s ++ close
    where open = grab ("[" ++ t ++ "]")
          close = grab ("[/" ++ t ++ "]")
          grab = concat.(take n).repeat

Name: Anonymous 2010-05-01 6:00

>>47

*Nest> nest "" "let's see" 3
"[][][]let's see[/][/][/]"


It still should return the original String if you try to nest it in "" tags.


nest :: String -> String -> Int -> String
nest _ "" _ = ""
nest "" s _ = s
nest t s n = open ++ s ++ close
   where open = grab ("[" ++ t ++ "]")
        close = grab ("[/" ++ t ++ "]")
         grab = concat.(take n).repeat

Name: Anonymous 2010-05-01 9:01

>>45
(x1:x2:x3:x4:x5:x6:x7:x8:x9:x10:x11:x12:x13:x14:x15:x16:x17:x18:x19:x20:y)=
Still looks pretty retarded. Include an input for the number of radians to cycle through, then determine the number of [sup]s and [sub]s to use for each character by the value of tan for its index. Optimise output size later.

Name: この>>44さま 2010-05-01 12:25

>>49
I never said I actually made it intelligent. I merely wiped up the largest blob of drool. It wasn't even the most embarrassing blob.

Name: Anonymous 2010-05-01 14:44

>>48
Then don't use invalid tags, check against a list of valid tags, or pass a tagging function rather than a tag string.

Name: Anonymous 2010-05-01 14:48

>>51
Like so?

module BBCode where

import Data.Char
import Data.List -- (intercalate)
import Control.Applicative

data BBCodeStyle = B | I | O | U | S | M | AA | Sup | Sub | Spoiler | Code
  deriving (Eq, Show)

data BBCodeText = Style [BBCodeStyle] BBCodeText | Text String
    | Sep BBCodeText [BBCodeText]
  deriving Show

render = putStrLn . go -- . optimize
  where go (Text s) = s
        go (Sep s bs) = go s `intercalate` map go bs
        go (Style ts bt) = makeTag ts $ go bt
        makeTag [] = id
        makeTag (x:xs) = surround (nameOf x) . makeTag xs
        nameOf = map toLower . show
        surround name text = concat ["[", name, "]", text, "[/", name, "]"]

-- This is useless right now but I want to use it to remove adjacent
-- closing/opening bbcode tags, which is the whole reason I did this all as
-- combinators instead of just passing strings around
optimize = go
  where go (Style [] t) = optimize t
        go (Sep (Text "") xs) = undefined -- let ys = groupBy sameStyle xs
        -- Breaks [sub][sub] etc. :(
        -- go (Style (x:xs@(y:ys)) t) | x == y = optimize (Style xs t)
        go anything = anything

sameStyle (Style (x:_) _) (Style (y:_) _) = x == y
sameStyle _ _ = False

buttsort fs = bbConcat . go (cycle fs)
  where go fs (' ':xs) = Text " " : go fs xs
        go (f:fs) (x:xs) = f [x] : go fs xs
        go _ [] = []

style xs = Style xs . Text
style1 = style . pure

[bbUnlines, bbUnwords, bbConcat] = map (Sep . Text) ["\n", " ", ""]

expert = style [B, I, O, U]
loveyourpost = bbUnwords $ zipWith style1 [B, I, O, U] $
  lines "I LOVE YOU!\nI LOVE YOUR POST!\nI READ IT FIVE TIMES!\nKEEP POSTING!"
fibsButtSort = buttsort [style1 U, style1 O]

Name: Anonymous 2010-05-01 15:22

>>52
-- This is useless right now but I want to use it to remove adjacent
-- closing/opening bbcode tags, which is the whole reason I did this all as
-- combinators instead of just passing strings around
Can't you just use a regex

Name: Anonymous 2010-05-01 15:59

This, people, is why SICP is important. It makes people turn retarded code into less retarded code by proving there's more than one fucking way to do something, and there's going to be a best way in every case.

Name: 51 2010-05-01 16:34

>>52
BBCODE isn't case sensitive; you don't need to map toLower

Also, shouldn't sameStyle be recursive? Something like sameStyle (Style s1 _) (Style s2 _) = and . zipWith (==) s1 s2?

Other than that, thank you. You have restored my faith in /prog/ after the most horrific mangling of Haskell I have ever seen.

Name: Anonymous 2010-05-01 16:42

>>52
# aa b code i m o s spoiler sub sup u
You are missing the octothorpe tag.

Name: Anonymous 2010-05-01 16:57

>>52
`intercalate`
Jolly good! *monocle*

Name: Anonymous 2010-05-01 21:16

>>55
Oh really?

Name: Anonymous 2010-05-01 21:16

Huh. Interesting.

Name: Anonymous 2010-05-01 22:19

>>53
Can't you just use a regex
A regex alone is not enough medicine. This is more of a parser problem, and I don't want to parse the BBCode. I already generated it programmatically.

>>55
Also, shouldn't sameStyle be recursive? Something like sameStyle (Style s1 _) (Style s2 _) = and . zipWith (==) s1 s2?
It's a bit of a misnomer. It's only for checking the outermost style, so I can rewrite [b]foo[/b][b]bar[/b] as [b]foobar[/b]. Refer to the comments.

Other than that, thank you. You have restored my faith in /prog/ after the most horrific mangling of Haskell I have ever seen.
I dunno. I think /prog/ needs a lot more work than just that.

>>56
I didn't have any test functions that generate it. Write me one and I'll buckle down and manually write a Show instance or something.

Name: Anonymous 2011-02-04 17:30


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