esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vassil Dichev <vdic...@apache.org>
Subject Re: Move to latest Lift release for 1.2
Date Tue, 14 Dec 2010 00:18:09 GMT
You're right, the value was appended before, but I used the
opportunity to improve it now.

I've done this same mistake before, that's why I was quick to notice
it. It takes a while for someone accustomed to an imperative language
to learn that these operators are not setters but just produce a new
data structure.

Vassil


On Tue, Dec 14, 2010 at 12:49 AM, Vladimir Ivanov <lester.mail@gmail.com> wrote:
> Does it mean that ordering of poolId elements in list is not important? Elem
> was appended to list before and it is prepended to list now.
>
> I was sure that += 'operator' adds elem to the end of List, so I decided
> that appending was required for some reason.
>
> 2010/12/14 Vassil Dichev <vdichev@apache.org>
>
>> Hey all,
>>
>> API2 has actually nothing to do with it, when you add a pool messages
>> sent to that pool will disappear, never to be seen. The pool actually
>> appears functional after restart.
>>
>> The problem is in the modifications needed to make ESME compile. When
>> adding to a list, we changed the "+=" operator with ":+". It does
>> create a new list with an element appended, but doesn't update the
>> initial list variable. In order to do that, you can use ":+=" or just
>> list = list :+ elem
>>
>> This operator doesn't prepend though, it appends, which has horrific
>> performance parameters for lists. These lists are expected to be
>> fairly small, but nevertheless, let's not get into bad habits. Here
>> it's better to use the "+:" operator, which will turn into "+:=" if we
>> want to update the initial reference. An even better choice would be
>> to use the "::" operator, which is specific to lists and is the best
>> option if we know it's lists we're dealing with, not some generic
>> collection. So the final operator I've committed is "::="
>>
>> Hopefully this operator mumbo-jumbo wasn't too long and boring :)
>>
>> Vassil
>>
>>
>> On Mon, Dec 13, 2010 at 8:37 AM, Ethan Jewett <esjewett@gmail.com> wrote:
>> > Ah, excellent, thanks for checking the API2 issue. I guess it's time
>> > to dig into that code again...
>> >
>> > Ethan
>> >
>> > On Monday, December 13, 2010, Vassil Dichev <vdichev@apache.org> wrote:
>> >> I fixed the parsing error- a change in the API caused an implicit
>> >> conversion not to trigger and the string for the hashtag was not what
>> >> was expected.
>> >>
>> >> The API2 problem is not a failure of the test- messages in a pool
>> >> don't show in the timeline, will need more investigation to find out
>> >> why.
>> >>
>> >> Vassil
>> >>
>> >>
>> >> On Sun, Dec 12, 2010 at 8:50 PM, Ethan Jewett <esjewett@gmail.com>
>> wrote:
>> >>> I think deploying to stax should be fine. I didn't test much
>> >>> functionality in the lift-2.2 branch, but I didn't see anything
>> >>> broken. Deploying on Stax would make it easier to manually test,
>> >>> especially since we do some real-world usage on there.
>> >>>
>> >>> Ethan
>> >>>
>> >>> On Sun, Dec 12, 2010 at 6:44 PM, Richard Hirsch <hirsch.dick@gmail.com>
>> wrote:
>> >>>> Should I do a test deployment tomorrow on stax? Or should I wait
until
>> >>>> to test errors are corrected. I could deploy the 2.2 branch on the
>> >>>> second stax instance for a first test.
>> >>>>
>> >>>> D,
>> >>>>
>> >>>> On Sun, Dec 12, 2010 at 12:36 PM, Ethan Jewett <esjewett@gmail.com>
>> wrote:
>> >>>>> Ok, this is applied and everything seems to be running on my
machine
>> >>>>> as well. As you mentioned, there are some tests failing, so
we'll
>> need
>> >>>>> to get those resolved before merging back into trunk. I don't
think
>> >>>>> I'll have much time to look at them today. I suspect that at
least
>> the
>> >>>>> API2 issues are timing-related - some of the tests have race
>> >>>>> conditions in them where they sit around for 2 or 3 seconds
waiting
>> >>>>> for a message to post, and it's possible that Lift 2.2 handles
things
>> >>>>> a bit differently causing the wait to end before the post completes.
>> >>>>> Vassil has a nice way of doing tests without explicit wait times
in
>> >>>>> the Twitter API tests, but we haven't gotten around to copying
it
>> over
>> >>>>> to the API2 tests.
>> >>>>>
>> >>>>> I've also pulled the latest changes from trunk into the branch,
so
>> >>>>> that should pick up the fix to the user.html file, as well as
the
>> >>>>> changes to the user.html timeline I made yesterday. These changes
are
>> >>>>> not well formated or well-tested but they seems to work.
>> >>>>>
>> >>>>> Cheers,
>> >>>>> Ethan
>> >>>>>
>> >>>>> On Sun, Dec 12, 2010 at 11:58 AM, Ethan Jewett <esjewett@gmail.com>
>> wrote:
>> >>>>>> Hi Vladimir,
>> >>>>>>
>> >>>>>> That is from my commit yesterday :-( Not sure how it snuck
in there,
>> >>>>>> but I'm fixing it now. I'll take a quick look at your pom.xml
patch
>> >>>>>> for the logger dependency and get that applied as well.
>> >>>>>>
>> >>>>>> Ethan
>> >>>>>>
>> >>>>>> On Sun, Dec 12, 2010 at 9:10 AM, Vladimir Ivanov <
>> lester.mail@gmail.com> wrote:
>> >>>>>>> Hello, Vassil!
>> >>>>>>>
>> >>>>>>> You are right. I just wondered why it was placed to
license
>> section.
>> >>>>>>>
>> >>>>>>> 2010/12/12 Vassil Dichev <vdichev@apache.org>
>> >>>>>>>
>> >>>>>>>> Sorry I'm late to the party, but thanks Vladimir
for your efforts!
>> >>>>>>>>
>> >>>>>>>> Normally the parser would be right, this is not
valid XML:
>> >>>>>>>>
>> >>>>>>>> <img <user:image/> alt="" width="50px"/>
>> >>>>>>>>
>> >>>>>>>> ...unless it's in a comment. Maybe something has
changed in the
>> >>>>>>>> parser, but if you just delete this line, you should
be fine.
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> On Sun, Dec 12, 2010 at 3:06 AM, Vladimir Ivanov
<
>> lester.mail@gmail.com>
>> >>>>>>>> wrote:
>> >>>>>>>> > But now I discovered error while trying to
see user's profile:
>> >>>>>>>> >
>> >>>>>>>> > Error locating template /info_view/user.html.
Message: :1:6: '>'
>> expected
>> >>>>>>>> > instead of '<'
>> >>>>>>>> > scala.xml.dtd.ValidationException: :1:6: '>'
expected instead of
>> '<'
>> >>>>>>>> >
>> >>>>>>>>
>> net.liftweb.util.PCDataXmlParser.reportSyntaxError(PCDataMarkupParser.scala:175)
>> >>>>>>>> >
>> >>>>>--
>> >> Twitter: http://twitter.com/vdichev
>> >> Blog: http://speaking-my-language.blogspot.com
>> >>
>> >
>>
>>
>>
>> --
>> Twitter: http://twitter.com/vdichev
>> Blog: http://speaking-my-language.blogspot.com
>>
>
>
>
> --
> Best Regards,
> Vladimir Ivanov
>



-- 
Twitter: http://twitter.com/vdichev
Blog: http://speaking-my-language.blogspot.com

Mime
View raw message