473,699 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OMG Lightweight Log

Has anyone implemented the OMG lightweight log spec into a c++
application?
#! rnews 1946
Xref: xyzzy comp.lang.lisp: 150483
Newsgroups: comp.lang.lisp
Path: xyzzy!nntp
From: Jeffrey Cunningham <je************ ******@boeing.c om>
Subject: PCL question about using &rest and &key parameters together
X-Nntp-Posting-Host: medea.sea.boein g.com
Content-Type: text/plain; charset=ISO-8859-1
Message-ID: <pa************ *************** *@boeing.com>
User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Sender: nn**@news.boein g.com (Boeing NNTP News Access)
Content-Transfer-Encoding: 8bit
Organization: The Boeing Company
Mime-Version: 1.0
Date: Tue, 17 May 2005 18:19:25 GMT

I was reading in Seibel's PCL the following:

You can safely combine &rest and &key parameters, but the behavior may be
a bit surprising initially. Normally the presence of either &rest or &key
in a parameter list causes all the values remaining after the required and
&optional parameters have been filled in to be processed in a particular
way--either gathered into a list for a &rest parameter or assigned to the
appropriate &key parameters based on the keywords. If both &rest and &key
appear in a parameter list, then both things happen--all the remaining
values, which include the keywords themselves, are gathered into a list
that's bound to the &rest parameter, and the appropriate values are also
bound to the &key parameters.

So I tried the following:

(defun foo (a &rest rest &key b c)
(list a rest b c))

(foo 1 2 :b 3 :c 4)

When I run it from slime, it bombs with the following error message:

Function called with odd number of keyword arguments.
[Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]

Restarts:
0: [ABORT] Abort handling SLIME request. 1: [ABORT] Return to Top-Level.

Backtrace:
0: (C::%ODD-KEYWORD-ARGUMENTS-ERROR)
1: (NIL 1 (2 :B 3 :C 4) 5)[:OPTIONAL] 2: (SWANK::EVAL-REGION "(foo 1 2
:b 3 :c 4)

Any idea why this doesn't work as expected? I'm using CMUCL.

Thanks
--jeff cunningham
Jul 23 '05 #1
0 1589

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1801
by: Jeremy Hylton | last post by:
Lightweight Languages 2004 (LL4) http://ll4.csail.mit.edu/ Dec. 4, 2004 MIT, Cambridge MA Call for Presentations LL4 will be an intense, exciting, one-day forum bringing together the best programming language implementors and researchers, from both academia and industry, to exchange ideas and information, to challenge
2
2444
by: build | last post by:
G'day all, I want to load comma sep text files and display it in a grid. I'd like something simple and lightweight. Don't need to edit it in grid, I could do that in textboxes if required. tia build
1
1969
by: Guinness Mann | last post by:
Greetings, I'm working in VS2003.NET using C#. I need to download a few rows from an SQL Server database table and then be able to page back and forth through them. I don't need to make any changes nor post any updates. In the past I've downloaded the rows using a datareader, copied the fields for each row into a structure and then added the structure to an
3
1536
by: Ramza Brown | last post by:
I am sorry if I think like this, but sometimes(keyword sometimes) I like distributing my interpreters. Anyway, I found the absolute minimum libraries needed for Python to work with Win32. And, I included FLTK for the GUI toolkit. Sorry, but wxPython didn't fit my <30MB requirement. You can basically download it and find out what libraries are needed. Some of the core included string.py, stat.py, for example.
0
2637
by: Andrew Fedoniouk | last post by:
Announce: Lightweight HTML forms layout manager and browser component. http://HtmLayout.com Latest version of HtmLayoutSDK contains sources of wrapper for .NET (C#) Andrew Fedoniouk. http://terra-informatica.org
2
1650
by: MS News | last post by:
Hello When I spawn a lightweight process on a new Thread and return immediately to the Client what happens if the lightweight process takes an hour to finish? Under what context is the process running Is it running under the current Session. How do I insure that It will run until it is completed Please point me to an artical
2
14728
by: Martin Halle | last post by:
Dear all, I'm using XML in a project. This is a very simple and small file that follows an even simpler XSD schema. I've found a lightweight library (TinyXML) to read and access the contents of the XML file in C++. Now I'm looking for something similar to validate a given XML file agains a XSD schema. This library should: - be lightweight (!) - thus not depend on xerces, MSXML and similar - cross-platform (g++) compatible - can use STL...
11
2371
by: garyusenet | last post by:
I have 'cli via c# on order', and in the mean time am reading 'Pro C# 2005 and the .NET platform' (Andrew Troelson). I'm just reading about the 'five types defined in the CTS'. Specifically Struct. Now Troelson described the struct type as 'a lightweight class type having value based semantics'. Looking at his example I cant see any difference from a class here other than it is defined with the struct keyword? what is the difference...
2
1639
by: metaperl | last post by:
I find it arduous to type dictionary and also feel that any data I create for a program deserves to have its operations tied to it. As a result, I often create lots of lightweight classes. Here's a small example: vlc = '/Applications/VLC.app/Contents/MacOS/VLC' class song(object): def __init__(self, title, url):
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.