Search found 11 matches

by smcnamara
Wed Feb 20, 2013 9:08 am
Forum: Common Lisp
Topic: SBCL sockets
Replies: 6
Views: 13771

Re: SBCL sockets

Here's a bit of code I've written to run a socket listener with dispatch to worker threads in sbcl. I think it's pretty clear, but I can explain any part that doesn't make sense in more detail if that helps. I'm not sure what is going on with the sockets stuck in CLOSE, but it could simply be a fail...
by smcnamara
Sat Feb 25, 2012 7:20 pm
Forum: User Groups and Conferences
Topic: User Group in Chicago
Replies: 4
Views: 16469

Re: User Group in Chicago

I'm not aware of any current pigs, but would be game for meeting. I'm downtown.
by smcnamara
Sat Feb 25, 2012 5:57 pm
Forum: The Lounge
Topic: Grammar for message parsing?
Replies: 3
Views: 5751

Re: Grammar for message parsing?

So if I'm understanding you correctly, it's perfectly acceptable to have a numeric literal on the right side, yes? There is never a string like "LOGON" passed. Instead, I will get a ascii-numeric 1 at the start, so in EBNF I could have: logon_msg = 1, integer, integer error_msg = 2, string, integer,...
by smcnamara
Sat Feb 25, 2012 4:18 pm
Forum: The Lounge
Topic: Grammar for message parsing?
Replies: 3
Views: 5751

Grammar for message parsing?

I'm struggling with a pet-project, and am not sure I'm thinking clearly anymore so am looking for some feedback to hopefully get me back on course. Perhaps by writing this out it will become clearer for me, and if not (or in addition), hopefully some of you will be able to shine a light on things. I...
by smcnamara
Thu Aug 11, 2011 8:31 pm
Forum: Common Lisp
Topic: Type conversion in accessors?
Replies: 1
Views: 1254

Type conversion in accessors?

I'm struggling a little bit with figuring out what the lispy way to handle a problem with accessor type-conversion, and am hoping someone can point me in the right direction. I'm parsing a stream of delimited strings. The protocol specifies that the first string is an integer value indicating the ty...
by smcnamara
Fri Dec 31, 2010 10:42 am
Forum: Common Lisp
Topic: I think I found an SBCL bug, would somebody run this for me?
Replies: 3
Views: 1581

Re: I think I found an SBCL bug, would somebody run this for me?

SBCL 1.0.38 on Ubuntu-64bit UNSIGNED32 Copy... BADDBEEF BADDBEEF BADDBEEF BADDBEEF BADDBEEF BADDBEEF BADDBEEF BADDBEEF UNSIGNED32 Fill... BADDBEEF 00000000 BADDBEEF 00000000 BADDBEEF 00000000 BADDBEEF 00000000 UNSIGNED8 Copy... ADADADAD ADADADAD ADADADAD ADADADAD ADADADAD ADADADAD ADADADAD ADADADAD ...
by smcnamara
Tue Jul 27, 2010 11:25 am
Forum: Common Lisp
Topic: Q: Calling macro inside LOOP with list parameter.
Replies: 7
Views: 2269

Re: Q: Calling macro inside LOOP with list parameter.

Ok, I follow. That probably doesn't make sense in this situation since I really do have all the information regarding message definition at compile time.

Thanks again.
by smcnamara
Tue Jul 27, 2010 9:30 am
Forum: Common Lisp
Topic: Q: Calling macro inside LOOP with list parameter.
Replies: 7
Views: 2269

Re: Q: Calling macro inside LOOP with list parameter.

One more quick question:
Ramarren wrote:... using a data-driven approach with closures might be better...
Could you give me a brief explanation of what you mean by this?

Thanks again!
by smcnamara
Tue Jul 27, 2010 9:27 am
Forum: Common Lisp
Topic: Q: Calling macro inside LOOP with list parameter.
Replies: 7
Views: 2269

Re: Q: Calling macro inside LOOP with list parameter.

Ahhhh. I think the light just went on.
Ramarren wrote:You can expand a macro inside the loop if its expansion depends only on information available during compile time.
This is exactly where I had some general fuzzy thinking (and not in the nice AI sense) going on. Thank you very much!
by smcnamara
Tue Jul 27, 2010 8:45 am
Forum: Common Lisp
Topic: Q: Calling macro inside LOOP with list parameter.
Replies: 7
Views: 2269

Re: Q: Calling macro inside LOOP with list parameter.

Thank you Ramarren. My actual code is creating a set of classes to handle streaming network messages, which is an idea I picked up from Rainer Joswig's video on DSL creation . Is there a way to tweak the macro so that it can be successfully invoked inside a loop? It seems like this should be possibl...