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

Pages: 1-4041-8081-

/prog/ is going to write a text editor

Name: Anonymous 2008-02-03 19:23

First, we must agree on what language to write it in.

I nominate C, for efficiency purposes, and that I am most comfortable in it. I also nominate Scheme, because I am proficient in it.

Name: Anonymous 2008-02-03 19:24

text editor. why?

Name: Anonymous 2008-02-03 19:27

>>2

thats his homework assignment.

Name: Anonymous 2008-02-03 19:40

ENTERPRISE Java.

Name: Anonymous 2008-02-03 19:43

lol

Name: Anonymous 2008-02-03 19:43

>>3
If it were my homework assignment, I'd be writing it in a specific language.

>>2
Because the best we have is Emacs, which is just sad.

Name: Anonymous 2008-02-03 19:48

>>6
You don't understand Emacs.

Name: Anonymous 2008-02-03 19:52

>>7
You don't understand vim.

Name: Anonymous 2008-02-03 19:54

I nominate either C++ or Java, since I have to admit, my proficiency are in these two languages.

Languages nominated:
 * C
 * Scheme
 * C++
 * Java/Enterprise Java

Name: Anonymous 2008-02-03 20:01

/prog/ needs to write a file transfer protocol and implementation that doesn't suck dick.  If it's functional: SIcp.

Name: Anonymous 2008-02-03 20:04

>>10
Fuck off, this is the text editor thread.

Name: Anonymous 2008-02-03 20:30

I second C.

Now, will it uses ncurses, X (GTK, Qt, etc.), or something else for the interface? BTW, Win32 = DO NOT WANT. We are on Linux.

I had an idea a week or two ago about a thread where /prog/ writes an ANSI C compiler.., we'll see how this turns out first.

Name: Anonymous 2008-02-03 20:30

J2EE (using AspectJ and in J++, of course), storing all files as XML strings inlined as a cell in a RDMS. All screen formatting will be done in with a client-side BBCode implementation in JavaScript using XMLHttpRequest to fetch and instantly update the EnterpriseTextXML file from the web server that interfaces the database.

Example (code used to load a file):

SELECT Row00000002 from Table00000001 WHERE Row000000001 EQUALS "hello.EnterpriseTextXML";
<?xml version="1.0" encoding="UTF-32"?>
<TextFile>
  <UTF32Character CodePoint='00000048' />
  <UTF32Character CodePoint='00000065' />
  <UTF32Character CodePoint='0000006C' />
  <UTF32Character CodePoint='0000006C' />
  <UTF32Character CodePoint='0000006F' />
</TextFile>

Name: eternalmage 2008-02-03 20:31

lol lets program it in java darby :D

then we make java sprite pornography?

Name: Anonymous 2008-02-03 20:32

I AM ANTICIPATING THAT WE WILL NEED A VARIABLE AND A FUNCTION

Name: Anonymous 2008-02-03 22:09

>>15
I AM ANTICIPATING THE USE OF A LANGUAGE THAT DOES NOT ALLOW YOU TO CHANGE VARIABLES. THUS WILL WILL NEED TWO FUNCTIONS (MY OTHER FUNCTION IS A LAMBDA).

Name: Anonymous 2008-02-03 22:14

>>16
YOUR MOTHER IS A FUNCTION

Name: Anonymous 2008-02-03 22:19

First, we must agree on what language to write it in.
No, first you must agree on what the fuck are its features, and, more importantly, why exactly it is not going to be just another failure of an editor.

Name: Anonymous 2008-02-03 22:23

>>18
How will we know what features we are able to implement if we don't know the language we're using.

Name: Anonymous 2008-02-03 22:32

>>19
Do you buy a car and then decide how many miles you drive to work in a day?

Name: Anonymous 2008-02-03 22:36

|How will we know what features we are able to implement if we don't know the language we're using.

exactly  you cant possibly say what the features are before you pick a language as it might not be possible to implement a certain feature in one language as oposssed to another 

Name: Anonymous 2008-02-03 22:37

>>20
Do you buy a car and then decide to take your cdr to work instead?

Name: Anonymous 2008-02-03 23:09

