#lisp - Tue 20 Feb 2007 between 02:00 and 00:17

NY Lost Funds



vagifwow itworked!!!
i did set textsize 10000; select bla bla
and it worked
i think that big number is actually potential size of the text field reported by mssql
if i set it up smaller it just works fine
thx slyrus_
but there's another porbolem now with those text fields
starseekerQuestion - I want to create a macro that takes a string as an input and generates a series of defconstant statements, defining each one as a particular character in the string. Is there some way I can use dotimes to do this inside the macro?
(my first naive attempt: (defmacro generate-constants ((string))
(dotimes (i (length string))
`(defconstant char-number-,i (char-code ,(char string i)))))
luisstarseeker: that's not right :)
starseekerI noticed ;-)
luisstarseeker: hey, want to try the google docs shared editing thingie?
starseekerwhere's that?
coffee-mugnight everyone
thanks for the help
luisstarseeker: I've been meaning to try that out. We could do that, and help you with your macrology skills at the same time! :D
starseekercool
slyrus_luis: so what's the link so we can heckle?
bdowningstarseeker: You can only generate one form with a macro, but PROGN is guaranteed to carry top-levelness through to it's forms if it itself is at the toplevel. So make your macro generate (progn (defconstant ...) (defconstant ...) ...).
gah its
luisslyrus_: it sucks
slyrus_: it's not realtime
slyrus_bdowning: I never knew that about progn. I guess it makes sense though.
starseekeryeah, you need to keep refreshing
luisstarseeker: ok, so here's a methodology (hah) for writing macros.
bdowningslyrus_: See clhs 3.2.3.1 for the gory details.
luisstarseeker: first, you write out how you want to call the macro
slyrus_bdowning: how 'bout I take your word for it? :)
starseeker(generate-constants "<<")
bdowningYou're no fun. :p
luisstarseeker: ok, then you write what you want the macro to output
starseeker: keeping in mind that it must be one form only
starseekerWell, I want two forms - two defconstants, one for each char in the string
luisstarseeker: ok, but it must be only one form, that's how macros work
starseeker: can you think of a way to put to defconstants in one form? bdowning already told you how.
s/put to/put two?/
starseekerYes, but the incoming string may be of arbitrary length
hang on, I'm having an idea...

Page: 2 9 16 23 30 

IrcArchive

NY Lost Funds