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

Pages: 1-4041-8081-

libclear

Name: Anonymous 2007-07-12 2:51 ID:cZxqU9rw

This library is a must for every unix C programmer.
seriously.

libclear.c->

#include <stdlib.h>

clear(void)
{
      (void)system("clear");
}

clear_version(void)
{
      (void)clear();
      (void)system("echo Libclear version 1.00 by Michael Freeman\n");
      (void)system("echo Press Control-D to continue\n");
      (void)system("cat");
      (void)clear();
}


get it->
http://www.ibiblio.org/pub/Linux/libs/libclear-1.00.tgz

lastly, don't forget to donate!

Description:    libclear lets you clear the screen in ANY unix/linux application!  Developed especially for linux though! Libclear is NOT freeware!! You are encouraged to send $5 to the author!

srsly.(?)

Name: Anonymous 2007-07-12 3:08 ID:6DHEv6MQ

Judging from the makefile and readme, it's quite obvious it's a joke, I still lol'd though

Name: Anonymous 2007-07-12 4:39 ID:txeVX2i6


#include <stdio>
using namespace std;

void clear(int number_Of_Lines_In_Display)
{
 for (int i = 1; i = number_Of_Lines_In_Display; i++)
 {
  cout << endl;
 }
}

Name: Anonymous 2007-07-12 4:45 ID:PfUKll65

I think I understand the author's motivation for doing this, and it makes me very sad to think about.

But, on the surface, much lolz are induced.

Name: Anonymous 2007-07-12 5:09 ID:OAcBy2JU

I'm kinda tempted to package it and try to get it into a couple major distros.
win or fail?

Name: Anonymous 2007-07-12 5:16 ID:Heaven

>>5
I think you should begin by writing a Wikipedia entry for it.

Name: Anonymous 2007-07-12 5:43 ID:kQoEfWL0

>>1
Good irony of current state of Linux libraries. Every faggot writes a stupid library for everything, and you end up with a million libraries you need to install to do anything. They think their library is so important and useful it deserves a separate package, project, and of course, Wikipedia entry.

Name: Anonymous 2007-07-12 5:57 ID:cZxqU9rw

en.wikipedia.org/wiki/Libclear

Name: Anonymous 2007-07-12 6:32 ID:kQoEfWL0

>>8
You win

Name: Anonymous 2007-07-12 6:45 ID:J0XWTwRK

>>8

I lol'd. Very good sir.

Name: Anonymous 2007-07-12 10:34 ID:m620+Q3S

In Soviet Russia wikipedia is writing YOU!

http://ru.wikipedia.org/wiki/Libclear

Name: Anonymous 2007-07-12 11:09 ID:J0XWTwRK

Of course, the C2009 standard includes a library for advanced multiplatform terminal output, thus negating the need for this library.

Name: Anonymous 2007-07-12 11:34 ID:Heaven

>>1
#include <stdio.h>
void clear(){
 fputs("\033[2J\033[1;1H",stdout);
}

void clear_version(){
 clear();
 puts("OH SHI-\nPress Control-D to continue");
 for(getchar();!feof(stdin);getchar());
 clear();
}

Name: Anonymous 2007-07-12 11:40 ID:Heaven

>>13

Fails on non-VT100 (and compatible) terminals

Name: Anonymous 2007-07-12 12:21 ID:ON+xAo8Y

clear(void)
{
#ifdef WIN32
      #define CLEAR_CMD "cls"
#else
      #define CLEAR_CMD "clear"
#endif
      (void)system(CLEAR_CMD);
#undef CLEAR_CMD
}


I PORTED IT TO WINDOWS

Name: Anonymous 2007-07-12 13:03 ID:Heaven

>>15

WIN

Name: Anonymous 2007-07-12 13:08 ID:Heaven

why the irrelevant casts to void?

Name: Anonymous 2007-07-12 13:13 ID:9R4d9KtN

>>17
EXPERT PROGRAMMER best practices.

Name: Anonymous 2007-07-12 13:56 ID:UY8QsEfi

>>13
your code. awful.
for(; getchar()!=EOF; (void)clear();); /* EXPERT PROGRAMMER */
and as >>14 stated, it's not portable.
However libclear is.
libclear > you

Name: Anonymous 2007-07-12 14:03 ID:K2g6VRzC