>>21
No, not "exactly". I was making fun of you faggots. You don't even know what you want in a text editor. Cart. Horse. Observe order.

Name: Anonymous 2008-02-03 23:32

>>23
YHBT. YHL. HAND.

Name: Anonymous 2008-02-03 23:42

This thread is now officially made of fail of epic proportions.

Name: Anonymous 2008-02-04 0:07

#!/bin/bash
ed

Name: Anonymous 2008-02-04 0:17

I've finished the text editor:

int fact(int n) {
    if (n<=1) return 1; else return (n * fact(n-1)); }

Name: Anonymous 2008-02-04 0:55

>>27

shit wht the hell hve you don e to my computer this keyboard is fuced

Name: Anonymous 2008-02-04 2:10

>>26
#!/bin/sh
/bin/ed

Fixed, you faggot. If you're going to use the standard text editor, use the fucking standard shell.

Name: Anonymous 2008-02-04 2:32

>>29
bash is standard, you fool.

Name: Anonymous 2008-02-04 3:07

Write a clone of EMACS using HASKELL NOMADS.

Name: Anonymous 2008-02-04 3:13

>>29
EVERYONE USES LINUX YOU FAGGET. WHAT DO YOU THINK /bin/sh IS SYMLINKED TO?

Name: Anonymous 2008-02-04 3:18

>>27
Oh yO u g Ot mE.

Name: Anonymous 2008-02-04 3:54

>>30
Only on shitty-ass piles of trash. Go suck Torvald's dick or something, faggot, you're not wanted here.

Name: >>30 2008-02-04 4:07

>>34
YHBT, YHL, HAND.

Name: Anonymous 2008-02-04 5:47

HAY GUYS WHAT I WOULD LIKE IN AN EDITOR, WHICH EMACS MAY HAVE ALREAFDY BUT I HAVE NOT LEARNED EMACS, IS THE ABILITY TO PIPE THE CURRENT BUFFER THROUGH SOMETHING AND FOR THE OUTPUT TO BE PLACED IN A NEW BUFFER OR OVERRIDE THE CURRENT. THEN YOU COULD GREP AND CUT AND SED AND DO LOADS OF STUFF WITH YOUR BUFFER. OR YOU COULD JUST DO IT WITH A SELECTION, AND THEN IT OVERRIDES THE SELECTOIN WITH THE OUTPUT OF THE PIPED COMMAND. IS THAT AEWSOME OR WHAT?

Name: Anonymous 2008-02-04 7:13

>>36
Yes, that is quite awesome. Of course, Emacs already does that, e.g.:
!!morse -s|tr -d \\n
or
:%!sort

Name: Anonymous 2008-02-04 7:15

>>36
Nope, they already tried that on Mythbusters.

Name: Anonymous 2008-02-04 7:37

Guise, I just wanted us to decide on language based on the fact that if we have a shitton of C programmers and 3 Java programmers, it makes sense to write it in C.

Name: Anonymous 2008-02-04 8:44

PROJECT APPROVED

CODING COMMENCES AT 1800 EST TODAY. BE THERE OR BE SQUARE

Name: Anonymous 2008-02-04 9:09

>>36
I don't understand, somebody please rewrite in plain English ;_;

Name: Anonymous 2008-02-04 9:16

Why write another text editor, when there is already Emacs. Why not write something useful, like a good scheme-mode for Emacs. Something like SLIME except for Scheme.

Name: Anonymous 2008-02-04 9:19

Or bbcode-mode.

Name: Anonymous 2008-02-04 9:28

Or vi-mode

Name: Anonymous 2008-02-04 9:31

>>44
M-x viper-more

Name: Anonymous 2008-02-04 9:40

Or ed-mode

Name: Anonymous 2008-02-04 9:40

Because Emacs is shit

Name: Anonymous 2008-02-04 9:47

Because Emacs is the shit

Name: Anonymous 2008-02-04 10:02

Because Emacs is the horse shit

Name: Anonymous 2008-02-04 10:15

