1. [DOS] Re print sequences
- Posted by Michael Nelson <MichaelANelson at WORLDNET.ATT.NET> Oct 29, 2000
- 417 views
- Last edited Oct 30, 2000
Dan, There is a potential problem: while {a,b,c} is highly readable, it is not a legal Euphoria sequence for get(). However {'a','b','c'} is almost as readable and is a legal sequence for get(). -- Mike Nelson
2. Re: [DOS] Re print sequences
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Oct 29, 2000
- 406 views
- Last edited Oct 30, 2000
Mike, Ok, I'll probably make a differently named variation on the print variation, so I never use it in a file I might be using a get() on; but his routine does even better than you might have remembered: it doesn't output either {a,b,c} or {'a','b','c'} , but rather "abc"! So I changed it to output {abc}, so I could more easily see the variable's structure, showing {{abc},{def}}, instead of his {"abc","def"} But this is a *great* routine, why isn't it included in Euphoria??? Dan ----- Original Message ----- From: "Michael Nelson" <MichaelANelson at WORLDNET.ATT.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Sunday, October 29, 2000 11:06 PM Subject: [DOS] Re print sequences > Dan, > > There is a potential problem: while {a,b,c} is highly readable, it is not a > legal Euphoria sequence for get(). However {'a','b','c'} is almost as > readable and is a legal sequence for get(). > > -- Mike Nelson
3. Re: [DOS] Re print sequences
- Posted by irv <irv at ELLIJAY.COM> Oct 30, 2000
- 409 views
On Mon, 30 Oct 2000, you wrote: > Mike, > [re: Gabriel Boehme's print.e] > But this is a *great* routine, why isn't it included in Euphoria??? It's also faster, and cuts the size of your data files by 50 - 75%, depending upon how much of the data is "strings". And the data is still completely compatible with Euphoria's file input routines. So, to repeat, why _isn't_ it included in Euphoria?? Irv
4. Re: [DOS] Re print sequences
- Posted by Robert Craig <rds at ATTCANADA.NET> Oct 30, 2000
- 393 views
Irv writes: >> [re: Gabriel Boehme's print.e] > >> But this is a *great* routine, why isn't it included in Euphoria??? > > It's also faster, and cuts the size of your data files by 50 - 75%, > depending upon how much of the data is "strings". And the data > is still completely compatible with Euphoria's file input routines. > > So, to repeat, why _isn't_ it included in Euphoria?? If you are serious about saving/restoring large amounts of Euphoria data, in a compact format, and at high speed, you should probably be using database.e - the Euphoria Database System. database.e will be included in Euphoria in the next release. Whether something is "in" or "out" of Euphoria is a very subjective decision, and in some ways irrelevant. If you want print.e to be "in", just add it to your own euphoria\include directory. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
5. Re: [DOS] Re print sequences
- Posted by irv <irv at ELLIJAY.COM> Oct 30, 2000
- 382 views
On Mon, 30 Oct 2000, you wrote: > Irv writes: > >> [re: Gabriel Boehme's print.e] > > > >> But this is a *great* routine, why isn't it included in Euphoria??? > > > > It's also faster, and cuts the size of your data files by 50 - 75%, > > depending upon how much of the data is "strings". And the data > > is still completely compatible with Euphoria's file input routines. > > > > So, to repeat, why _isn't_ it included in Euphoria?? ..... > Whether something is "in" or "out" of Euphoria is a very > subjective decision, and in some ways irrelevant. If you want > print.e to be "in", just add it to your own euphoria\include > directory. Perhaps there is some logical reason the current method was chosen, maybe even something not obvious that makes it a better choice for certain uses. If so, please share. Regards, Irv
6. Re: [DOS] Re print sequences
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 31, 2000
- 382 views
Hi Robert, Hey now, there's an idea! Can you get Euphoria to support multiple "include" directories in its search path? Maybe an environment symbol like C uses. set EULIB=D:\My ----- Original Message ----- From: "Robert Craig" <rds at ATTCANADA.NET> > just add it to your own euphoria\include directory. > ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot)
7. Re: [DOS] Re print sequences
- Posted by Robert Craig <rds at ATTCANADA.NET> Oct 30, 2000
- 418 views
- Last edited Oct 31, 2000
Derek Parnell writes: > Hey now, there's an idea! Can you get Euphoria to support > multiple "include" directories in its search path? Maybe an > environment symbol like C uses. This idea has come up before. I think it's worthy of consideration. It's on my infamous "list" somewhere. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
8. Re: [DOS] Re print sequences
- Posted by Robert Craig <rds at ATTCANADA.NET> Oct 30, 2000
- 403 views
- Last edited Oct 31, 2000
Irv writes regarding print() vs. Boehme's print.e: > Perhaps there is some logical reason the current method > was chosen, maybe even something not obvious that makes > it a better choice for certain uses. If so, please share. print() displays any Euphoria object. It displays all atoms as numbers. This is the simplest way to display an object. Boehme's print.e looks for sequences containing atoms that are all in the range 32 to 255, and it displays those sequences as strings (whether they are meant to be strings or not). Boehme's method is more compact than print(), which is useful if you are writing out large amounts of data (as I suspect you are Irv). EDS uses a more sophisticated approach to making the data compact, one which has the added benefit of not losing accuracy when floating-point numbers are written, and read back in. print() does not exist just to supply the input to get(). print() can be used by itself simply to display objects. There is no way that I would change print() to use Boehme's method, and with the advent of EDS, I don't think Boehme's print() is useful enough to enough people to justify adding it to the standard includes. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
9. Re: [DOS] Re print sequences
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Oct 31, 2000
- 403 views
----- Original Message ----- From: "Robert Craig" <rds at ATTCANADA.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Monday, October 30, 2000 6:53 PM Subject: Re: [DOS] Re print sequences > Irv writes regarding print() vs. Boehme's print.e: > > Perhaps there is some logical reason the current method > > was chosen, maybe even something not obvious that makes > > it a better choice for certain uses. If so, please share. > > print() displays any Euphoria object. > It displays all atoms as numbers. > This is the simplest way to display an object. But it is *not* the most *helpful*!! If a "newbie" or otherwise inexpert programmer is trying to use "print" to attempt to debug an improperly constructed sequence involving textual items, seeing all those numbers does *not* help them to see what the actual (& possibly complex) structure *is*, as opposed to what the programmer *wanted* it to be. Seeing *text* in the output sequence *does* help see the structure, because then the programmer can compare recognizable, understandable things to what they *intended* to be there. > > Boehme's print.e looks for sequences containing > atoms that are all in the range 32 to 255, and it displays > those sequences as strings (whether they are meant to be > strings or not). Is that a problem?? > > Boehme's method is more compact than print(), > which is useful if you are writing out large > amounts of data (as I suspect you are Irv). > EDS uses a more sophisticated approach to making > the data compact, one which has the added benefit > of not losing accuracy when floating-point numbers are > written, and read back in. Well *I* wasn't trying to write out large amounts of data, just trying to debug a malformed sequence structure, and the regular "print" did *not* help me, and Gabriel's *did*, and I think it would be potentially helpful to others in a similar circumstance too. > > print() does not exist just to supply > the input to get(). print() can be used by itself simply > to display objects. But for *text* based sequence structures, Gabriel's method displays them *more usefully*! I could *not* have debugged a recent mal-formed text sequence (ie, inadvertently constructed *way* different than I intended) using the *regular* "print", because it was too complex to make any sense of it with *all those numbers*; with the *text* output from Gabriel's method I could see almost *instantly* what was wrong. (I did temporarily change his "quote" output around text "back" to "curly braces", so I could see all the sequences even more clearly.) There is no way that I would change > print() to use Boehme's method, and with the advent of EDS, > I don't think Boehme's print() is useful enough to enough people > to justify adding it to the standard includes. > That's too bad, because I would think many beginners might struggle unnecessarily trying to figure out why their not enormous data structures weren't working, when an improved "print" would solve that problem for them almost immediately. And to "include" it they would need to *know* about it, which they might very well *not*. So having it *in* the language would be "user-friendly", rather than: "futz around with what you're trying to do for a while, get frustrated, ask people on the list if there's a better way, find out there *is*, go get it, "include" it, *then* use it. I think having the improved "print" *in* the language would be *way* better than that. And speaking of "beginners", I think a *lot* (?) of people have been often confused about how exactly to get something to "print" out to the screen; possibly having some previous familiarity with "print" as a command to do this, they try it in Euphoria and just get a bunch of *numbers*. If an alteration of Gabriel's version (with print of a single sequence to the screen being output without quotes) were *standard*, it would have the *dual* advantage of being more *familiar* (than "puts"), *and* it would help in the case when what they are trying to print out (unintentionally) has sequences inside sequences: instead of erroring out like "puts" does, Gabriel's print would just *print* it. It would probably be *wrong*, but at least by having it there to *see*, the programmer could have an idea what they *should* have specified to print. I found Gabriel's "print" to be *very* helpful; if it were a part of Euphoria, I really think others would find it to be useful too. If it's not in it, & they don't *know* about it, then they can't use it. Respectfully, Dan Moyer P.S. I was making a parser to abstract all the Euphoria topics, routine names, and routine *syntax* out of the library document, so I could include them in a variation of Judith's improvement of David's IDE, so users could more easily find & paste the Euphoria routines into the code editor, just by clicking on their names in a list & then clicking on "paste". Using Gabriel's "print" let me debug the structure of my data sequence so it would be correct & let the parser function right. > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com