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

Post Code

Name: Anonymous 2011-03-04 21:33

One recurring complaint is that nobody talks about code on /prog/. So everyone write go and write some code, any code, that does something, anything, and post it. A small explanation wouldn't go amiss either.

Name: Anonymous 2011-04-03 16:34

error "stack overflow"

Name: Anonymous 2011-04-04 2:46


rmbOrder sel screenXY -> played:no
 -> t:(screenXY.selectPoint."id")
    c:[screenXY.screenToCell [1 1]]
    for [id@_] in sel u:units,id {
    -> as:(map unitTypes.? u."acts" |> strip ?."nonRMB")
    -> t&&(fnd (canAct u ? t) as).{a:ye?->[a t]} || (fnd (canAct u ? c) as).{a:ye?->[a c]}
       |> {[a t] -> order (a."dst"=:t) id
                 -> played||(unitSay "acknowledgement" id; played=:ye)}
    }

Name: Anonymous 2011-04-04 3:05

>>282
When I see some ``in Lisp'' DSL code, I just skip the thread.

Name: Anonymous 2011-04-04 3:11

>>283
Why so butthurt?

Name: Anonymous 2011-04-04 3:12

>>284
Not ``butthurt'', I'm just not a Perl programmer.

Name: Anonymous 2011-04-04 3:13

>>285
perl is too verbose.

Name: Anonymous 2011-04-04 3:17

Anyway, I should provide more concise syntax for list."key". These quotes look awful.

Name: Anonymous 2011-04-04 3:20

>>287
list<~key, list%key, list#key key∈list.

Name: Anonymous 2011-04-04 3:26

>>288
No. I'll redefine '.', so it'll check against environment variables.

Name: Anonymous 2011-04-04 4:25


#include <iostream>
using namespace std

int main()
{
}

Name: Anonymous 2011-04-04 4:38

>>290
using namespaceMY ANUS

Name: Anonymous 2011-04-04 4:38

>>290
Missing a semicolon<std::vector::boost::function<int, std::map::parallel::functor<std::iomanip<std::iostream::operator==>, std::vector<bool> > >

Name: Anonymous 2011-04-04 4:52

>>292
boost
Tsk.

Name: Anonymous 2011-04-08 2:58

Name: Anonymous 2011-04-08 3:04

>>291
iostream my anus

Name: Anonymous 2011-04-08 4:35

#include <stdio.h>

