SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#51 2013-05-10 11:19:10

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

Help fund CrunchBang, donate to the project!

#52 2013-05-11 06:22:26

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

#!/bin/bash
p=1
f=75 s=13 r=2000 t=0
w=$(tput cols) h=$(tput lines)
v=( [00]="\x83" [01]="\x8f" [03]="\x93"
    [10]="\x9b" [11]="\x81" [12]="\x93"
    [21]="\x97" [22]="\x83" [23]="\x9b"
    [30]="\x97" [32]="\x8f" [33]="\x81" )
RNDSTART=0
NOCOLOR=0

OPTIND=1
while getopts "p:f:s:r:RCh" arg; do
case $arg in
    p) ((p=(OPTARG>0)?OPTARG:p));;
    f) ((f=(OPTARG>19 && OPTARG<101)?OPTARG:f));;
    s) ((s=(OPTARG>4 && OPTARG<16 )?OPTARG:s));;
    r) ((r=(OPTARG>0)?OPTARG:r));;
    R) RNDSTART=1;;
    C) NOCOLOR=1;;
    h) echo -e "Usage: $(basename $0) [OPTION]..."
        echo -e "Animated pipes terminal screensaver.\n"
        echo -e " -p [1-]\tnumber of pipes (D=1)."
        echo -e " -f [20-100]\tframerate (D=75)."
        echo -e " -s [5-15]\tprobability of a straight fitting (D=13)."
        echo -e " -r LIMIT\treset after x characters (D=2000)."
        echo -e " -R \t\trandom starting point."
        echo -e " -C \t\tno color."
        echo -e " -h\t\thelp (this screen).\n"
        exit 0;;
    esac
done

for (( i=1; i<=p; i++ )); do
    c[i]=$((i%8)) n[i]=0 l[i]=0
    ((x[i]=RNDSTART==1?RANDOM*w/32768:w/2))
    ((y[i]=RNDSTART==1?RANDOM*h/32768:h/2))
done

tput smcup
tput reset
tput civis
while ! read -t0.0$((1000/f)) -n1; do
    for (( i=1; i<=p; i++ )); do
        # New position:
        ((${l[i]}%2)) && ((x[i]+=(${l[i]}==1)?1:-1))
        ((!(${l[i]}%2))) && ((y[i]+=(${l[i]}==2)?1:-1))

        # Loop on edges (change color on loop):
        ((c[i]=(${x[i]}>w || ${x[i]}<0 || ${y[i]}>h || ${y[i]}<0)?RANDOM%8:${c[i]}))
        ((x[i]=(${x[i]}>w)?0:((${x[i]}<0)?w:${x[i]})))
        ((y[i]=(${y[i]}>h)?0:((${y[i]}<0)?h:${y[i]})))

        # New random direction:
        ((n[i]=RANDOM%s-1))
        ((n[i]=(${n[i]}>1||${n[i]}==0)?${l[i]}:${l[i]}+${n[i]}))
        ((n[i]=(${n[i]}<0)?3:${n[i]}%4))

        # Print:
        tput cup ${y[i]} ${x[i]}
        [[ $NOCOLOR == 0 ]] && echo -ne "\033[1;3${c[i]}m"
        echo -ne "\xe2\x94${v[${l[i]}${n[i]}]}"
        l[i]=${n[i]}
    done
    ((t*p>=r)) && tput reset && tput civis && t=0 || ((t++))
done
tput rmcup

Offline

#53 2013-05-12 06:20:24

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#54 2013-05-12 12:20:54

wuxmedia
wookiee madclaw
From: Back in Blighty
Registered: 2012-03-09
Posts: 1,478
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Whilst we're on the p2p thing, I use mldonkey. Handles .torrent (no magnets, as yet,  but that can be circumvented) and ed2k (old skool) and others.
Runs without cli, but uses a webgui.
Or telnet to get configured and to add files.
Not much a review... smile

Omg rogue! That took me back, quaff etc
Prob with ninvaders is it doesn't fire and move, found it quite fun. I preferered. tetris though

Last edited by wuxmedia (2013-05-12 12:24:45)

Offline

#55 2013-05-12 13:05:24

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

@wux, so far I have an "@" symbol tied to keybinds and a random map generator done, but no baddies, inventory, shops, story, etc.  That was after around 250 lines of coding since I started last night.  It may take longer to get done that I would have thought.  Hopefully, though, it'll bring back the nostalgia and still be fun.

More to come. wink

Offline

#56 2013-05-12 16:22:15

slartie
#! Member
From: Denmark
Registered: 2013-05-06
Posts: 53
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#57 2013-05-12 17:17:45

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Thanks for the link Slartie!  Those libs are WAY cleaner than how I'd started off, so I may throw the "#####" walls that I was using (doing it with straight text) and use the ones linked in their tutorial.

I'm still for a group project in the future, by the way, so if there are other old-school titles to be remade with a twist...count me in (unless you use Java.)  I started a git for just the purpose of little, pointless things that I hack out in my spare time, so I'm game to add to that.