>>19
>>13 works on DOS. libclear doesn't.

Name: Anonymous 2007-07-12 14:21 ID:UY8QsEfi

>>20
BUT LIBCLEAR HAS THOSE CASTS TO VOID WHICH GIVE A HUGE BOOST TO PERFORMANCE!111111!111111one

Name: Anonymous 2007-07-12 18:44 ID:ON+xAo8Y

>>11
lol wut

Name: Anonymous 2007-07-12 18:45 ID:ON+xAo8Y

>>20
MEET
>>15
NOW LEAVE

Name: Anonymous 2007-07-12 18:59 ID:nCntaATS

>>23
MEET
>>25
NOW TRAVEL IN TIME

Name: Anonymous 2007-07-12 19:44 ID:ON+xAo8Y

>>23
OMG I AM TEH FUTURES

Name: Anonymous 2007-07-12 21:53 ID:WF9kr36m

>>11
strange, the russian wikipedia has rounded corners, whereas the english one does not.

Name: Anonymous 2007-07-12 22:39 ID:Z5VJgxrr

>>26
I noticed that too. Do you know why, Anon?

Name: Anonymous 2007-07-12 23:32 ID:FQPq4Bgj

In soviet wikipedia, corners round you!

Name: Anonymous 2007-07-12 23:33 ID:gWG4x5Xv

I don't like this joke. It is not funny.

Name: Anonymous 2007-07-12 23:42 ID:Heaven

>>23
DOS != WIN32

Name: Anonymous 2007-07-13 1:54 ID:Kz1SVIGD

I just realized, all what's missing is a SourceForge page, then it can be a truly complete library.

Name: Anonymous 2007-07-13 4:18 ID:Heaven

sourceforge pages are only for freeware projects

Name: Anonymous 2007-07-13 16:19 ID:Heaven

>>32
INCORRECT. ANY OPEN SOURCE PROJECT MAY REGISTER WITH SOURCEFORGE REGARDLESS OF COST OF USE.

Name: Anonymous 2007-07-14 17:10 ID:Heaven

123

Name: Anonymous 2007-07-14 17:11 ID:Heaven

0123

Name: Anonymous 2007-07-14 17:13 ID:Heaven

123321

Name: Anonymous 2007-07-14 21:04 ID:DQ5OYivh

hay guise i have an idea let's make libclear into a full-time project so we can submit it to sourceforge too

It will consist only of a clear() and clear_version() but with it will be coded by EXPERT PROGRAMMERS

what does anonymous think? wikipedia is already trolled (the article isn't removed yet and i don't think they will remove it)

Name: Anonymous 2007-07-15 4:33 ID:pWZqLQbq

>>33
Libclear is not an open source project per the OSI definition (let alone Free Software according to GNU). Someone should rewrite it and release it under a MIT or BSD license. Should we start project freeclear?

Name: Anonymous 2007-07-15 5:20 ID:PamYvA1v

>>38
Agreed. It should be free as in freedom and beer... and stuff.

Name: Anonymous 2007-07-15 5:26 ID:uNcxH1lT

>>38
I don't understand, why not? The source of the code is available, hence ``open source''

Name: Anonymous 2007-07-15 5:34 ID:Heaven

>>40
Are you mentally retarded or what?

Libclear is not an open source project per the OSI definition

http://opensource.org/docs/osd

Name: Anonymous 2007-07-15 5:36 ID:Heaven

>>40
Also, remember when (parts of) Windows source code got leaked some years ago? Did that incident make Windows open source?

Name: Anonymous 2007-07-15 6:00 ID:Gx72B//x

that's shitty.

Name: Anonymous 2007-07-15 6:37 ID:uNcxH1lT

>>41,42
I had a quick glance at the link, and I don't see why libclear isn't open source. Enlighten me,

Name: Anonymous 2007-07-15 6:38 ID:uNcxH1lT

>>42
I don't see what the windows leak has to do with anything either

Name: Anonymous 2007-07-15 7:07 ID:Heaven

>>44
The README only mentions that ``Libclear is NOT freeware!! You are encouraged to send $5 to the author!'' It doesn't explicitly grant you any rights on the source code, which implicitly (due to the crappy copyright laws) means that you have none. Open source doesn't mean having the source to some program, it means having certain rights the do things with the said source.