int main(int argc, char* argv[])
{
    char msg[23];
    for(int i = 0; i < 22; ++i)
    {
        msg[i] = ((((~(i >> 4)) & 1) & ((~(i >> 3)) & 1) & ((~(i >> 2)) & 1) & ((~(i >> 1)) & 1)) |
            (((~(i >> 3)) & 1) & ((i >> 1) & 1) & ((~i) & 1)) | (((i >> 3) & 1) & ((~(i >> 2)) & 1) &
            ((i >> 1) & 1)) | (((i >> 4) & 1) & ((i >> 1) & 1)) | (((i >> 4) & 1) & ((~i) & 1)) |
            (((~(i >> 3)) & 1) & ((i >> 2) & 1) & ((~(i >> 1)) & 1) & (i & 1))) | (((((~(i >> 4)) & 1) &
            ((~(i >> 3)) & 1) & ((~(i >> 2)) & 1) & ((~(i >> 1)) & 1) & (i & 1)) | (((~(i >> 4)) & 1) &
            ((~(i >> 3)) & 1) & ((i >> 2) & 1) & ((~i) & 1)) | (((i >> 3) & 1) & ((~(i >> 2)) & 1) &
            ((i >> 1) & 1)) | (((i >> 4) & 1) & ((i >> 1) & 1) & ((~i) & 1))) << 1) | (((((~(i >> 4)) & 1) &
            ((~(i >> 2)) & 1) & ((~(i >> 1)) & 1) & (i & 1)) | (((~(i >> 2)) & 1) & ((i >> 1) & 1) &
            ((~i) & 1)) | (((i >> 3) & 1) & ((i >> 2) & 1) & ((~i) & 1)) | (((i >> 4) & 1) & ((~i) & 1)) |
            (((~(i >> 3)) & 1) & ((i >> 2) & 1) & (i & 1))) << 2) | (((((~(i >> 4)) & 1) & ((~(i >> 3)) & 1) &
            ((~(i >> 2)) & 1) & ((~(i >> 1)) & 1)) | (((~(i >> 4)) & 1) & ((~(i >> 2)) & 1) & ((~(i >> 1)) & 1) &
            (i & 1)) | (((i >> 3) & 1) & ((~(i >> 2)) & 1) & ((i >> 1) & 1) & ((~i) & 1)) | (((i >> 3) & 1) &
            ((i >> 2) & 1) & ((i >> 1) & 1) & (i & 1)) | (((~(i >> 3)) & 1) & ((i >> 2) & 1) & ((~(i >> 1)) & 1)&
            ((~i) & 1))) << 3) | (((((~(i >> 4)) & 1) & ((~(i >> 3)) & 1) & ((~(i >> 2)) & 1) & ((~i) & 1)) |
            (((~(i >> 3)) & 1) & ((i >> 2) & 1) & ((i >> 1) & 1)) | (((~(i >> 4)) & 1) & ((~(i >> 3)) & 1) &
            ((i >> 2) & 1) & (i & 1)) | (((i >> 3) & 1) & ((~(i >> 2)) & 1) & ((i >> 1) & 1) & (i & 1)) |
            (((i >> 3) & 1) & ((i >> 2) & 1) & ((~i) & 1))) << 4) | (((((~(i >> 4)) & 1) & ((~(i >> 3)) & 1) &
            ((~(i >> 2)) & 1) & ((i >> 1) & 1) & (i & 1)) | (((i >> 3) & 1) & ((~(i >> 2)) & 1) & ((~(i >> 1)) & 1) &
            ((~i) & 1)) | (((i >> 3) & 1) & ((i >> 2) & 1) & ((~(i >> 1)) & 1) & (i & 1)) | (((i >> 4) & 1) &
            ((~(i >> 2)) & 1) & ((~(i >> 1)) & 1) & (i & 1))) << 5) | (((((~(i >> 4)) & 1) & ((~(i >> 2)) & 1) &
            ((~(i >> 1)) & 1) & (i & 1)) | (((i >> 3) & 1) & ((i >> 1) & 1)) | (((~(i >> 3)) & 1) & ((~i) & 1)) |
            (((i >> 4) & 1) & ((i >> 1) & 1)) | (((i >> 2) & 1) & ((~i) & 1)) | (((~(i >> 3)) & 1) & ((i >> 2) & 1))) << 6);
    }
    msg[22] = 0;
    printf("%s", msg);
    getchar();
}

Name: Anonymous 2011-04-08 5:07

>>296

you must think your so clever

fuckling idiot

Name: Anonymous 2011-04-08 5:43

>>296
This was posted before.

Name: Anonymous 2011-04-08 6:27

>>298
Are you suggesting that it is irrelevant to the topic?

Name: Anonymous 2011-04-08 6:59


module PmeCubic where
solvePmeCubic :: [Integer] -> [(Integer, Integer, Integer, Integer)]
solvePmeCubic s = [(a, b, c, d) |
  d <- s, c <- s, b <- s, a <- s,
  fromIntegral(a ^ 3 + b ^ 3) /
  fromIntegral(c ^ 3 + d ^ 3) ==
  fromIntegral(a + b) /
  fromIntegral(c + d)]

Name: Anonymous 2011-04-08 7:07

fibo 0 = 91
fibo 3 = 323
fibo n = fibo (n-1)

Name: Anonymous 2011-04-08 7:17


 return;


This returns from within a function to the caller.

Name: Anonymous 2011-04-08 8:10

RET

This pops the return value from the top of the stack and jumps to it.

Name: Anonymous 2011-04-08 11:37

>>301
so fibo n for a natural number n returns 91 if n < 3, and 323 otherwise?

Name: Anonymous 2011-04-08 11:41

>>304
please visit zoklet we have many gentlemen who discuss fibo
http://www.zoklet.net/bbs/register.php

Name: Anonymous 2011-04-10 4:22

color c00
set "DARK" to random 1 to 8
set "LIGHT" to "(&DARK&<<4o&DARK&o128)"
inc "DL" by 1
set "commands" to 30000
wait for 1
put player at 0 0

loop start
put "DARK" CustomBlock pb2 at "('loopcount'%'board_w')" "('loopcount'/'board_w'+1)"
loop for "('board_w'*('board_h'-2)-1)"