EDIT: We need something like a "Coder's Corner" for these little tips.  They're not really tips/tricks/scripts, but for those of us who really enjoy coding to share ideas outside of github.

Last edited by DebianJoe (2013-05-12 17:50:41)

Offline

#58 2013-05-12 19:23:25

slartie
#! Member
From: Denmark
Registered: 2013-05-06
Posts: 53
Website

Re: Joe's repo grab-bag (testing like it's 1999)

@DebianJoe - I'm guessing you're referring to libtcod. Yes, it's probably the best one out there. It's packed with goodies for several programming languages, including my favorite: C. Enjoy.

Offline

#59 2013-05-12 19:37:57

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#60 2013-05-12 22:00:14

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#61 2013-05-13 04:36:33

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#62 2013-05-13 06:27:38

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#63 2013-05-13 15:37:56

slartie
#! Member
From: Denmark
Registered: 2013-05-06
Posts: 53
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Now that you've been talking about coding a bunch, it would only seem natural to mention valgrind, and of course the mighty gdb. Might as well not diff code that's leaking and dumping cores wink

Offline

#64 2013-05-13 16:34:19

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

@slartie

So very true.  Memory management is a huge part (especially when using languages that allow more "direct" access to memory modules) of programming.  You guys are more than welcome to write something up, as well...you don't have to rely on me to do all of the gabbing. wink  Somewhere down the line, I guess I have to cover "GNUmake" as well, don't I?

Offline

#65 2013-05-13 17:09:07

slartie
#! Member
From: Denmark
Registered: 2013-05-06
Posts: 53
Website

Re: Joe's repo grab-bag (testing like it's 1999)

make, autotools, git, bzr ... You have your work cut out for you. smile

I'll see about doing a bit on some console'y stuff sooner rather than later. Maybe give folks a little taste of zsh or something.

Offline

#66 2013-05-13 23:10:21

thorbs
#! Member
Registered: 2013-04-22
Posts: 53

Re: Joe's repo grab-bag (testing like it's 1999)

So I basically wear a tie, and love mindmapping software. I was waiting for the xmind review but it never actually materialized did it? Anyways, if you are ever up to finishing the mindmap review you should include Labyrinth, which in my opinion is the best mindmapping software, but you have to install the latest beta(not in the Debian repositories) to get something that works. To the why of mindmappingsoftware, it lies in the fact that one does not loose a mindmap file as easily as a napkin and it is easier to change the order of things after the initial output. Btw. I dont really think your entirely fair to the tiewearing consultant crowd as some of us do love superheroes and even dabble in #! in our sparetime.

Offline

#67 2013-05-14 05:16:53

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

@ Thorbs, you have to take pretty much anything that I say with a HUGE grain of salt.  I try to make things interesting to read by making jokes.  When you're heading down the path of eventually explaining null termination and address allocation, it takes a certain degree of humor to make those subjects interesting.  I also make big mistakes in coding, often breaking things in horrific fashions, so don't take that part of my writing seriously either.

Consider the Dilbert comics that everyone has stuck in an office somewhere as a prime example: we have to laugh at ourselves a bit or we'd all go crazy.  No serious offense is meant to the management and consultant crowd.

As far as an X-mind review, I am sure that I can get it to run, but I won't be able to give the process of use a fair shot because it's not something that I personally would use.  Feel free to write one up if you have time, and if I can get everyone else really giving free software a good inspection, then I'd be extremely excited.  Between work/kids/schooling/family/development...it's really difficult for me to be able to do much more than I'm currently getting done.  It's like the Debian project: it's not just one man behind it.  If everyone would really drop in their knowledge on a particular subject that they know well, the entire community could benefit.

Rock on my superhero-loving, tie-wearing, mind-mapping, bro!

Offline

#68 2013-05-14 09:38:06

thorbs
#! Member
Registered: 2013-04-22
Posts: 53

Re: Joe's repo grab-bag (testing like it's 1999)

Ah, I also understood everything as good fun, and was being humoristic about my own profession, that you needle very skillfully. Made me laugh

Offline

#69 2013-05-14 16:19:05

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Last edited by DebianJoe (2013-05-14 16:24:20)

Offline

#70 2013-05-15 21:09:25

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#71 2013-05-16 20:23:03

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Offline

#72 2013-05-17 05:40:15

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Last edited by DebianJoe (2013-05-17 05:40:34)

Offline

#73 2013-05-17 06:08:22

slartie
#! Member
From: Denmark
Registered: 2013-05-06
Posts: 53
Website

Re: Joe's repo grab-bag (testing like it's 1999)

Last edited by slartie (2013-05-17 06:18:27)

Offline

#74 2013-05-17 11:57:01

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,602

Re: Joe's repo grab-bag (testing like it's 1999)

@DJ - Why irssi when you have emacs running... and thus erc is only a command away?

Offline

Help fund CrunchBang, donate to the project!

#75 2013-05-17 13:41:08

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Joe's repo grab-bag (testing like it's 1999)

You want mplayer/mplayer2 for movies, don't you? big_smile

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo