From laurent.laffont at gmail.com Tue May 4 20:40:09 2010 From: laurent.laffont at gmail.com (laurent laffont) Date: Tue, 4 May 2010 20:40:09 +0200 Subject: [sbe-discussion] Regex chapter Message-ID: Hi, the draft chapter on Regular expressions from pharobyexample.org doesn't mention RxMatcher>>subexpressions: (with the 's') I spent a lot of time trying to extract 'Name:', 'Age:', 'Phone:' from 'findByName:Age:Phone:' until I found this method. regex := 'findBy(\w+\:)+' asRegex. regex search: 'findByName:Age:Phone:'. regex subexpressionCount. => 2 regex subexpression: 1. => 'findByName:Age:Phone:' regex subexpression: 2. => 'Phone:' regex subexpressions: 1. => #('findByName:Age:Phone:') regex subexpressions: 2 => #('Name:' 'Age:' 'Phone:') Or maybe there's a better way to achieve this ? Anyway, good chapter. Cheers, Laurent Laffont -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianopeck at gmail.com Sat May 8 17:42:17 2010 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Sat, 8 May 2010 17:42:17 +0200 Subject: [sbe-discussion] Color highlighting Message-ID: Hi everybody. I am writing a chapter for PBE2 and also translating to Spanish one chapter from PBE1. To write code, I do something like this: \begin{code}{} ConfigurationOfCoolBrowser>>version01: spec spec for: #common do: [ spec repository: 'http://www.example.com/CoolBrowser'. spec package: 'CoolBrowser-Core' with: 'CoolBrowser-Core-MichaelJones.10'; package: 'CoolBrowser-Tests' with: 'CoolBrowser-Tests-JohnLewis.3' ]. \end{code} But that doesn't have Smalltalk color highlighting. My knowledge about Latex is very very limited. I wonder if someone already did a version of this that supports it. It would be cool to have color highlighting for PBE2. Cheers Mariano -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.pollet at inria.fr Sat May 8 17:57:26 2010 From: damien.pollet at inria.fr (Damien Pollet) Date: Sat, 8 May 2010 17:57:26 +0200 Subject: [sbe-discussion] Re: Color highlighting In-Reply-To: References: Message-ID: <8543511D-8058-452C-9330-9006D7704547@inria.fr> On May 8, 2010, at 17:42, Mariano Martinez Peck wrote: > Hi everybody. I am writing a chapter for PBE2 and also translating to Spanish one chapter from PBE1. > To write code, I do something like this: > > \begin{code}{} > ConfigurationOfCoolBrowser>>version01: spec > > > spec for: #common do: [ > spec repository: 'http://www.example.com/CoolBrowser'. > spec > package: 'CoolBrowser-Core' with: 'CoolBrowser-Core-MichaelJones.10'; > package: 'CoolBrowser-Tests' with: 'CoolBrowser-Tests-JohnLewis.3' ]. > \end{code} > > > But that doesn't have Smalltalk color highlighting. My knowledge about Latex is very very limited. I wonder if someone already did a version of this that supports it. It would be cool to have color highlighting for PBE2. I'd keep simple plain font. Too many different text styles are disturbing on paper. And if you compare with other computer science books, they rarely highlight code at all. listings.sty can do color highlighting but this would be counter-productive for the paper version (the text will become LESS readable, unless it gets printed in color). We could use bold instead of colors, but then Smalltalk does not have a well-defined set of keywords, so what would you highlight? -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet From stephane.ducasse at free.fr Sat May 8 21:40:20 2010 From: stephane.ducasse at free.fr (stephane ducasse) Date: Sat, 8 May 2010 21:40:20 +0200 Subject: [sbe-discussion] Re: Color highlighting In-Reply-To: References: Message-ID: <0EEA796C-6D81-42CA-B934-987846BE91E4@free.fr> do not bother about that. Write the text think about Css Stef On May 8, 2010, at 5:42 PM, Mariano Martinez Peck wrote: > Hi everybody. I am writing a chapter for PBE2 and also translating to Spanish one chapter from PBE1. > To write code, I do something like this: > > \begin{code}{} > ConfigurationOfCoolBrowser>>version01: spec > > > spec for: #common do: [ > spec repository: 'http://www.example.com/CoolBrowser'. > spec > package: 'CoolBrowser-Core' with: 'CoolBrowser-Core-MichaelJones.10'; > package: 'CoolBrowser-Tests' with: 'CoolBrowser-Tests-JohnLewis.3' ]. > \end{code} > > > But that doesn't have Smalltalk color highlighting. My knowledge about Latex is very very limited. I wonder if someone already did a version of this that supports it. It would be cool to have color highlighting for PBE2. > > Cheers > > Mariano > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From marianopeck at gmail.com Thu May 13 23:26:47 2010 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu, 13 May 2010 23:26:47 +0200 Subject: [sbe-discussion] Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Andrei Stebakov Date: 2010/5/13 Subject: [Pharo-project] Pharo by example book: copying/pasting code snippets To: pharo-project at lists.gforge.inria.fr When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects): For example the line from the book: (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. I have to change to (with "short" minus sign) (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. Otherwise the method doesn't get accepted. I wonder if this is a PDF issue and if it could be corrected? Thank you, Andrew _______________________________________________ Pharo-project mailing list Pharo-project at lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -------------- next part -------------- An HTML attachment was scrubbed... URL: From damien.pollet at inria.fr Fri May 14 01:19:56 2010 From: damien.pollet at inria.fr (Damien Pollet) Date: Fri, 14 May 2010 01:19:56 +0200 Subject: [sbe-discussion] Re: Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: References: Message-ID: <561BAD4E-57C8-4C7D-97EE-8A542FF5BF63@inria.fr> On May 13, 2010, at 23:26, Mariano Martinez Peck wrote: > When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects): > > For example the line from the book: > (j > 1) ifTrue: [ (cells at: i at: j ? 1) toggleState]. > I have to change to (with "short" minus sign) > (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. > Otherwise the method doesn't get accepted. > I wonder if this is a PDF issue and if it could be corrected? IIRC that's because listings.sty replaces simple minus dashes with longer ones, because the code is in Helvetica, whose minus sign looks quite short. I don't know if we can have both copy-pasteable and visually customized code ... -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet From marianopeck at gmail.com Fri May 14 01:23:04 2010 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri, 14 May 2010 01:23:04 +0200 Subject: [sbe-discussion] Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: <4BEC81EC.7030307@fang.demon.co.uk> References: <4BEC81EC.7030307@fang.demon.co.uk> Message-ID: ---------- Forwarded message ---------- From: Douglas Brebner Date: Fri, May 14, 2010 at 12:49 AM Subject: Re: [Pharo-project] Pharo by example book: copying/pasting code snippets To: Pharo-project at lists.gforge.inria.fr On 13/05/2010 22:13, Andrei Stebakov wrote: > When I copy and paste code snippets from the book, the compiler complains > about the minus signs (which is different character from what Pharo > expects): > > For example the line from the book: > (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. > I have to change to (with "short" minus sign) > (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. > Otherwise the method doesn't get accepted. > I wonder if this is a PDF issue and if it could be corrected? > > Looks like the pdf is using the unicode minus character instead of the ascii dash (which Pharo uses for minus) which are not the same. I wouldn't like to argue about which is in the wrong here ;) _______________________________________________ Pharo-project mailing list Pharo-project at lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianopeck at gmail.com Fri May 14 01:23:31 2010 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri, 14 May 2010 01:23:31 +0200 Subject: [sbe-discussion] Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: <37F5ABDE-CCE5-4063-B248-ED66253D1D74@stefan-marr.de> References: <3EB7D803-E854-4C17-800F-ABACC1D9000C@inria.fr> <37F5ABDE-CCE5-4063-B248-ED66253D1D74@stefan-marr.de> Message-ID: ---------- Forwarded message ---------- From: Stefan Marr Date: Thu, May 13, 2010 at 11:35 PM Subject: Re: [Pharo-project] Pharo by example book: copying/pasting code snippets To: Pharo-project at lists.gforge.inria.fr On 13 May 2010, at 23:19, St?phane Ducasse wrote: >> >> On May 13, 2010, at 11:13 PM, Andrei Stebakov wrote: >> >>> When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects): >>> >>> For example the line from the book: >>> (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. >>> I have to change to (with "short" minus sign) >>> (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. >>> Otherwise the method doesn't get accepted. >>> I wonder if this is a PDF issue and if it could be corrected? > this is a pdf issue. In my latex documents, using a lstlisting environment, this isn't a problem... Tested on OS X. Best regards Stefan _______________________________________________ Pharo-project mailing list Pharo-project at lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.ducasse at free.fr Fri May 14 08:42:04 2010 From: stephane.ducasse at free.fr (stephane ducasse) Date: Fri, 14 May 2010 08:42:04 +0200 Subject: [sbe-discussion] Re: Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: <561BAD4E-57C8-4C7D-97EE-8A542FF5BF63@inria.fr> References: <561BAD4E-57C8-4C7D-97EE-8A542FF5BF63@inria.fr> Message-ID: <80D3FAA1-72EB-48FF-868F-D37D319CFBBA@free.fr> personally type code is the best way to learn. Stef On May 14, 2010, at 1:19 AM, Damien Pollet wrote: > On May 13, 2010, at 23:26, Mariano Martinez Peck wrote: > >> When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects): >> >> For example the line from the book: >> (j > 1) ifTrue: [ (cells at: i at: j ? 1) toggleState]. >> I have to change to (with "short" minus sign) >> (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. >> Otherwise the method doesn't get accepted. >> I wonder if this is a PDF issue and if it could be corrected? > > IIRC that's because listings.sty replaces simple minus dashes with longer ones, because the code is in Helvetica, whose minus sign looks quite short. > > I don't know if we can have both copy-pasteable and visually customized code ... > > -- > Damien Pollet > type less, do more [ | ] http://people.untyped.org/damien.pollet > > > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From oscar at iam.unibe.ch Fri May 14 09:22:09 2010 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Fri, 14 May 2010 09:22:09 +0200 Subject: [sbe-discussion] Re: Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: References: <3EB7D803-E854-4C17-800F-ABACC1D9000C@inria.fr> <37F5ABDE-CCE5-4063-B248-ED66253D1D74@stefan-marr.de> Message-ID: <4181FBB1-85E5-450F-B0F6-8C03CCD591BA@iam.unibe.ch> Looks like this bit of LaTeX is to blame. "-" is mapped to \textminus in the listings environment. - on \lstdefinelanguage{Smalltalk}{ % morekeywords={self,super,true,false,nil,thisContext}, % This is overkill morestring=[d]', morecomment=[s]{"}{"}, alsoletter={\#:}, escapechar={!}, literate= {BANG}{!}1 {CARET}{\^}1 {UNDERSCORE}{\_}1 {\\st}{Smalltalk}9 % convenience -- in case \st occurs in code % {'}{{\textquotesingle}}1 % replaced by upquote=true in \lstset {_}{{$\leftarrow$}}1 {>>>}{{\sep}}1 {^}{{$\uparrow$}}1 {~}{{$\sim$}}1 {-}{{\textminus}}1 %{-}{\hspace{-0.13em}}{-}}1 % the goal is to make - the same width as + % {+}{\sf+}1 %{\raisebox{0.08ex}{+}}}1 % and to raise + off the baseline to match - {-->}{{\quad$\longrightarrow$\quad}}3 , % Don't forget the comma at the end! tabsize=4 }[keywords,comments,strings] On May 14, 2010, at 1:23 , Mariano Martinez Peck wrote: > > > ---------- Forwarded message ---------- > From: Stefan Marr > Date: Thu, May 13, 2010 at 11:35 PM > Subject: Re: [Pharo-project] Pharo by example book: copying/pasting code snippets > To: Pharo-project at lists.gforge.inria.fr > > > > On 13 May 2010, at 23:19, St?phane Ducasse wrote: > >> > >> On May 13, 2010, at 11:13 PM, Andrei Stebakov wrote: > >> > >>> When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects): > >>> > >>> For example the line from the book: > >>> (j > 1) ifTrue: [ (cells at: i at: j ? 1) toggleState]. > >>> I have to change to (with "short" minus sign) > >>> (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. > >>> Otherwise the method doesn't get accepted. > >>> I wonder if this is a PDF issue and if it could be corrected? > > > this is a pdf issue. > In my latex documents, using a lstlisting environment, this isn't a problem... > Tested on OS X. > > Best regards > Stefan > > > > _______________________________________________ > Pharo-project mailing list > Pharo-project at lists.gforge.inria.fr > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From damien.pollet at inria.fr Fri May 14 10:01:40 2010 From: damien.pollet at inria.fr (Damien Pollet) Date: Fri, 14 May 2010 10:01:40 +0200 Subject: [sbe-discussion] Re: Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: <4181FBB1-85E5-450F-B0F6-8C03CCD591BA@iam.unibe.ch> References: <3EB7D803-E854-4C17-800F-ABACC1D9000C@inria.fr> <37F5ABDE-CCE5-4063-B248-ED66253D1D74@stefan-marr.de> <4181FBB1-85E5-450F-B0F6-8C03CCD591BA@iam.unibe.ch> Message-ID: On May 14, 2010, at 09:22, Oscar Nierstrasz wrote: > Looks like this bit of LaTeX is to blame. "-" is mapped to \textminus in the listings environment. what about \texttt{-} instead then ? it should do visually... -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet From damien.pollet at inria.fr Sun May 16 14:06:39 2010 From: damien.pollet at inria.fr (Damien Pollet) Date: Sun, 16 May 2010 14:06:39 +0200 Subject: [sbe-discussion] Re: Fwd: [Pharo-project] Pharo by example book: copying/pasting code snippets In-Reply-To: References: <3EB7D803-E854-4C17-800F-ABACC1D9000C@inria.fr> <37F5ABDE-CCE5-4063-B248-ED66253D1D74@stefan-marr.de> <4181FBB1-85E5-450F-B0F6-8C03CCD591BA@iam.unibe.ch> Message-ID: <35C582BD-0920-4D63-A1A4-8F8B4840BD9F@inria.fr> On May 14, 2010, at 10:01, Damien Pollet wrote: > what about \texttt{-} instead then ? it should do visually... I applied that, copy-paste works now. -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet From laurent.laffont at gmail.com Fri May 21 08:14:38 2010 From: laurent.laffont at gmail.com (laurent laffont) Date: Fri, 21 May 2010 08:14:38 +0200 Subject: [sbe-discussion] Monticello draft chapter Message-ID: Hi, I've read the draft chapter. My thoughts: - No mention of the copy button in the repository browser. I don't know if I work the right way, but usually I save packages on a local repository. When I want to publish I use the copy button. That's really useful when we want to test some code in another image before publishing the package on SqueakSource. - I also would like descriptions of the Adopt button. It's useful when we produce locally several versions of a package and we want to publish only one on SqueakSource. If you use the copy button for the last version you "loose" some ancestors on SS. So adopting the last SS version as ancestor keep history clean. That's very powerful, this is what I like in Git: we can have clean commit log. - For branches: is it possible to propose conventions for naming branches ? On figure 1.10, nothing tell us that there's two branches. - I would like to read something about slices too :) Cheers, Laurent Laffont http://pharocasts.blogspot.com/ http://magaloma.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianopeck at gmail.com Fri May 21 10:33:54 2010 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri, 21 May 2010 10:33:54 +0200 Subject: [sbe-discussion] Re: Monticello draft chapter In-Reply-To: References: Message-ID: On Fri, May 21, 2010 at 8:14 AM, laurent laffont wrote: > Hi, > > I've read the draft chapter. My thoughts: > > - No mention of the copy button in the repository browser. I don't know if > I work the right way, but usually I save packages on a local repository. > When I want to publish I use the copy button. That's really useful when we > want to test some code in another image before publishing the package on > SqueakSource. > > - I also would like descriptions of the Adopt button. It's useful when we > produce locally several versions of a package and we want to publish only > one on SqueakSource. If you use the copy button for the last version you > "loose" some ancestors on SS. So adopting the last SS version as ancestor > keep history clean. That's very powerful, this is what I like in Git: we can > have clean commit log. > Cool. I was not even aware of that ;) > > - For branches: is it possible to propose conventions for naming branches ? > On figure 1.10, nothing tell us that there's two branches. > > - I would like to read something about slices too :) > > Yes! Maybe a little extra section of how to commiting with Metacello a Pharo fix ? Where you explain about the slice (just a convention), but also about "required packages", etc. That would be very very cool. Hi Oscar. I couldn't read it yet, but I will. It is very useful for me because I am writing the one of Metacello (we are almost in draft) and it is good to know that there will be a Monticello chapter and what do you see there. Thanks Mariano Cheers, > > Laurent Laffont > > http://pharocasts.blogspot.com/ > http://magaloma.blogspot.com/ > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre at bergel.eu Fri May 21 16:38:22 2010 From: alexandre at bergel.eu (Alexandre Bergel) Date: Fri, 21 May 2010 11:38:22 -0300 Subject: [sbe-discussion] Re: Monticello draft chapter In-Reply-To: References: Message-ID: <2F9C0EC3-E306-4FF7-A18E-470D9690C5C4@bergel.eu> Thanks, I will continue to work on the chapter soon. Probably in 1 o 2 weeks. Cheers, Alexandre On 21 May 2010, at 05:33, Mariano Martinez Peck wrote: > > > On Fri, May 21, 2010 at 8:14 AM, laurent laffont wrote: > Hi, > > I've read the draft chapter. My thoughts: > > - No mention of the copy button in the repository browser. I don't know if I work the right way, but usually I save packages on a local repository. When I want to publish I use the copy button. That's really useful when we want to test some code in another image before publishing the package on SqueakSource. > > - I also would like descriptions of the Adopt button. It's useful when we produce locally several versions of a package and we want to publish only one on SqueakSource. If you use the copy button for the last version you "loose" some ancestors on SS. So adopting the last SS version as ancestor keep history clean. That's very powerful, this is what I like in Git: we can have clean commit log. > > Cool. I was not even aware of that ;) > > > - For branches: is it possible to propose conventions for naming branches ? On figure 1.10, nothing tell us that there's two branches. > > - I would like to read something about slices too :) > > > Yes! Maybe a little extra section of how to commiting with Metacello a Pharo fix ? Where you explain about the slice (just a convention), but also about "required packages", etc. That would be very very cool. > > Hi Oscar. I couldn't read it yet, but I will. It is very useful for me because I am writing the one of Metacello (we are almost in draft) and it is good to know that there will be a Monticello chapter and what do you see there. > > Thanks > > Mariano > > Cheers, > > Laurent Laffont > > http://pharocasts.blogspot.com/ > http://magaloma.blogspot.com/ > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.