From ben at versaccounting.com Mon Jan 1 19:43:10 2007 From: ben at versaccounting.com (Ben Duncan) Date: Tue Jan 30 08:52:12 2007 Subject: [slang-users] Color Settings .. Message-ID: <4599AA9E.5060309@versaccounting.com> Happy New year all ... I was wondering if S-Lang supports 256 Color combo of which the xterm program can now support as well as the Frame Buffer console settings. If not, what would be be required to make it so? 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 From joerg at alea.gnuu.de Tue Jan 2 19:53:24 2007 From: joerg at alea.gnuu.de (=?UTF-8?Q?J=C3=B6rg?= Sommer) Date: Tue Jan 30 08:52:12 2007 Subject: [slang-users] how to get a character of a string? Message-ID: Hi, how can I get the first character of a string? Think of UTF-8! if (substr("hello", 1, 1) == 'h') Bye, J?rg. -- Optimisten haben gar keine Ahnung von den freudigen ?berraschungen, die Pessimisten erleben. (Peter Bramm) From joerg at alea.gnuu.de Fri Jan 5 19:52:43 2007 From: joerg at alea.gnuu.de (=?UTF-8?Q?J=C3=B6rg?= Sommer) Date: Tue Jan 30 08:52:12 2007 Subject: [slang-users] wrong predeclaration makes function unaccessable Message-ID: Hi, is this an expected behaviour? #v+ implements("gaga"); static define foo(); % wrong behaviour % private define foo(); % correct behaviour static define bla() { foo(); } private define foo() { message("hello"); } bla(); #v- % slsh /tmp/slbug.sl % slsh --version slsh version 0.7.5-0 S-Lang Library Version: 2.0.6 I expect an hello. Bye, J?rg. -- Da w?rde ich auch lieber den Panzerf?hrerschein machen als den MCSE. Bringt mehr, d?rfte das gleiche kosten und macht sicher mehr Spa?. Jens Dittmar in de.comp.security From davis at space.mit.edu Mon Jan 8 06:54:32 2007 From: davis at space.mit.edu (John E. Davis) Date: Tue Jan 30 08:52:12 2007 Subject: [slang-users] wrong predeclaration makes function unaccessable In-Reply-To: References: Message-ID: <200701081154.l08BsWau011984@aluche.mit.edu> =?UTF-8?Q?J=C3=B6rg?= Sommer wrote: >is this an expected behaviour? Yes. > >#v+ >implements("gaga"); > >static define foo(); % wrong behaviour >% private define foo(); % correct behaviour > >static define bla() >{ > foo(); >} When "bla" gets compiled, the only version of "foo" that is available is the one that exists in the static namespace. Hence it is the one that gets linked to "bla". And because the body of the function does not exist, the function will do nothing when called. --John From davis at space.mit.edu Mon Jan 8 07:36:41 2007 From: davis at space.mit.edu (John E. Davis) Date: Tue Jan 30 08:52:12 2007 Subject: [slang-users] how to get a character of a string? In-Reply-To: References: Message-ID: <200701081236.l08CafZT012891@aluche.mit.edu> =?UTF-8?Q?J=C3=B6rg?= Sommer wrote: >how can I get the first character of a string? Think of UTF-8! Unfortunately there is currently no intrinsic function that returns this information--- I will add one to the next release. However it is possible to create such a function for slang 2.0.7 (see below). >if (substr("hello", 1, 1) == 'h') Instead of the above, I suggest you use if (substr("\u{1234}hello", 1, 1) == "\u{1234}") ... to compare strings instead of characters. Here is the ugly hack that returns a character (slang 2.0.7 or greater): define nth_wchar (str, n) { foreach (substr(str, n, 1)) using ("chars"); } if (nth_wchar ("hello", 1) == 'h') .... Thanks, --John From ben at versaccounting.com Tue Jan 9 09:13:58 2007 From: ben at versaccounting.com (Ben Duncan) Date: Tue Jan 30 08:52:12 2007 Subject: [slang-users] Color Settings .. In-Reply-To: <4599AA9E.5060309@versaccounting.com> References: <4599AA9E.5060309@versaccounting.com> Message-ID: <45A3A326.2040303@versaccounting.com> John, any information on 256 COlor settings ? Ben Duncan wrote: > Happy New year all ... > > I was wondering if S-Lang supports 256 Color combo of which > the xterm program can now support as well as the Frame Buffer > console settings. > > If not, what would be be required to make it so? > > 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 From joerg at alea.gnuu.de Tue Jan 9 17:50:46 2007 From: joerg at alea.gnuu.de (=?UTF-8?Q?J=C3=B6rg?= Sommer) Date: Tue Jan 30 08:52:12 2007 Subject: [slang-users] wrong predeclaration makes function unaccessable References: <200701081154.l08BsWau011984@aluche.mit.edu> Message-ID: Hallo John, "John E. Davis" wrote: > =?UTF-8?Q?J=C3=B6rg?= Sommer wrote: >> >>#v+ >>implements("gaga"); >> >>static define foo(); % wrong behaviour >>% private define foo(); % correct behaviour >> >>static define bla() >>{ >> foo(); >>} > > When "bla" gets compiled, the only version of "foo" that is available > is the one that exists in the static namespace. Hence it is the one > that gets linked to "bla". And because the body of the function does > not exist, the function will do nothing when called. When you say the static function has an empty body this should be equivalent to the definition above: static define foo() {} But this gives an error. I think, SLang should complain about the previous definition of foo() with a different modifier as it does if the functions have bodies. Bye, J?rg. -- Der Mensch hat die Atombombe erfunden. Keine Maus der Welt k?me auf die Idee, eine Mausefalle zu konstruieren. From davis at space.mit.edu Thu Jan 11 09:27:12 2007 From: davis at space.mit.edu (John E. Davis) Date: Tue Jan 30 08:52:13 2007 Subject: [slang-users] Color Settings .. In-Reply-To: <4599AA9E.5060309@versaccounting.com> References: <4599AA9E.5060309@versaccounting.com> Message-ID: <200701111427.l0BERCkm011223@aluche.mit.edu> Ben Duncan wrote: >I was wondering if S-Lang supports 256 Color combo of which >the xterm program can now support as well as the Frame Buffer >console settings. 256 colors are supported provided the terminal's terminfo file contains the proper value for the "colors" attribute, which specifies the maximum number of colors supported by the terminal. The slang SLtt layer knows nothing about frame buffers on Unix. It simply sends the escape sequences defined by the terminfo file to the terminal. I hope this helps. --John From mnoble at space.mit.edu Tue Jan 16 21:35:32 2007 From: mnoble at space.mit.edu (Michael Noble) Date: Tue Jan 30 08:52:13 2007 Subject: [slang-users] slgtk 0.5.17 and slirp 1.9.1 Message-ID: <20070117023532.GA8602@svoboda.mit.edu> Version 0.5.17 of SLgtk and version 1.9.1 of SLIRP are now available at http://space.mit.edu/CXC/software/slang/modules/slgtk http://space.mit.edu/CXC/software/slang/modules/slirp As described below, both are minor releases consisting mainly of bugfixes. New SLgtk binaries (Slang2 only) were also made available for i686, os/x, and solaris8. Cheerio, -Mike ------------------------------------------------------------ Changes in Version SLgtk 0.5.17: 1. VWhere 1.3.4: . Assign a name to eval() namespace if it's unnamed, to help mininize mangling of struct field names (e.g. time --> __time) . Discontinue propagating existing vectors to new namespaces & warn that only experts should attempting changing namespaces 2. First release bundled with SLIRP 1.9 release series (1.9.1 required) 3. Use of SLIRP bundled with SLgtk is now optional; the --with-slirp configure switch may be used to specify an alternative 4. slgtk-demo warns when widgets are not NULLed by gtk_widget_destroy() 5. Version information changes: . _slgtk_version, _slgtk_version_string renamed to _gtk_module_version and _gtk_module_version_string . Eliminated redundant _slgtk_[major|minor|micro]_version variables 6. Altered how binary distribution configure script ascertains the slang version from slsh (for S-Lang 2.0.7 compatibility). Changes in SLIRP v1.9.1 1. Internal mods to vectorization code in support of OpenMP parallelization; will be activated in next release. 2. Fixed problem in Makefiles generated from: slirp -make ... /dev/null 3. Fixed edge case where zero-element array could potentially cause vectorization code to generate an exception or loop forever.