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

non retarded graphics library

Name: Anonymous 2011-02-05 23:22

So I am unwilling to deal with native things like X11 or GDI...

What's actually practical for displaying stuff? SDL seem well enough at the first glance but it suffers from version bloat and LGPL.

I'm thinking of trying General Graphics Interface which claims equal portability and has a MIT licence.

The other alternative seems Anti-Grain Geometry which is fully featured but suffers from GPL and sepples.

Name: Anonymous 2011-02-07 21:09

In my Lisp DSL I'm doing graphics like this:

(for {y:cy vy:0; y<ey !vy+32 !y+1}
     for {x:cx vx:0; x<ex vx+32 !x+1}
       c:cs,(y*ww+x)
       t:ts,(tileId c),0
       blit g vx-xi vy-yi gs,t)
  (world.units |> fe {u ->
    flip:no
    f:u.frame.{f:neg?->do flip=:ye ~f; f->f}
    ug:unitTypes.(type u).sprite,f
    [x y]:u.tile
    blit g 32x-sx-(ug.w-32)/2 32y-sy-(ug.h-32)/2 ug tint=(u.color tints)
         flipX=flip})
  cursor.{[@hs img] -> [x y]:cursorXY-hs blit g x y img

Name: Anonymous 2011-02-07 21:11

>>11
U MENA Perl 6

Name: Anonymous 2011-02-07 21:18

>>12
But this what Lisp looks, when you take out parens!!1

Name: Anonymous 2011-02-07 21:22

>>13
And add {[@$:-/.,=:=!<*+?->~;]}, yes.

Name: Anonymous 2011-02-07 21:28

>>14
Lisp already had "@,.`'#", I just used the rest of ASCII.

And I believe, that x:1 y:2 x+y is more readable than (let ((x 1) (y 2)) (+ x y))

Name: Anonymous 2011-02-07 21:30

Also, with `:` I can do stuff impossible with `let`, like

while line:(readLine)
  write line

Name: Anonymous 2011-02-07 21:33

>>16

(let loop ((line (read-line)))
  (write line)
  (loop (read-line)))


>>15
I have my

(letn (x 1 y 2) (+ x y))

Name: Anonymous 2011-02-07 21:34

>>11-17
Here we go again.

Name: Anonymous 2011-02-07 21:36

>>17
Or in CL:
(loop (write (read-line)))

Name: Anonymous 2011-02-07 21:38

>>19
((λ (λ) (write (read-line)) (λ λ)) (λ (λ) (write (read-line)) (λ λ)))

Name: Anonymous 2011-02-07 21:43

>>17
>(letn (x 1 y 2) (+ x y))
Yep! You need to have over 9000 `lets`.

Name: Anonymous 2011-02-07 21:46

>>21
I need just one that does everything.

Name: Anonymous 2011-02-07 21:46

we already have
let
let*
letn
if/bind
while/bind
destructuring-bind
multiple-value-bind
do and loop - both declare vars
and it goes on and on...

Name: Anonymous 2011-02-07 21:48

>>22
`:` does everything, from biding to destructuring, to pattern matching, to array indexing.

Name: Anonymous 2011-02-07 21:49

array indexing

[!index++_ value @rest]:array

Name: Anonymous 2011-02-07 21:53

>>23
if/bind is just syntactic sugar to if+let, I could call it aif.
if\d?(/pred)? is just a define-if-syntax that expands to (ifn n #:map pred . r).
I need letn to write (let loop ((xs xs) (r '())) ...) in a more concise form: (letn loop (xs xs r) ...)
I don't need primitive loop forms like while, so no while/bind.
Scheme doesn't have destructuring-bind, nor multiple-value-bind, but it has let-values.

But, yes, Lisp has too much lets.

Name: Anonymous 2011-02-07 21:54

>>11

Your ``Lisp'' DSL what?  Does it compact lists into lists of 128-byte arrays to fit its shit into 128 bytes?  Did you even test it with major CL implementations for L1/L2 usage?

If not, go back to your LISP threads where you can freely continue to ignore requests for source code of your pile of syntax.

Name: Anonymous 2011-02-07 21:55

>>24
If I wanted an operator to rule them all, I would program in Perl 6. I just needed a let to rule them all, I've got my letn.
Also, infix notation is bad and harmful.

Name: Anonymous 2011-02-07 21:57

>>27
Does it compact lists into lists of 128-byte arrays
Actually it uses 64-byte arrays for small lists and normal array indexing to access object fields. So I dont see any fundamental problems for efficiency.

Name: Anonymous 2011-02-07 21:58

>>28
Also, infix notation is bad and harmful.
Whats wrong with her?

Name: Anonymous 2011-02-07 21:59

>>30
Since when an it is a she?

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