Name: Anonymous 2007-07-15 8:23 ID:Heaven

>>46
this is why AmeriKKKa sucks

Name: Anonymous 2007-07-15 8:36 ID:Heaven

>>47
The same applies to basically all first-world countries.

Name: Anonymous 2007-07-15 9:03 ID:CNkcbvVk

furthering >>46's point: win2k isn't open source.

Name: Anonymous 2007-07-15 10:26 ID:Heaven

14:25, 15 July 2007 C.Fred (Talk | contribs) deleted "Libclear" (CSD G11 - non-notable software as subject, and the registration fees for said software apparently go to the article's original editor. Blatant advertising.)

Name: Anonymous 2007-07-15 10:34 ID:pWZqLQbq

>>50
That is the very essence of Wikipedia.

Name: Anonymous 2007-07-16 3:41 ID:0D7Dl9RK

>>50
from his wiki page
This user runs Mac OS X.
i bet he's just jealous because we haven't ported libclear to maxos yet.

Name: Anonymous 2007-07-16 3:51 ID:RFyzQHz3

>>52
i lold

Name: Anonymous 2007-07-16 3:54 ID:+ZQ7DsEU

He's still bitter he had to pay $5000.

Name: Anonymous 2007-07-16 8:16 ID:a2+IADGc

>>52
Macfag here... libclear compiles cleanly on os x and works as expected.

Name: Anonymous 2007-07-16 9:00 ID:+ZQ7DsEU

libclear has hit a milestone. Now it's the perfect complement for your digital lifestyle.

Name: Anonymous 2007-07-16 9:13 ID:+ZQ7DsEU

>>56
Also, its price went up from $5 to $50, but it has such as slick design!

Name: Anonymous 2007-07-16 9:32 ID:U1Nrrm7i

>>57
Plus it's snappier.

Name: Anonymous 2007-07-16 10:33 ID:lYDdSh8L

okay so what language will freeclear be in?

Name: Anonymous 2007-07-16 10:53 ID:+ZQ7DsEU

>>59
FreePascal

Name: Anonymous 2007-07-16 10:56 ID:Heaven

USING: alien kernel ;
: clear ( -- )
 unix? [ "clear" ] [ "cls" ] if
 "void" "stdlib" "system" { "char*" } alien-invoke ;

Name: Anonymous 2007-07-16 11:13 ID:BVmw3hRF

>>61
shutup suave factor alien

Name: Anonymous 2007-07-16 11:38 ID:+zTM2NHi

>>59
Obviously the correct answer to this is BBCODE.

Name: Anonymous 2007-07-16 11:46 ID:+wpCZQSy

10 FOR i = 1 TO 10000
20 PRINT "I AM A FAG"
30 NEXT i
40 CLS
...
60 PROFIT!

Name: Anonymous 2007-07-16 12:32 ID:+zTM2NHi

Syntax error

Name: Anonymous 2007-07-16 12:43 ID:5KNWFfZH

>>61

Factor is cool and all, but i prefer Forth. I like to have a standardised language with more than one commercially-supported compiler available in case there is a problem with the compiler I've chosen. Also, I can understand what's going on in my Forth compiler, I'm not so sure about Factor's compiler & VM.

: clear PAGE ;

Name: Anonymous 2007-07-16 13:04 ID:Heaven

>>66
how easy is it to use opengl in forth?
and how's the unicode support?

Name: Anonymous 2007-07-16 13:32 ID:5KNWFfZH

>>67
An FFI hasn't been standardised, so this is specific to the compiler. OpenGL is the major motivation for upgrading GForth's foreign function interface, and I know other non-toy compilers have an FFI too, but I don't know their exact capabilities. (Note: there are lots of toy compilers, don't go near them.)

Forths are just starting to support Unicode now. An XCHAR wordset will be part of the revised Forth200x standard, for which a reference implementation exists (and is in GForth CVS).

I'm not trying to convert people to Forth, as "de gustibus non est disputandum". Still, I think it's at least worth looking at.

Name: Anonymous 2007-07-16 13:46 ID:KOgZz3yX

too bad gforth.el bails with any recent emacs build

Name: Anonymous 2007-07-16 13:50 ID:5KNWFfZH

>>69
Works for me with Carbon GNU Emacs 22.1 installed from MacPorts and GForth installed from CVS.

