Re: EUPHORIA Digest - 26 Jun 1998 to 27 Jun 1998 (#1998-41)
- Posted by Andy Kurnia <akur at DELOS.COM> Jun 28, 1998
- 781 views
At 12:00 AM 6/28/98 -0400, Automatic digest processor wrote: [desja at GLOBETROTTER.QC.CA Re: Various subjects] (I call this ver #2) >global function faster_getsc(integer fn, integer len) > sequence t > integer pos > t = repeat(0,len) > for i = 1 to len do > t[i]=getc(fn) > end for > pos = find(-1,t) > if not post then > return t > else > return t[1..pos-1] > end if >end function Hmm, great ("post" should be changed to "pos"), but is find really faster? How about replacing the 5 lines after end for to: return t[1..find(-1, t & -1) - 1] (we don't need to declare 'pos')? (call this ver #3) How about replacing *that* return line with: return t[1..find(-1, t) - 1] and replace t = repeat(0, len) with: t = repeat(-1, len + 1) ? (call this ver #4) Which is fastest? [nieuwen at XS4ALL.NL Re: rand(repeat(num_subjects, num_subjects))] >Ah.. why not implemt goto's (this is meant ironically) Yeah, why? :-> >Yes, Continue is welcome. Well, Rob?>A "for (a, b, c) d " translates in: >{ a & b & c & d & continue } as I recall (maybe the order is a bit Actually: a; while (b) { d; c; } [thedoog at MAILEXCITE.COM Re: Terse] > I like the idea of designing a preprocessor that would >use a TERSE like syntax and convert programs to Euphoria. >IF the syntax isd designed intuitively enough, then writing >programs in such a manner could be faster and possibly easier >then writing them in Euphoria. My only suggestion before Hmm, would anyone design such an intuitive syntax? TERSE's syntax *is* very intuitive, you don't need the manual to read the tersed Assembly. The manual however, reminds you of some mnemonics to help you mentally connect the TERSE operators with the corresponding Assembly language. I don't consider myself a good language designer
>would like to here them. (I'm not saying I think assembly is easy, but >terse isn't assembly. Its at a higher level. I'm sure you know that TERSE is Assembly, by the way. It's just an easier-to-read, easier- to-write shape of it. TERSE processes your source to Assembly (much like .pp-to-.ex?), which is then sent to your favorite assembler to be assembled and linked normally. [daber at PAIR.COM Re: rand(repeat(num_subjects, num_subjects))] >can easily create any data structure you want. In Scheme you have only 'car' >and 'cdr' functions that gives you, as Andy pointed, x[1] and >x[2..length(x)] respectivly. You must also use extensive (perhaps the only Is there a function to return the length? I forgot... [daber at PAIR.COM Re: big problem] >>I just finished my program, bound it, and deleted the .ex file by accident. >Too bad, not a hope on the horizon :( I remember someone had written such an unshrouder... To unbind to a shrouded source, remove the first (length_of_interpreter + 5) bytes. Length_of_interpreter depends on whether you are using bind or bindw. (Surely one can make an Euphoria program to do this!?) To unshroud it, hmm... that's another matter. Someone wrote an unshrouder, I'm not sure where or if I keep it though! If you are registered, and scrambled your source -- too bad!! [mdeland at NWINFO.NET Re: big problem] >did you try 'undelete'? Actually this is a suggestion that should NEVER appear in an e-mail. Why? As he receives your e-mail he is saving it, thereby destroying his chances of undeleting
[mdeland at NWINFO.NET coding ideas] >someone (andy?) posted they wanted coding ideas that Yes it's me. Thanks for your ideas. >1> Automatic HTML page _creator_ [... stuff about template, list of (sub)topics, entire HTML and dirs] >nice pro-bono would be automatic link generation as well, >to link topic pages to sub topics, and of course, those >links created would be based on a sub template as well... >default surrounding link code (like bullets for ex.) would [... sample topics.txt, linktemplate.txt] Hmm, it's not very clear. (e.g. No template.txt, no sample HTML, no obvious way to relate the topics with filenames, etc...) >2>a 'project' based ide of some sort for Euph... I'm not sure what you are asking for, but it seems like the editor should present a list of *.e files and you just select which *.e you use and they are included automatically... right? >3>an easy to use IPX & TCPIP include file for DOS and >WIN Euph. sockets and base octal give me migraines :) They give *me* headache, as well.
[CHARN1407 at AOL.COM Re: big problem] >It's probably possible for Rob to unbind/unshroud a program, but that might be >a security gap or something...I usually make copies of my source and store it Right, it's a security gap: you can use it on others' programs... [ATU5713 at COMPUSERVE.COM Re: Terse] >BTW, you want terse? YOU WANT TERSE? Write in Euphoria, shrouded form. Great! Anyone with a LIST? (e.g. #128 is if, #129 is else, ...) TERSE (real TERSE -- www.terse.com) is very readable and easily writeable. Shrouded Euphoria, OTOH, needs extended ASCII and has no easy way to read. [Falkn13 at IBM.NET project idea] >Idea #1 is a library for manipulating byte-sized variables, structured >sequences, sequences of structured sequences, and dimensioned type-checked >(and/or structure-checked) arrays. I've That's something "simple", i.e. something I would want to make. Details please? > Idea #2, a program that looks at a source code file, and down through >all included files >(nested even), makes a list of all identifiers (constants, variables, and >routine names) and >checks for namespace conflicts within the different scopes. [snip] Cool. But I'd need an official copy of the BNF of Euphoria. Rob says he doesn't have it, nor does he want to do it, so there. Maybe anyone who knows what a BNF is could come up with a semi-official BNF of Euphoria? > I say preferably interactively because it may not always correctly >deduce which of the two >conflicting items a given symbol should be. And it may not really know >whether a scope >change or name change would be preferable to the user. Or which file the >user would prefer to >make changes to. Hmm? I don't get it. It may just rename all variables to VAR000, VAR001, etc, and try to rename back unless a conflict occurs, and save all to the same names with a different extension (xyz.ex becomes xyz.vx, for example), the user can then do: copy /y *.vx *.ex [ATU5713 at COMPUSERVE.COM Kryptonite v1.1] To Alan, and others who send MIME attachments: please note that these do not display well (nor do they decode) for digest recipients like me. If possible please use UUEncode.