>>48
And to think I almost added `and no, not the shit' to my post.

Name: Anonymous 2008-02-04 10:19

WHAT

MAKE IT IN C++, FAGGOTS

Name: Anonymous 2008-02-04 10:20

>>51
I'M A C++ FAGGOT

Fixed

Name: Anonymous 2008-02-04 10:37


HAY GUYS IM CHARLIE BROWN. YOU MAY KNOW ME FROM PEANUTS. I HEARTILY ENDORSE /PROG/'S OWN EDITOR

   .-' &   '-.
  /           \
 :   o    o    ;
(      (_       )
 :             ;
  \    __     /
   `-._____.-'
     /`"""`\
    /    ,  \
   /|/\/\/\ _\
  (_|/\/\/\\__)
    |_______|
   __)_ |_ (__
  (_____|_____)

Name: Anonymous 2008-02-04 10:40

>>47
I have a theory that no one who dislikes Emacs can make a decent text editor.

Name: Anonymous 2008-02-04 10:44

>>54
I have a theory that no one who likes Emacs can like an editor made by someone who dislikes Emacs.

Name: Anonymous 2008-02-04 10:46

Emacs is the superset of all editors

Name: Anonymous 2008-02-04 10:48

IT IS TO BE WRITTEN IN SCHEME

Name: Anonymous 2008-02-04 10:53

Who cares about the fucking language? What are the features that are going to make this editor worth using?

Name: Anonymous 2008-02-04 10:56

>>58
IT WILL BE FULLY SUSSMAN-COMPLIANT

Name: Anonymous 2008-02-04 10:57

>>58
It will be harder to use than emacs, vi and ed. Learning it takes about 10 years. But it makes you more productive.

Name: Anonymous 2008-02-04 11:02

WILL IT SUPPORT THE FORCED INDENTATION OF CODE?

Name: Anonymous 2008-02-04 11:11

/prog/ could technically never produce an editor because if all /prog/rammers would agree on ONE set of functions for a text editor it would create a temporal parafoxx and they would all yell to their cabby 'yo homes, smell ya later', then look at their kingdom and they would finally be there, to sit on their throne as the prince of bel air

Name: Anonymous 2008-02-04 11:36

>>62
Leave, please.

Name: Anonymous 2008-02-04 11:51

>>61
It will be incredibly hard to use, have arbitrary restrictions, only support Scheme, and forcibly indent anything it detects not to be Scheme so the code is useless.

Name: Anonymous 2008-02-04 12:34

The help will be SICP. nothing more. nothing less

Name: Anonymous 2008-02-04 12:36

We will design and implement a set of library routines. Each user shall then construct their own editor from those library routines. Language portability is ensured by using C as primary implementation language; there are FFI-type bindings to C from nearly anything not-C.

Name: Anonymous 2008-02-04 13:10

>>66
That is not Scheme.

Name: Anonymous 2008-02-04 14:00

Some faggot told /pr/ about our glorious text editor plan

Name: Anonymous 2008-02-04 14:07

Let's just port emacs from Common Lisp to Scheme.

Name: Anonymous 2008-02-04 14:10

>>69
WHAT? SHUT UP

Name: Anonymous 2008-02-04 14:11

>>68
...what were YOU doing in /pr/?

A-HA! THE TRAITOR IS EXPOSED!

Name: Anonymous 2008-02-04 14:24

>>68
YOU PRICK WHAT WERE YOU DOING IN /pr/

NOW THE AIDS WILL SPREAD AND WE WILL HAVE TO CLEANSE THE BOARDS

Name: Anonymous 2008-02-04 14:44

>>21
LRN
2
QUOTE, FAGGOT

Name: Anonymous 2008-02-04 14:48

>>73
hi slowpoke

Name: Anonymous 2008-02-04 14:50

>>74
Faggotry is timeless.

Get the fuck out.

Name: Anonymous 2008-02-04 17:33

>>69
You mean Climacs.

Name: Anonymous 2008-02-04 20:16

So when are we going to start development, being that it's being done in C?

Name: Anonymous 2008-02-04 21:24

Development shall begin at 18:00 EST. Be there are be []

Name: Anonymous 2008-02-04 21:30

OK, let's get going.

int main()
{
}


Anyone who wants to contribute can, under the condition that they accept a GNU license.

Name: Anonymous 2008-02-04 21:36

int main()
{
    return 0;
}

Name: Anonymous 2008-02-04 21:39

I do not accept the GNU/Viral license.

Name: Anonymous 2008-02-04 21:44

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main( int argc, char* argv[] ) {
    return 0;
}

Name: Anonymous 2008-02-04 21:49

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ncurses.h"

int main( int argc, char* argv[] ) {
    printf( "negropenis\n" );
    return 0;
}

Name: Anonymous 2008-02-04 21:56

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ncurses.h"

int main( int argc, char* argv[] ) {
    printf( "negropenLISP\n" );
    return main(1, "LISP");
}

Name: Anonymous 2008-02-04 22:31


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ncurses.h"

int fact(int n);

int main( int argc, char* argv[] ) {
    printf( "negropenLISP\n" );
    printf( "The 3rd factorial is %d\n", fact(4) );
    return main(1, "LISP");
}

int fact(int n) {
    if (1 >= n) return 1;
    return n*fact(n-1);
}

Name: Anonymous 2008-02-04 22:54

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ncurses.h"

int lisp(int n);

int main( int lispc, char* lispv[] ) {
    lispf( "negropenLISP\n" );
    lispf( "Lisp lisp lisp lisp %d\n", lisp(4) );
    return main(1, "LISP");
}

int lisp(int n) {
    if (1 >= n) return 1;
    return n*lisp(n-1);
}

Name: Anonymous 2008-02-04 23:39


#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>

int main(void) {
   
    size_t n = 0;
    const char buf[] = "\\|/-";
    pid_t pid;

    setbuf(stdout, NULL);

    if(signal(SIGCHLD, exit) == SIG_ERR) {
        perror("signal");
        return -1;
    }

    if((pid = fork()) == -1) {
        perror("fork");
        return -1;
    }

    if(pid == 0) {
        getchar();
        exit(0);
    }

    for(n = 0; n < 1024; n++) {

        if(n == sizeof buf - 1)
            n = 0;
       
        putchar(buf[n]);
        putchar(buf[(n + 1) % (sizeof(buf) - 1)]);
        putchar(buf[(n + 2) % (sizeof(buf) - 1)]);
        putchar(buf[(n + 3) % (sizeof(buf) - 1)]);
       
        usleep(100000);
       
        putchar('\r');
        putchar('\r');
        putchar('\r');
        putchar('\r');
    }

    return 0;
}


:PpP

Name: Anonymous 2008-02-05 0:11


10 PRINT "TEXT EDITOR"
20 OPEN "FILE.TXT" FOR OUTPUT AS 1
21 PRINT "TYPE :wq! TO SAVE+EXIT."
30 INPUT A$
31 IF A$=":wq!" THEN CLOSE 1:END
40 PRINT #1,A$
41 GOTO 30

Name: Anonymous 2008-02-05 0:26

(loop (print (eval (read))))

Name: Anonymous 2008-02-05 1:02

(loop
  (read)
  (format t "?~%"))

Behold, I have created mighty ed!

Name: Anonymous 2008-02-05 1:36

/*
 *   Notepad application
 *   Copyright (C) 1984-1995 Microsoft Inc.
 */


#include "precomp.h"
#include <htmlhelp.h>

#define DeepTrouble() MessageBox(hwndNP, szErrSpace, szNN, MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);

UINT     lGotoLine;                  /* line number to goto to */

TCHAR    chMerge;
HWND     hwndNP = 0;                 /* handle to notepad parent window    */
HWND     hwndEdit = 0;               /* handle to main text control item  */
HANDLE   hEdit;                      /* Handle to storage for edit item   */
HWND     hDlgFind = NULL;            /* handle to modeless FindText window */
HANDLE   hStdCursor;                 /* handle to arrow or beam cursor    */
HANDLE   hWaitCursor;                /* handle to hour glass cursor       */
HANDLE   hInstanceNP;                /* Module instance handle            */
HANDLE   hFont;                      /* handle to Unicode font            */
LOGFONT  FontStruct;                 /* font dialog structure             */
INT      iPointSize=120;             /* current point size unit=1/10 pts  */
TCHAR    szFileName[MAX_PATH+1];     /* Current notepad filename          */
TCHAR    szSearch[CCHKEYMAX];        /* Search string                     */
TCHAR    szReplace[CCHKEYMAX];       /* replace string                    */

BOOL     fUntitled = TRUE;           /* TRUE iff notepad has no title      */

HMENU hSysMenuSetup;                 /* Save Away for disabled Minimize   */

DWORD     dwEmSetHandle = 0;          /* Is EM_SETHANDLE in process?       */
HANDLE   hAccel;                     /* Handle to accelerator table       */
BOOL     fRunBySetup = FALSE;        /* Did SlipUp WinExec us??           */
BOOL     fWrap = 0;                  /* Flag for word wrap                */
TCHAR    szNotepad[] = TEXT("Notepad");/* Name of notepad window class       */

BOOL fInSaveAsDlg = FALSE;

/* variables for the new File/Open, File/Saveas,Find Text and Print dialogs */
OPENFILENAME OFN;                     /* passed to the File Open/save APIs */
TCHAR szOpenFilterSpec[CCHFILTERMAX]; /* default open filter spec          */
TCHAR szSaveFilterSpec[CCHFILTERMAX]; /* default save filter spec          */
NP_FILETYPE g_ftOpenedAs=FT_UNKNOWN;  /* current file was opened           */
NP_FILETYPE g_ftSaveAs;               /* current file was opened           */

FINDREPLACE FR;                       /* Passed to FindText()              */
PAGESETUPDLG g_PageSetupDlg;
UINT wFRMsg;                          /* message used in communicating     */
                                      /* with Find/Replace dialog          */

DWORD dwCurrentSelectionStart = 0L;      /* WM_ACTIVATEAPP selection pos */
DWORD dwCurrentSelectionEnd   = 0L;      /* WM_ACTIVATEAPP selection pos */
UINT wHlpMsg;                        /* message used in invoking help     */

/* Strings loaded from resource file passed to LoadString at initialization time */
/* To add resource string:
 * 1) create IDS_ macro definition in notepad.h
 * 2) create string in resource file
 * 3) create 'TCHAR*' variable directly below and in notepad.h file
 * 4) add &variable to rgsz
 * 5) increment CSTRINGS
 */
TCHAR *szDiskError =(TCHAR *)IDS_DISKERROR;  /* Can't open File, check disk  */
TCHAR *szFNF       =(TCHAR *)IDS_FNF;        /* File not found               */
TCHAR *szFAE       =(TCHAR *)IDS_FAE;        /* File already exists          */
TCHAR *szSCBC      =(TCHAR *)IDS_SCBC;       /* Save changes before closing? */
TCHAR *szUntitled  =(TCHAR *)IDS_UNTITLED;   /* untitled                     */
TCHAR *szCFS       =(TCHAR *)IDS_CFS;        /* Can't find string            */
TCHAR *szErrSpace  =(TCHAR *)IDS_ERRSPACE;   /* Memory space exhausted       */
TCHAR *szNpTitle   =(TCHAR *)IDS_NOTEPAD;    /* Notepad -                    */
TCHAR *szFTL       =(TCHAR *)IDS_FTL;        /* File too large for notepad   */
TCHAR *szNN        =(TCHAR *)IDS_NN;         /* Notepad Note!                */
TCHAR *szPDIE      =(TCHAR *)IDS_PRINTDLGINIT; /* Print dialog init error    */
TCHAR *szCP        =(TCHAR *)IDS_CANTPRINT;  /* Can't print                  */
TCHAR *szNVF       =(TCHAR *)IDS_NVF;        /* Not a valid filename.        */
TCHAR *szCREATEERR =(TCHAR *)IDS_CREATEERR;  /* cannot create file           */
TCHAR *szNoWW      =(TCHAR *)IDS_NOWW;       /* Too much text to word wrap   */
TCHAR *szMerge     =(TCHAR *)IDS_MERGE1;     /* search string for merge      */

TCHAR *szHelpFile  =(TCHAR *)IDS_HELPFILE;   /* Name of helpfile.            */
TCHAR *szBadMarg   =(TCHAR *)IDS_BADMARG;    /* Bad margins.                 */
TCHAR *szFileOpenFail =(TCHAR *)IDS_FILEOPENFAIL;  /* Can't open File */
TCHAR *szAnsiText  =(TCHAR *)IDS_ANSITEXT; /* File/Open ANSI filter spec. string */
TCHAR *szAllFiles  =(TCHAR *)IDS_ALLFILES;   /* File/Open Filter spec. string */
TCHAR *szOpenCaption = (TCHAR *)IDS_OPENCAPTION; /* caption for File/Open dlg */
TCHAR *szSaveCaption = (TCHAR *)IDS_SAVECAPTION; /* caption for File/Save dlg */
TCHAR *szCannotQuit = (TCHAR *)IDS_CANNOTQUIT;  /* cannot quit during a WM_QUERYENDSESSION */
TCHAR *szLoadDrvFail = (TCHAR *)IDS_LOADDRVFAIL;  /* LOADDRVFAIL from PrintDlg */
TCHAR *szErrUnicode =(TCHAR *)IDS_ERRUNICODE;  /* Unicode character existence error */
TCHAR *szACCESSDENY = (TCHAR *)IDS_ACCESSDENY; /* Access denied on Open */
TCHAR *szFontTooBig = (TCHAR *)IDS_FONTTOOBIG; /* font too big or page too small */
TCHAR *szCommDlgErr = (TCHAR *)IDS_COMMDLGERR; /* common dialog error %x */
TCHAR *szCommDlgInitErr = (TCHAR *)IDS_COMMDLGINIT; /* common dialog error %x */


TCHAR *szLineError    = (TCHAR*)IDS_LINEERROR;   /* line number error        */
TCHAR *szLineTooLarge = (TCHAR*)IDS_LINETOOLARGE;/* line number out of range */

Name: Anonymous 2008-02-05 1:48

>>91
the fuck

Name: Anonymous 2008-02-05 3:03

>>92
looks like you weren't around when MS released the source to notepad...

Name: Anonymous 2008-02-05 8:20

>>93
Looks like you weren't around when GNU released the source to Windows 98.

Name: Anonymous 2008-02-05 9:31

>>94
This might surprise you, but it looks like you weren't around when I invented that meme.

Name: Anonymous 2008-02-05 9:32

So why did he use /*the game*/ instead of // the game as a single-line comment?

Name: Anonymous 2008-02-05 11:41

>>96
C IS NOT C++ FUCK OFF

Name: Anonymous 2008-02-05 11:49

>>97
C99 SUPPORTS SINGLE-LINE COMMENTS LERN2ISO9899:1999

Name: Anonymous 2008-02-05 12:09

There are four engineers traveling in a car -- a mechanical engineer,
a chemical engineer, an electrical engineer, and a computer engineer. The car breaks down.

"Sounds to me as if the pistons have seized. We'll have to strip
down the engine before we can get the car working again", says the
mechanical engineer.

"Well", says the chemical engineer, "it sounded to me as if the fuel
might be contaminated. I think we should clear out the fuel system."

"I thought it might be an grounding problem", says the electrical
engineer, "or maybe a faulty plug lead."

They all turn to the computer scientist, who up to then had said
nothing, and asked "Well, what do you think?"

"I put on my wizard robe and hat. My other car is a cdr." The computer scientist pulls out a cudder from his pocket, and shoves it down the throats of the engineers. "Take that, motherfuckers!!!!"

Name: Anonymous 2008-02-05 12:09

>>98
GNU IS NOT UNIX FUCK OFF

Name: Anonymous 2008-02-05 14:59

>>99
I came

Name: Anonymous 2008-02-05 15:02

>>98
Notepad waas written in a time when C99 didn't exist

Name: Anonymous 2008-02-05 21:30

>>93
link/pointer to said notepad source

Name: Anonymous 2008-02-06 12:38

YOU WILL NOT DIE

Name: Anonymous 2008-02-06 15:40

>>103
NotepadSource *notepad_source;

Name: Anonymous 2008-02-06 21:59

Name: Anonymous 2008-02-07 6:09

>>106
That's a lot of bloat.

Name: ​​​​​​​​​​ 2010-10-22 6:43

Name: ​​​​​​​​​​ 2010-10-24 2:36

Name: Anonymous 2010-11-25 17:43

Name: Anonymous 2011-02-03 6:20

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