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

Fibonacci Butt Sort

Name: Anonymous 2009-08-16 23:08

Let us discuss the various implementations of theFIBONACCI BUTT SORT.

Name: Anonymous 2009-08-16 23:09

Name: Anonymous 2009-08-16 23:11

Name: Anonymous 2009-08-16 23:14

>>1
U MENA BINARY DICKS TREE?

Name: Anonymous 2009-08-16 23:18

>>4
Dijkstra?

Name: Anonymous 2009-08-16 23:39

<3

Name: Anonymous 2009-08-16 23:42

What does (binary_dicks_tree)<(fibonacci_butt_sort) evaluate to?

Name: Anonymous 2009-08-17 0:15

>>7
Sorted Anuses.

Name: Anonymous 2009-08-17 2:33


a,b = 0,1
while 1:
    print b,
    a,b = b,a+b

Name: Anonymous 2009-08-17 11:03

>>8
In what order?

Name: Anonymous 2009-08-17 15:26

>>10
ANUSES[10] = {ANUS, ANUS, ANUS, ANUS, ANUS, ANUS, ANUS, ANUS, ANUS, ANUS, } ;

Name: Anonymous 2009-08-17 15:42

From this point forward, if anyone on /prog/ asks about data structures, I'm going to reply FIBONACCI BUTT SORT

Name: Anonymous 2009-08-17 15:43

>>1,12
Will you GPL your BBCode?

Name: Anonymous 2009-08-17 15:43

>>12
Don't you mean Haskell?

Name: Anonymous 2009-08-17 15:44

[b][i][u]F[/u][o]I[/o][u]B[/u][o]O[/o][u]N[/u][o]A[/o][u]C[/u][o]C[/o][u]I[/u] [o]B[/o][u]U[/u][o]T[/o][u]T[/u] [o]S[/o][u]O[/u][o]R[/o][u]T[/u][/i][/b]

Name: Anonymous 2009-08-17 15:48

Im writing a 'butt sorter' in JAVA to output the FBSorted BBCode for any text.

Name: Anonymous 2009-08-17 15:50

>>16
BUTT SORT FAILURE

JAVA

Name: Anonymous 2009-08-17 15:52

>>16
I hope you are going to use Fibonacci tail recursion to do it...

Name: Anonymous 2009-08-17 16:14



    FIBONACCI BUTT SORT

Name: Anonymous 2009-08-17 16:25

>>15
Thank you.

Name: Anonymous 2009-08-17 16:47

>>15
Did you mean: FIBONACCIBUTTSORT

Hint: BBCode tags don't work inside the [code] tag.

Name: Anonymous 2009-08-17 16:49

>>21
Your implementation needs work. Try skipping spaces

Name: Anonymous 2009-08-17 16:57

>>21
Did you mean to read the fucking thread?

Name: Anonymous 2009-08-17 17:05

>>21
lol no, that was just the source code.

Name: Anonymous 2009-08-17 17:11

>>1
WTF is this shit? And how do I implement it to my advantage?

Name: Anonymous 2009-08-17 17:32



(defun write-tag (tag string)
(if (null tag)
""
(format nil "[~a]~a[/~a]" tag string tag)))
(defun bb-buttsort (s)
"FIBONACCI BUTTSORT"
(write-tag "i"
(write-tag "b"
(apply #'concatenate 'string
    (loop for c across s
    and parity = nil then (not parity)
    collect (write-tag (if parity "o" "u") c))))))




(defun write-tag (tag string)
  (if (null tag)
      ""
      (format nil "[~a]~a[/~a]" tag string tag)))
(defun bb-buttsort (s)
  (write-tag "i"
   (write-tag "b"
    (apply #'concatenate 'string
       (loop for c across s
          and parity = nil then (not parity)
          collect (write-tag (if parity "o" "u") c))))))

Name: Anonymous 2009-08-17 17:33

FIBONACCI BUTT SORT

Name: >>26 2009-08-17 17:34

>>26
Seems it needs some more work :( But at least FIBONACCI BUTTSORT works

Name: Anonymous 2009-08-17 17:58

Here's my implementation:

buttSort = b . i . unwords . map concat $ map xmap fbf `xmap` fbs
  where fbf = cycle [u, o] : cycle [cycle [o, u]]
        fbs = map tacnoc . words $ "FIBONACCI BUTT SORT"

xmap = zipWith ($)
tacnoc = map (:[])

A bit of a kludge, to be honest. What I ought to have done is written a custom iterator function instead of juggling map and xmap, so it would be intrinsically aware of the space-skipping requirement and I wouldn't have to fuck with fbf.

FIBONACCI BUTT SORT

Name: Anonymous 2009-08-17 18:16

>>29
Like this?

buttSort = b . i . go (cycle [u, o])
  where go fs (' ':xs) = " " ++ go fs xs
        go (f:fs) (x:xs) = f [x] ++ go fs xs
        go _ [] = []

Name: Anonymous 2009-08-17 18:18

>>30
I THINK THE OUTPUT OF THIS VERSION IS ABSOLUTELY PERFECT

Name: Anonymous 2009-08-17 18:37

>>30
buttSort = b . i . go (cycle [u, o])  where go fs (' ':xs) = " " ++ go fs xs        go (f:fs) (x:xs) = f [x] ++ go fs xs        go _ [] = []

Name: Anonymous 2009-08-17 19:00

Testing my kludgy scheme buttsort

Name: Anonymous 2009-08-17 19:01

>>33
Whoops, used [sup]/[sub] instead of [o]/[u]
Testing my kludgy scheme buttsort

Name: Anonymous 2009-08-17 19:06

This works in PLT scheme. It's not the best solution, but I wanted to use unfold.
[code](require srfi/1)
(define (make-cycle x)
  (let ((clist (apply circular-list x)))
    (lambda ()
      (begin0
        (car clist)
        (set! clist (cdr clist))))))
(define bbcode-select
  (let ((c (make-cycle (list o u))))
    (lambda (x)
      (if (string=? x " ")
          " "
          ((c) x)))))
(define (buttsort x)
    (b (i (apply string-append (unfold null? (lambda (y) (bbcode-select (car y))) cdr (regexp-split #rx"" x))))))[code]

Name: Anonymous 2009-08-17 19:16

>>35
EXPERT BBCODE FAILURE

Name: Anonymous 2009-08-17 19:20

>>36
AmIforgiven?AmIforgiven?
AmIforgiven?AmIforgiven?
How about now?

Name: Anonymous 2009-08-17 19:29

>>37
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

Name: Anonymous 2009-08-17 19:30

>>38
EXPERT HTML FAILURE

Name: Anonymous 2009-08-17 19:53


                dicks
               /     \
              /       \
           dicks     dicks
           /   \     /   \
          /     *   /     \
       dicks      dicks  dicks
       /   \     /    \  /   \
      *   dicks *     * *    dicks

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