set "rcount" to 4
set "rooms" to 0
: "rd"
change from cff CustomFloor pff to "DARK" CustomBlock pb2
* "(30/'rcount')"
set "local" to random 7 to 12
set "local2" to random 6 to 10

set "local3" to random 1 to "('board_w'-1-'local')"
set "local4" to random 2 to "('board_h'-3-'local2')"
loop start
if c?? CustomFloor p20 at "('loopcount'%'local'+'local3')" "('loopcount'/'local'+'local4')" then "rd"
if "LIGHT" CustomBlock pb2 at "('loopcount'%'local'+'local3')" "('loopcount'/'local'+'local4')" then "rd"
put cff CustomFloor pff at "('loopcount'%'local'+'local3')" "('loopcount'/'local'+'local4')"
loop for "('local'*'local2'-1)"

change from cff CustomFloor pff to c08 CustomFloor p20

loop start
put "LIGHT" CustomBlock pb2 at "('local3'+'loopcount')" "local4"
put "LIGHT" CustomBlock pb2 at "('local3'+'loopcount')" "('local4'+'local2'-1)"
loop for "('local'-2)"
loop start
put "LIGHT" CustomBlock pb2 at "local3" "('local4'+'loopcount')"
put "LIGHT" CustomBlock pb2 at "('local3'+'local'-1)" "('local4'+'loopcount')"
loop for "('local2'-1)"

set "room&rooms&x" to "('local1'/2+'local3')"
set "room&rooms&y" to "('local2'/2+'local4')"
inc "rooms" by 1
if "rooms" < "rcount" then "rd"

set "rooms" to 0
: "join"
goto "#joinr"
inc "rooms" by 1
if "rooms" < "rcount" then "join"

loop start
set "local" to "('loopcount'%'board_w')"
set "local2" to "('loopcount'/'board_w')"
if "DARK" CustomBlock pb2 at "local" "local2" then "#noise"
loop for "('board_w'*'board_h'-1)"


put player at "room0x" "room0y"
copy at 2 0 to "room1x" "room1y"
set "commands" to 30
send "ALL" to "go"

* "Dungeon Level &DL&"
end
: "#noise"
set "local3" to random -30 to 30
set "local4" to "('local'+'local2'+'local3'/45+176)"
put "DARK" CustomBlock "local4" at "local" "local2"
goto "#return"


: "#joinr"
set "local" to "room&rooms&x"
set "local2" to "room&rooms&y"
set "local3" to "room('rooms'+1%'rcount')x"
set "local4" to "room('rooms'+1%'rcount')y"
set "local5" to random 0 to 1
goto "#c('local5')"
goto "#c(1-'local5')"
goto "#return"

: "#c0"
: "jrla"
goto "#pc"
inc "local" by "(('local'<'local3')-('local'>'local3'))"
if "local" != "local3" then "jrla"
goto "#pc"
goto "#return"

: "#c1"
: "jrlb"
goto "#pc"
inc "local2" by "(('local2'<'local4')-('local2'>'local4'))"
if "local2" != "local4" then "jrlb"
goto "#pc"
goto "#return"

: "#pc"
if c?? CustomFloor p20 at "local" "local2" then "#return"
put c08 CustomFloor p20 at "local" "local2"

loop start
goto "#tw"
loop for 8
goto "#return"
: "#tw"
if c?? CustomFloor p20 at "('loopcount'%3-1+'local')" "('loopcount'/3-1+'local2')" then "#return"
if "LIGHT" CustomBlock pb2 at "('loopcount'%3-1+'local')" "('loopcount'/3-1+'local2')" then "#return"
put "DARK" CustomBlock pdb at "('loopcount'%3-1+'local')" "('loopcount'/3-1+'local2')"
goto "#return"

Name: Anonymous 2011-04-10 4:59

>>306
Nice code, fagstorm.

Name: Anonymous 2011-04-10 7:04


(S(K(S(SKK)(SKK)))(S(S(KS)K)(K(S(SKK)(SKK)))))(S(K(S(S(K(S(S(SKK)(K(K(SKK)))))K)(SKK))(K(S(S(KS)K)(K(SKK))))))(S(K(S(K(S(S(KS)(S(S(KS)K))(K(S(K(S(S(KS)(S(KK)(S(SKK)(S(K(S(S(KS)K)))(S(S(KS)(S(KS)(K(KS))((S(K(S(KK)))(SSK)))))(K(K(SKK))))))))(K(SKK))))(SKK))))(K(K(K(SKK))))))(SKK)))(S(KS)(SK(S(K(S(S(KS)(S(K(S(KS)))(S(K(S(KS)))(S(K(S(KS)))(S(K(S(KK)))(S(S(KS)K)(K(S(K(S(K(S(SKK)))))(S(K(S(KK)))(S(K(S(SKK)))K))))))))))(K(K(K(SKK)))))(SKK)))))))