Name: Anonymous 2007-07-16 15:26 ID:KOgZz3yX

% ./elisp-comp gforth.el

In toplevel form:
gforth.el:62:15:Warning: `string-to-int' is an obsolete function (as of Emacs
    22.1); use `string-to-number' instead.
gforth.el:76:19:Error: Symbol's function definition is void: forth-emacs-older

And no, simply replacing string-to-int with string-to-number is not enough. Meh, I'll see if I can whip this into shape. GNU Emacs 23.0.51.1, multi-tty branch.

Name: Anonymous 2007-07-16 15:43 ID:KOgZz3yX

This is getting ridiculous. After a trip to the elisp manual, replacing (string-to-int ...) with (truncate (string-to-number ...)) solved that particular issue, but now it complains the some function definitions are void. After forcing those to evaluate with C-x e one by one, it compiles to an .elc with some warnings, and forth-mode seems to work, but elisp-comp still bails.

Name: Anonymous 2007-07-16 16:49 ID:4ZZftYJT

>71
Sorry, you misunderstood me.  I got those warnings too, but the .elc file works ok for me.  I long ago gave up trying to understand Emacs (maybe part of the reason why I like minimalist software like Forth).

Name: Anonymous 2007-10-16 19:41

Name: Anonymous 2007-10-16 19:55

the wikipedia page disappeared.
So where is the sourceforge page and the cvs server for the project ?

Name: Anonymous 2007-10-16 22:07

>>75
it's not an open source project so you won't find it on sf. http://www.ibiblio.org/pub/Linux/libs/libclear-1.00.tgz

Name: Anonymous 2007-10-17 16:59

>>8
# 14:25, 15 July 2007 C.Fred (Talk | contribs) deleted "Libclear" ‎ (CSD G11 - non-notable software as subject, and the registration fees for said software apparently go to the article's original editor. Blatant advertising

Name: Anonymous 2007-10-17 17:02

>>38

Make freeclear GNU GPL so it is really useless...

Name: Anonymous 2007-10-17 17:22

http://en.wikipedia.org/wiki/Freeclear

Here is the wikipedia entry, now someone get a sf accouter and we can unleash out EXPERT PROGRAMMER skills.

Name: Anonymous 2007-10-17 17:34

>>79
It will be deleted by wikipedos.

Name: Anonymous 2007-10-17 17:54

>>12
I got all excited for a bit, then realised I'd posted this nonsense three months ago, thus trolling my future self.

Name: Anonymous 2007-10-17 21:43

>>81
c99 isn't supported properly anywhere, why would anyone care about c09?

Name: GM 2007-10-18 2:05

[JWow, I just saved $5 by punching in 3 characters.

Name: Anonymous 2007-10-18 2:17

>>83
You are an arrogant thief, using such a dirty hacks to oppose innovations and undermine the Intellectual Property Market!

Name: Anonymous 2007-10-18 5:45


#!/usr/bin/php
<?php exec("clear"); ?>

#!/usr/bin/perl
system("clear");

#!/usr/bin/python
import os
os.system("clear")

#!/usr/bin/ruby
system "clear"

#!/usr/bin/lua
os.execute("clear")

Name: Anonymous 2007-10-18 7:10

>>82
It doesn't even exist

Name: Anonymous 2007-10-18 7:19

I BET YOU CAN'T EVEN CLEAR THE SCREEN IN LISP. THAT'S JUST TOO LOW LEVEL.

YOU'LL JUST HAVE TO PRINT ALL YOUR PRECIOUS FACTORIALS ON THE DIRTY SCREEN.

Name: Anonymous 2007-10-18 7:26

Name: Anonymous 2007-10-18 7:38

>>87
Lisp doesn't have a concept of "screen", so no you cannot "clear" "the" "screen" in lisp.

Name: Anonymous 2007-10-18 7:46


(defpackage :lisb-clear
 (:use :cffi))
(inpackage :lisb-clear)

(load-foreign-library "libclear")

(defun clear () (foreign-funcall "clear"))
(defun clear-version () (foreign-funcall "clear_version"))

Name: Anonymous 2007-10-18 10:46

lblShit.Caption = ""

It's the answer to everything

Name: Anonymous 2011-02-04 19:22

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