From mnoble at space.mit.edu Fri Mar 3 14:53:36 2006 From: mnoble at space.mit.edu (Michael Noble) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] slirp 1.7.9 released Message-ID: <20060303195336.GA15212@svoboda.mit.edu> Friends, Version 1.7.9 of SLIRP has been released to http://space.mit.edu/CXC/software/slang/modules/slirp This is a very minor release, issued primarily to establish portability to Windows, under MingW and CygWin. Regards, Mike Noble ----------------------------------------------------------------------- Changes in v1.7.9 1. Ensure SLSH -n switch is used in all examples, and generated makefiles 2. slirp_debug_pause() no longer included by default in generated modules; use new -d option to force its inclusion 3. Established Windows portability, under MinGW 5.0.2 (gcc 3.4.2) and CygWin 1.5.18 (gcc 3.3.3) ** Requires as-yet unreleased patches to S-Lang 2.0.6 *** NOTE FOR CYGWIN 1.5.19 USERS: there appears to be a buggy interaction between CygWin 1.5.19 and GCC 3.4.4, which can cause the host application to abort when loading C++ DLLs. (example: www.cygwin.com/ml/cygwin/2005-08/msg00061.html) This causes the SLIRP C++ regression tests to fail, and effectively prevents the use of SLIRP-generated C++ modules. From rmilas at head.cfa.harvard.edu Tue Mar 7 08:59:02 2006 From: rmilas at head.cfa.harvard.edu (Robert Milaszewski) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] Implicit variable declarations Message-ID: <440D91A6.7070701@head.cfa.harvard.edu> I am using slang2 and here is the issue that I encountered Consider sample code : variable x = [1:100:1]; newvar = @variable; is_defined("newvar"); is_defined returns 0 which means newvar is not defined. But I can do print(newvar) and I get valid values; What am I missing? thanks, RobertM From mnoble at space.mit.edu Tue Mar 7 09:41:16 2006 From: mnoble at space.mit.edu (Michael Noble) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] Implicit variable declarations In-Reply-To: <440D91A6.7070701@head.cfa.harvard.edu> References: <440D91A6.7070701@head.cfa.harvard.edu> Message-ID: <20060307144116.GA1324@svoboda.mit.edu> > I am using slang2 and here is the issue that I encountered > Consider sample code : > > variable x = [1:100:1]; > newvar = @variable; It is unclear to me how this would even work. "variable" is a reserved identifier, and so cannot be used in this context. slsh> variable x = [1:100:1]; slsh> newvar = @variable; :2: Expecting a PRIMARY: found 'variable' :2::Syntax Error After which slsh> is_defined("newvar"); returns 0 as expected. What application/version are you trying this within? HTH, Mike From rmilas at head.cfa.harvard.edu Tue Mar 7 09:46:37 2006 From: rmilas at head.cfa.harvard.edu (Robert Milaszewski) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] Implicit variable declarations In-Reply-To: <20060307144116.GA1324@svoboda.mit.edu> References: <440D91A6.7070701@head.cfa.harvard.edu> <20060307144116.GA1324@svoboda.mit.edu> Message-ID: <440D9CCD.5090303@head.cfa.harvard.edu> Sorry for the confusion I made small typo. The code should be : variable x = [1:100:1]; newvar = @x; is_defined("newvar"); RobertM Michael Noble wrote: >>I am using slang2 and here is the issue that I encountered >>Consider sample code : >> >>variable x = [1:100:1]; >>newvar = @variable; >> >> > >It is unclear to me how this would even work. "variable" is >a reserved identifier, and so cannot be used in this context. > > slsh> variable x = [1:100:1]; > slsh> newvar = @variable; > :2: Expecting a PRIMARY: found 'variable' > :2::Syntax Error > >After which > > slsh> is_defined("newvar"); > >returns > > 0 > >as expected. What application/version are you trying this within? > >HTH, >Mike > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.jtan.com/pipermail/slang-users-l/attachments/20060307/03670acf/attachment.htm From mnoble at space.mit.edu Tue Mar 7 09:55:56 2006 From: mnoble at space.mit.edu (Michael Noble) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] Implicit variable declarations In-Reply-To: <440D9CCD.5090303@head.cfa.harvard.edu> References: <440D91A6.7070701@head.cfa.harvard.edu> <20060307144116.GA1324@svoboda.mit.edu> <440D9CCD.5090303@head.cfa.harvard.edu> Message-ID: <20060307145556.GA1879@svoboda.mit.edu> > > variable x = [1:100:1]; > newvar = @x; > is_defined("newvar"); Then I believe this is a namespace issue. slsh> implements("foo") slsh> x = [1:100] slsh> newvar = @x slsh> is_defined("foo->newvar") -2 slsh> is_defined("newvar") 0 The print() works because it operates in the current namespace, which in slsh for example, is by default unnamed. HTH, -Mike From davis at space.mit.edu Tue Mar 7 11:34:43 2006 From: davis at space.mit.edu (John E. Davis) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] Implicit variable declarations In-Reply-To: <20060307145556.GA1879@svoboda.mit.edu> References: <440D91A6.7070701@head.cfa.harvard.edu> <20060307144116.GA1324@svoboda.mit.edu> <440D9CCD.5090303@head.cfa.harvard.edu> <20060307145556.GA1879@svoboda.mit.edu> Message-ID: <200603071634.k27GYhVL004293@aluche.mit.edu> Michael Noble wrote: >> variable x = [1:100:1]; >> newvar = @x; >> is_defined("newvar"); > >Then I believe this is a namespace issue. Right. Unless a namespace prefix is specified, `is_defined` searches the "Global" namespace. Variables that are automatically declared are placed in the static namespace, which may be anonymous as in your case. The `is_defined` function will not search such namespaces. If you want to search the current namespace, which may be an anonymous one, then use the `_apropos` function, e.g., names = _apropos (current_namespace (), "^newvar$", 0xFF); Also you might consider using __get_reference: if (NULL != __get_reference ("newvar")) { % newvar is defined . . } Thanks, --John From alan.szlosek at gmail.com Tue Mar 14 09:23:16 2006 From: alan.szlosek at gmail.com (Alan Szlosek) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] slcurses Message-ID: <753f6a4a0603140623k684846edm1aecec866cf4936d@mail.gmail.com> After installing s-lang I noticed an slcurses.h file in my include folder. It looks like the intention was to implement an s-lang version of the nCurses interface (functions, defines, etc). I tried linking -lslang and using the function in slcurses.h but had no luck. Is this still a work in progress? I'm interested because it's always nice to have alternatives. Are there any other viable alternatives to nCurses that you are aware of? -- Alan Szlosek (http://www.greaterscope.net) From davis at space.mit.edu Tue Mar 14 12:12:20 2006 From: davis at space.mit.edu (John E. Davis) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] slcurses In-Reply-To: <753f6a4a0603140623k684846edm1aecec866cf4936d@mail.gmail.com> References: <753f6a4a0603140623k684846edm1aecec866cf4936d@mail.gmail.com> Message-ID: <200603141712.k2EHCKrW023394@aluche.mit.edu> Alan Szlosek wrote: >After installing s-lang I noticed an slcurses.h file in my include >folder. It looks like the intention was to implement an s-lang version >of the nCurses interface (functions, defines, etc). I tried linking >-lslang and using the function in slcurses.h but had no luck. The reason slcurses.h and slcurses.c exist is that it allowed me to use a number of curses-based test programs during the development of the SLsmg routines. It is not fully compatible with curses and as such, I do not recommend the use of slcurses. Stick with the SLsmg routines. >Is this still a work in progress? No, but it is still maintained. >I'm interested because it's always nice to have alternatives. Are >there any other viable alternatives to nCurses that you are aware of? curses? pdcurses? --John From ben at versaccounting.com Tue Mar 14 17:12:37 2006 From: ben at versaccounting.com (Ben Duncan) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] slcurses In-Reply-To: <753f6a4a0603140623k684846edm1aecec866cf4936d@mail.gmail.com> References: <753f6a4a0603140623k684846edm1aecec866cf4936d@mail.gmail.com> Message-ID: <44173FD5.6030002@versaccounting.com> What exactly are you looking at to do ? I have developed a System using Slang and C routines to give full Stack Based menuing, Window Boxes, Pop-up's, Quick Functions, callback and a host of other goodies. It is to be used to develop "Business" applications in S-Lang. It is on hold, while I develop a B+-Tree based database engine native for S-lang. Any of the above sound like what you need ? Alan Szlosek wrote: > After installing s-lang I noticed an slcurses.h file in my include > folder. It looks like the intention was to implement an s-lang version > of the nCurses interface (functions, defines, etc). I tried linking > -lslang and using the function in slcurses.h but had no luck. > > Is this still a work in progress? > > I'm interested because it's always nice to have alternatives. Are > there any other viable alternatives to nCurses that you are aware of? > > -- > Alan Szlosek > (http://www.greaterscope.net) > > _______________________________________________ > To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html > -- Ben Duncan - Business Network Solutions, Inc. 336 Elton Road Jackson MS, 39212 "Never attribute to malice, that which can be adequately explained by stupidity" - Hanlon's Razor From joerg at alea.gnuu.de Tue Mar 28 11:15:23 2006 From: joerg at alea.gnuu.de (Joerg Sommer) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] ++ with stack values Message-ID: Hi, slsh> 0; ++(); message(string()); 0 slsh> Is the pre- or post-increment/decrement operator usable with values on the stack? If not, the above code should raise an exception. Bye, J?rg. -- Es gibt nichts sch?neres als dem Schweigen eines Dummkopfes zuzuh?ren. (Helmut Quatlinger) From ben at versaccounting.com Fri Mar 31 11:53:37 2006 From: ben at versaccounting.com (Ben Duncan) Date: Tue Jan 30 08:52:10 2007 Subject: [slang-users] String HASH function Message-ID: <442D5E91.60100@versaccounting.com> I have decided my SLAGS's MVISAM will have the B+tree key's stored as 64 BIT hash function keys. The data will still be regular data it's just the B+TREE node key info will be some sort of a hashed value. Now, I need something that will produce fairly linear results. i.e.: Apples Apples and oranges Apple Suauce Another Long Line of Description ... .... and so on and so .. will produce results that can be used as so when you start using a secondary key, the results will be in alphabetical order. Any suggestions and or pointers on this one? Thanks ... -- Ben Duncan - Business Network Solutions, Inc. 336 Elton Road Jackson MS, 39212 "Never attribute to malice, that which can be adequately explained by stupidity" - Hanlon's Razor