Name: Anonymous 2011-04-10 7:21

SEKS

Name: Anonymous 2011-04-11 9:36

Name: Anonymous 2011-04-11 10:50

<djahandarie> we ain't here to do e-c-e
<djahandarie> we're here to do c-s-e on the w-e-b
<djahandarie> listen to me spit these rhymes
<djahandarie> while i program lines
<djahandarie> and commit web accessibility crimes
<djahandarie> word, son
<http402> You talk like your big on these I-Net kicks,
<http402> But your shit flows slower than a two-eighty-six.
<http402> I'm tracking down hosts and nmap scans,
<http402> While Code Igniter's got you wringing your hands.
<http402> Cut the crap rap,
<http402> Or I'll run ettercap,
<http402> Grab your AIM chat,
<http402> N' send a PC bitch-slap!
<http402> peace
<djahandarie> you're talkin bout down hosts and nmap scans
<djahandarie> while i got other plans
<djahandarie> you're at your new job, but you can't even do it right
<djahandarie> you just create a plight with your http rewrites
<djahandarie> i've been on the web since the age of three
<djahandarie> you just got on directly off the bus from mississippi
<djahandarie> respect yo' elders, bitch
<http402> You've been webbin' since three, but still ain't grown up,
<http402> Gotta update your config and send the brain a SIGHUP.
<http402> You say you're that old? No wonder you're slow!
<http402> You're knocking at the door while I run this show!
<http402> Elders my ass, you're shit's still in school,
<http402> Hunt and pecking at the keyboard like a spaghetti-damned fool,
<http402> Rim-riffing your hard drive like a tool,
<http402> Face it. I rule.
<djahandarie> i erase my harddrives with magnets (bitch)
<djahandarie> all you can do is troll on the fagnets
<djahandarie> and son, my brain's wrapped in a nohup
<djahandarie> it wont be hurt by the words you throwup
<djahandarie> dont mind me while i emerge my ownage
<djahandarie> while you're still over there apt-getting your porridge
<djahandarie> you say i'm still in school
<djahandarie> but the fact is that i know the rule
<djahandarie> cuz you need to go back to grade three
<djahandarie> and you better plea, that they take sucky graduates from c-s-e
<http402> Time to bend over and apply a patch,
<http402> Your brain's throwing static like a CD with a scratch.
<http402> Your connection got nuked and you've met your match.
<http402> You run a single process like a VAX with a batch.
<http402> I'd pass the torch to a real winner
<http402> But it'd just scorch a while-loop spinner
<http402> Caught in a loop that you cant escape,
<http402> I run clock cycles around your words and flows,
<http402> Cuz your rhyme is like a PS fan: it' blows,
<http402> Your water-cooled lyrics leak and it shows,
<http402> Take your ass back to alt.paid.for.windows.

Name: Anonymous 2011-04-11 11:00

This code will show you the truth of Perl6


perl -e 'print "Perl6 has an operator for $_" foreach (qx[cat /usr/dict/words]);'

Name: Anonymous 2011-05-07 2:16

(/ 20 20)

Name: Anonymous 2011-05-07 2:37

1

Name: Anonymous 2011-05-07 2:50

IRC FOR NON-NIGGERS

Server:  whatisthiscomputer.dyndns.org
Channel: #trollchat

Name: Anonymous 2011-05-07 3:32

publix statistics frozen void lo mein(Strep throat[])

Name: Anonymous 2011-05-07 9:51

>>312
It's funny because that's Perl 5 and below.

Name: Anonymous 2011-06-16 5:49

>>317
It's funny because Perl 6 is still not there!

Name: Anonymous 2011-06-16 6:10

>>318
Just like Sepplesox, Duke Nukem Forever, and Velox et Astrum.

Name: Anonymous 2011-06-16 7:55

>>319
You can actually buytorrent Duke Nukem Forever now, your argument is invalid.

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