Re: [Pharo-dev] Spec new release :)
On 2013-11-14, at 00:58, Stéphane Ducasse stephane.duca...@inria.fr wrote: It would be completely silly to have class comments in MD (no matter how cool this would be) _and_ *not* be able to have Nautilus parse/render them, with active links, etc… With Athens inside the image we will use the pier parser to generate a document tree and render it inside the image. What has this to do with athens? I want really nice font so this is not really related to athens and was confused. We already have a prototype implementation with Markdown using the existing text model. Worked already fine, so that should be 1 afternoon of work to get the pier syntax running in the current image. Where it is? that we add it to our todo? because having a real domain model (which we have) is the way to go. I do not want to hack stuff. Now we ***HAVE*** a fully working pier parser and creating domain and we ARE enhancing it already. Igor did it 2 years ago. signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [Pharo-dev] Spec new release :)
Camillo I would love that you spend all your energy in doing something else…than arguing for arguing So I created a filter that will kill any mail containing markdown. Because I'm doing pharo for positive energy not endless arguing. Stef I want really nice font so this is not really related to athens and was confused. We already have a prototype implementation with Markdown using the existing text model. Worked already fine, so that should be 1 afternoon of work to get the pier syntax running in the current image. Where it is? that we add it to our todo? because having a real domain model (which we have) is the way to go. I do not want to hack stuff. Now we ***HAVE*** a fully working pier parser and creating domain and we ARE enhancing it already. Igor did it 2 years ago.
Re: [Pharo-dev] Spec new release :)
On 2013-11-13, at 23:29, Jan Vrany jan.vr...@fit.cvut.cz wrote: We already have a prototype implementation with Markdown using the existing text model.Worked already fine, Where can I find it? I'm quite interested. The code is under http://smalltalkhub.com/mc/Pharo/NativeBoost/main/ NativeBoost-Help-IgorStasenko.6 should do under 2.0. Though there seems to be a problem since the original PetitParser repository is down, hence, petit-markdown does not load anymore under 2.0. The newer version of petit markdown which works under 3.0 uses slightly different nodes, resulting in a broken NativeBoost-Help. I short you can look at the code but not at the result :/ signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [Pharo-dev] Spec new release :)
Hi, I have some questions: 1/ Before the removal of morphic dependencies in spec, I used aNode selectedNode parentNode item to get the parent of the selected item. What is the new way to do that? 2/ I also defined specific nodes for a Tree model. These nodes overrode the childrenItems method to provide children elements. It looks like this method is not used anymore in TreeNodeModel. What should I now use to provide children elements in a TreeNodeModel? Thanks, Christophe. smime.p7s Description: S/MIME cryptographic signature
Re: [Pharo-dev] Spec new release :)
Ben On 13 Nov 2013, at 12:43, Christophe Demarey christophe.dema...@inria.fr wrote: Hi, I have some questions: 1/ Before the removal of morphic dependencies in spec, I used aNode selectedNode parentNode item to get the parent of the selected item. What is the new way to do that? I think I forgot about this one :) The fix is easy though. Can you open an issue, I will have a look this evening :) 2/ I also defined specific nodes for a Tree model. These nodes overrode the childrenItems method to provide children elements. It looks like this method is not used anymore in TreeNodeModel. What should I now use to provide children elements in a TreeNodeModel? You used to have Morphic node specific classes. Now there is only TreeNodeModel. So instead of creating a subclass, you will have to specify the TreeNodeModels you want (and specifying children is #children:) It is also possible that I forgot some scenarios, in this case, you can send another email, or wait tip next week so we can sit together :) Ben Thanks, Christophe.
Re: [Pharo-dev] Spec new release :)
Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
I give up. Stef On Nov 13, 2013, at 1:19 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
do it in whatever you want but do not ask me to edit it nor to put it in our book. Stef On Nov 13, 2013, at 1:19 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
What is the point of this folder? Do you expect us to write documentation there? Why do you systematically are again pier? especially when I wrote successfully the seaside book with it and so far the only book I saw using markdown are not book? May be I should go back to write in plain latex and like that everybody will be happy. Or I should even do not write any book. Because when I see the amount of energy it takes and after people kill my fun with fucking syntactic issue because I do not use markdown. Stef I added https://github.com/pharo-project/pharo-documentation On 2013-11-13, at 02:47, Stéphane Ducasse stephane.duca...@inria.fr wrote: Ben it would be good to do it pier format so that we get html and pdf and also to avoid to have documentation spread all over. Stef On Nov 12, 2013, at 11:42 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: Yes it is planned :) The idea is to have it ready for the release of Pharo 3.0 (at last). There is a git repo I just opened[1] where the doc will be :) Every body is free to fork it and to pull-request me :) Ben [1]https://github.com/BenjaminVanRyseghem/Spec_Documentation On 12 Nov 2013, at 23:09, kilon alios kilon.al...@gmail.com wrote: Is there any new documentation planned ? On Tue, Nov 12, 2013 at 11:42 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: Confirmed and fixed :P https://pharo.fogbugz.com/default.asp?12153 Ben On 12 Nov 2013, at 17:08, Martin Dias tinchod...@gmail.com wrote: (Checked in Pharo 30567) On Tue, Nov 12, 2013 at 5:08 PM, Martin Dias tinchod...@gmail.com wrote: Thanks Ben. It's neat to have Spec models for tree columns. It was strange to instantiate MorphTreeColumnMorph directly from my Spec model. I found an issue in TreeModel: Only one level of children is shown. Reproduce with: TreeModel new roots: (1 to: 5); childrenBlock: [ :item | 1+item to: 5+item ]; openWithSpec Should I report? Martín On Tue, Nov 12, 2013 at 2:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It’s this one: https://pharo.fogbugz.com/default.asp?12135 Ben On 12 Nov 2013, at 14:49, Martin Dias tinchod...@gmail.com wrote: I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll ... Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
On 13 Nov 2013, at 20:05, Sven Van Caekenberghe s...@stfx.eu wrote: On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ok :) But as an end user, do you feel the difference ? There are some PEG grammar for markdown, maybe it could be reused so PP can parse it :) then one could generate Pier format out of markdown :) Ben Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
Why not generating markdown code from pier code? If the whole problem is exposure on the web. Someone has considered pdf2html or latex2html? Maybe my question is naive, I do not know. On some point, i have tried to generate the roassal documentation from the Roassal Help, but it makes the maintenance loop heavy: If I want to fix something in the text, I had to edit the Help in Pharo, generating the document, compiling into .pdf. Quite heavy it was. At the end, I only worked on the .tex files. Alexandre On Nov 13, 2013, at 4:05 PM, Sven Van Caekenberghe s...@stfx.eu wrote: On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Re: [Pharo-dev] Spec new release :)
On 13 Nov 2013, at 20:22, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: On 13 Nov 2013, at 20:05, Sven Van Caekenberghe s...@stfx.eu wrote: On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ok :) But as an end user, do you feel the difference ? I know, but the documentation is meant to be integrated in the Pharo ecosystem. It would be completely silly to have class comments in MD (no matter how cool this would be) _and_ *not* be able to have Nautilus parse/render them, with active links, etc… There are some PEG grammar for markdown, maybe it could be reused so PP can parse it :) then one could generate Pier format out of markdown :) So indeed, that is what we need. [And what we already have for Pier]. But be sure to ask Camillo how his 2 attempts went before you get ambitious. I look at the PP MD code and thought, I can do better, but after writing some actual code, I stopped ;-) BTW, please point me to grammar, I never found one ! Each MD parser is one big hack. Ben Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
On 13 Nov 2013, at 20:22, Alexandre Bergel alexandre.ber...@me.com wrote: Why not generating markdown code from pier code? If the whole problem is exposure on the web. Someone has considered pdf2html or latex2html? Maybe my question is naive, I do not know. It is not silly, and yes it could be done quite easily I guess, if it even has not yet been done already. On some point, i have tried to generate the roassal documentation from the Roassal Help, but it makes the maintenance loop heavy: If I want to fix something in the text, I had to edit the Help in Pharo, generating the document, compiling into .pdf. Quite heavy it was. At the end, I only worked on the .tex files. Alexandre On Nov 13, 2013, at 4:05 PM, Sven Van Caekenberghe s...@stfx.eu wrote: On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Re: [Pharo-dev] Spec new release :)
So read the thread that yuriy rasied last week my sumarry - write in pier publish in latex, html, markdong - too many variation of markdown - do not want to ask in haskell, ruby… to extend libraries - markdown does not support references and other essential points for making decent books Stef On Nov 13, 2013, at 7:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll ... Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
On Nov 13, 2013, at 8:22 PM, Alexandre Bergel alexandre.ber...@me.com wrote: Why not generating markdown code from pier code? If the whole problem is exposure on the web. Someone has considered pdf2html or latex2html? Maybe my question is naive, I do not know. this is planned. Now I can count the people writing books on my right hand. On some point, i have tried to generate the roassal documentation from the Roassal Help, but it makes the maintenance loop heavy: If I want to fix something in the text, I had to edit the Help in Pharo, generating the document, compiling into .pdf. Quite heavy it was. At the end, I only worked on the .tex files. I would prefer to work in tex because I go much much faster. but I do not have a .tex parser to get a document tree. Stef Alexandre On Nov 13, 2013, at 4:05 PM, Sven Van Caekenberghe s...@stfx.eu wrote: On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Re: [Pharo-dev] Spec new release :)
On Nov 13, 2013, at 8:22 PM, Alexandre Bergel alexandre.ber...@me.com wrote: Why not generating markdown code from pier code? If the whole problem is exposure on the web. Someone has considered pdf2html or latex2html? I did = suicidal tendencies. The results looks like shit. I did not try pdf2html. Now pier is a compromise so that normal people can write chapter without being a latex freaks like us. Stef Maybe my question is naive, I do not know. On some point, i have tried to generate the roassal documentation from the Roassal Help, but it makes the maintenance loop heavy: If I want to fix something in the text, I had to edit the Help in Pharo, generating the document, compiling into .pdf. Quite heavy it was. At the end, I only worked on the .tex files. Alexandre On Nov 13, 2013, at 4:05 PM, Sven Van Caekenberghe s...@stfx.eu wrote: On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Re: [Pharo-dev] Spec new release :)
Stephane I think you need to sit down and write the Guidelines for Pharo Documentation, explaining the tools, the workflow, the goals, the principles and most importantly where documentation can be found. Post it on pharo website. This way you will save a lot of time from answering questions here . So next time someone asks a relevant question you only post a link to it. On Wed, Nov 13, 2013 at 9:44 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: On Nov 13, 2013, at 8:22 PM, Alexandre Bergel alexandre.ber...@me.com wrote: Why not generating markdown code from pier code? If the whole problem is exposure on the web. Someone has considered pdf2html or latex2html? I did = suicidal tendencies. The results looks like shit. I did not try pdf2html. Now pier is a compromise so that normal people can write chapter without being a latex freaks like us. Stef Maybe my question is naive, I do not know. On some point, i have tried to generate the roassal documentation from the Roassal Help, but it makes the maintenance loop heavy: If I want to fix something in the text, I had to edit the Help in Pharo, generating the document, compiling into .pdf. Quite heavy it was. At the end, I only worked on the .tex files. Alexandre On Nov 13, 2013, at 4:05 PM, Sven Van Caekenberghe s...@stfx.eu wrote: On 13 Nov 2013, at 19:59, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll … I like .md as well and yes, the github integration makes it compelling. But one objective argument against Markdown and in favour of Pier is that the former has no good parser and/or document model and and the latter does have both, in Pharo. That means that we can write all sorts of tools ourselves and get things finished, as was proven with the books. There simply isn’t any definitive, unambiguous Markdown syntax (the github variant is only one version). Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Re: [Pharo-dev] Spec new release :)
It would be completely silly to have class comments in MD (no matter how cool this would be) _and_ *not* be able to have Nautilus parse/render them, with active links, etc… With Athens inside the image we will use the pier parser to generate a document tree and render it inside the image. Now one step at a time. There are some PEG grammar for markdown, maybe it could be reused so PP can parse it :) then one could generate Pier format out of markdown :) What most of you do not get is that. But I do not care about Pier format. I care about a REAL solution that can produce a REAL document tree AND that ***I*** can edit and maintain and enhance so that I can create books. So I'm pragmatic we wrote the seaside book with pier so I took pier because I do not want to write a MD parser and building model and reinventing the wheel. And I do not want to have to learn a new language just to make sure that I can write books. Stef
Re: [Pharo-dev] Spec new release :)
I will write and send a proposal to the list. Good idea. Stef Stephane I think you need to sit down and write the Guidelines for Pharo Documentation, explaining the tools, the workflow, the goals, the principles and most importantly where documentation can be found. Post it on pharo website. This way you will save a lot of time from answering questions here . So next time someone asks a relevant question you only post a link to it.
Re: [Pharo-dev] Spec new release :)
It would be completely silly to have class comments in MD (no matter how cool this would be) _and_ *not* be able to have Nautilus parse/render them, with active links, etc… With Athens inside the image we will use the pier parser to generate a document tree and render it inside the image. What has this to do with athens? I want really nice font so this is not really related to athens and was confused. We already have a prototype implementation with Markdown using the existing text model. Worked already fine, so that should be 1 afternoon of work to get the pier syntax running in the current image. Where it is? that we add it to our todo? because having a real domain model (which we have) is the way to go. I do not want to hack stuff. Now we ***HAVE*** a fully working pier parser and creating domain and we ARE enhancing it already. Stef
Re: [Pharo-dev] Spec new release :)
On Nov 14, 2013, at 1:03 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: On 13 Nov 2013, at 20:40, Stéphane Ducasse stephane.duca...@inria.fr wrote: So read the thread that yuriy rasied last week my sumarry - write in pier publish in latex, html, markdong “markdong” ? that’s a chinese variant :P ;P yes 400 × 195 - baudelet.net vietnamese apparently For md, there is pandoc (http://johnmacfarlane.net/pandoc/) it converts a lot of format into a lot of other formats :) Yes we know. But again as I said it one million times. Markdown does not offer what is needed to write books. I will not repeat here. And I will not hack pandoc to make it works. - too many variation of markdown - do not want to ask in haskell, ruby… to extend libraries I do not get it - do not want to **hack** in haskell, ruby… to extend libraries - markdown does not support references and other essential points for making decent books What do you mean by references and other essential points” ? I will not repeat it :) Read the thread of yuriy. Ben Stef On Nov 13, 2013, at 7:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It was a real question, and it feels like you overreacted the answer … To me, markdown or pier is a new syntax to learn so I am asking … To me, doing Pier because you do or because you said to is no really an argument. Then I am open to a real answer but I also see that markdown is integrated to a lot of tools (github and jekylls by examples) and that a lot of people knows about markdown. This was a real question, not a troll ... Ben On 13 Nov 2013, at 19:22, Stéphane Ducasse stephane.duca...@inria.fr wrote: do you really think that I insist of using pier syntax because A- I want to lose my time B- this is for my ego? C- because I'm funny D- ... No seriously? If you want to get an answer read the thread that yuri raised a while ago. Because we already discussed discussed and discussed it. I will not write any book in markdown. Now you can try and we see. Stef Stef, what is the advantages of writing it in Pier compared to markdown ? Ben
Re: [Pharo-dev] Spec new release :)
On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
I'm working on the changeSorter menus because they do not work anymore. And we will see what we can learn from there. Stef On Nov 12, 2013, at 1:49 AM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? Stef
Re: [Pharo-dev] Spec new release :)
biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
There is one reported since yesterday I think about missing morphic bindings ;) Thanks for your feedback :) Ben On 12 Nov 2013, at 14:48, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
Then foo it :) Both way are supported, so I do not really get the point of this discussion :) Ben On 12 Nov 2013, at 14:21, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
It’s this one: https://pharo.fogbugz.com/default.asp?12135 Ben On 12 Nov 2013, at 14:49, Martin Dias tinchod...@gmail.com wrote: I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
Thanks Ben. It's neat to have Spec models for tree columns. It was strange to instantiate MorphTreeColumnMorph directly from my Spec model. I found an issue in TreeModel: Only one level of children is shown. Reproduce with: TreeModel new roots: (1 to: 5); childrenBlock: [ :item | 1+item to: 5+item ]; openWithSpec Should I report? Martín On Tue, Nov 12, 2013 at 2:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It’s this one: https://pharo.fogbugz.com/default.asp?12135 Ben On 12 Nov 2013, at 14:49, Martin Dias tinchod...@gmail.com wrote: I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
(Checked in Pharo 30567) On Tue, Nov 12, 2013 at 5:08 PM, Martin Dias tinchod...@gmail.com wrote: Thanks Ben. It's neat to have Spec models for tree columns. It was strange to instantiate MorphTreeColumnMorph directly from my Spec model. I found an issue in TreeModel: Only one level of children is shown. Reproduce with: TreeModel new roots: (1 to: 5); childrenBlock: [ :item | 1+item to: 5+item ]; openWithSpec Should I report? Martín On Tue, Nov 12, 2013 at 2:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It’s this one: https://pharo.fogbugz.com/default.asp?12135 Ben On 12 Nov 2013, at 14:49, Martin Dias tinchod...@gmail.com wrote: I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
Confirmed and fixed :P https://pharo.fogbugz.com/default.asp?12153 Ben On 12 Nov 2013, at 17:08, Martin Dias tinchod...@gmail.com wrote: (Checked in Pharo 30567) On Tue, Nov 12, 2013 at 5:08 PM, Martin Dias tinchod...@gmail.com wrote: Thanks Ben. It's neat to have Spec models for tree columns. It was strange to instantiate MorphTreeColumnMorph directly from my Spec model. I found an issue in TreeModel: Only one level of children is shown. Reproduce with: TreeModel new roots: (1 to: 5); childrenBlock: [ :item | 1+item to: 5+item ]; openWithSpec Should I report? Martín On Tue, Nov 12, 2013 at 2:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It’s this one: https://pharo.fogbugz.com/default.asp?12135 Ben On 12 Nov 2013, at 14:49, Martin Dias tinchod...@gmail.com wrote: I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
Is there any new documentation planned ? On Tue, Nov 12, 2013 at 11:42 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: Confirmed and fixed :P https://pharo.fogbugz.com/default.asp?12153 Ben On 12 Nov 2013, at 17:08, Martin Dias tinchod...@gmail.com wrote: (Checked in Pharo 30567) On Tue, Nov 12, 2013 at 5:08 PM, Martin Dias tinchod...@gmail.com wrote: Thanks Ben. It's neat to have Spec models for tree columns. It was strange to instantiate MorphTreeColumnMorph directly from my Spec model. I found an issue in TreeModel: Only one level of children is shown. Reproduce with: TreeModel new roots: (1 to: 5); childrenBlock: [ :item | 1+item to: 5+item ]; openWithSpec Should I report? Martín On Tue, Nov 12, 2013 at 2:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It’s this one: https://pharo.fogbugz.com/default.asp?12135 Ben On 12 Nov 2013, at 14:49, Martin Dias tinchod...@gmail.com wrote: I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
Re: [Pharo-dev] Spec new release :)
Yes it is planned :) The idea is to have it ready for the release of Pharo 3.0 (at last). There is a git repo I just opened[1] where the doc will be :) Every body is free to fork it and to pull-request me :) Ben [1]https://github.com/BenjaminVanRyseghem/Spec_Documentation On 12 Nov 2013, at 23:09, kilon alios kilon.al...@gmail.com wrote: Is there any new documentation planned ? On Tue, Nov 12, 2013 at 11:42 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: Confirmed and fixed :P https://pharo.fogbugz.com/default.asp?12153 Ben On 12 Nov 2013, at 17:08, Martin Dias tinchod...@gmail.com wrote: (Checked in Pharo 30567) On Tue, Nov 12, 2013 at 5:08 PM, Martin Dias tinchod...@gmail.com wrote: Thanks Ben. It's neat to have Spec models for tree columns. It was strange to instantiate MorphTreeColumnMorph directly from my Spec model. I found an issue in TreeModel: Only one level of children is shown. Reproduce with: TreeModel new roots: (1 to: 5); childrenBlock: [ :item | 1+item to: 5+item ]; openWithSpec Should I report? Martín On Tue, Nov 12, 2013 at 2:59 PM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It’s this one: https://pharo.fogbugz.com/default.asp?12135 Ben On 12 Nov 2013, at 14:49, Martin Dias tinchod...@gmail.com wrote: I forgot to specify: in latest Pharo (30565) On Tue, Nov 12, 2013 at 2:48 PM, Martin Dias tinchod...@gmail.com wrote: I think there is some issue with TreeColumnModel. For example: TreeModel exampleWithCustomColumnsAndNodes Raises ByteSymbol(Object)doesNotUnderstand: #adapt: Should I report in fogbugz? thanks, Martín On Tue, Nov 12, 2013 at 2:21 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Yes this is what I did for the change sorter. I do not like this DSL like way of passing block over block over block over blocks. I love blocks but methods are named blocks and I prefer them. Stef biut that method can be written: aMenu addGroup: (MenuGroupModel new addItem: (MenuItemModel new name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix); addItem: (MenuItem new name: 'Browse Class'; action: [ self browseSelectedObjectClass ])). and you do not have to declare variables for that (and is a lot better than using a block, IMO). On Nov 12, 2013, at 9:36 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: One can just use an object too. It’s just that otherwise, it pollutes a bit the method with tons of inst vars (and then you forget to use them :P) Ben On 12 Nov 2013, at 13:05, Esteban Lorenzano esteba...@gmail.com wrote: On Nov 12, 2013, at 4:22 AM, Benjamin benjamin.vanryseghem.ph...@gmail.com wrote: It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? he, I thought the same :) Stef
[Pharo-dev] Spec new release :)
Hello everyone, I am glad to announce a step has been made in Spec with the introduction of five new models: TreeNodeModel, TreeColumnModel, MenuModel, MenuGroupModel and MenuItemModel. I. Trees The two first models (TreeNodeModel, TreeColumnModel) are used to build and specify trees (in addition with TreeModel). a) TreeNodeModel TreeNode represent a node of the tree, and hold some basic information like what the children of the node are, or which icon to use. Previously, one could use directly subclasses of MorphTreeNodeModel directly. This has been removed to loose the bonds between Spec and Morphic. If you used direct Morphic nodes in your tree, you will need to replace them by TreeNodeModel instances. You could also have used TreeModel methods used to generically describe your nodes. In this case, the only change you will need is how you access the content of a node. The MorphTreeNodeModel method used for this is #item while in TreeNodeModel it is #content. TreeNodeModel also support filtering out of the box with an extensible mechanism. b) TreeColumnModel TreeColumnModel is used to specify the columns used to render the tree nodes. Where one used to use TreeColumnMorph, now TreeColumnModel have to be use. The mainly behave the same, only the API differs to provide a less morphic oriented set of methods. TreeColumnModel also resolve some some updating issue encountered in TreeColumnMorph. II. Menus The three remaining models are used to build menus for the spec models. The way to build menus has been rethink to provide a more natural way to think menus. a) MenuModel A MenuModel is a quite a simple object with only an optional name, an optional icon and a list of menu groups. A MenuModel can also be turned into an auto-refreshing menu. The main method of MenuModel is #addGroup: which takes a block as argument and build a group before adding it to the menu model groups list. Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. b) MenuGroupModel A MenuGroupModel represent a set of menu items which belong to a same logical set by providing related actions. A menu group only hold a list of menu items. The main method of MenuGroupModel is #addItem: , as you have seen in the previous example. Example: aGroup addItem: [ :anItem | anItem name: 'Browse Hierarchy'; action: [ self browseSelectedObjectClassHierarchy ]; shortcut: $h command mac | $h alt win | $h alt unix ] c) MenuItemModel A menu item is the core of a menu. It is the object that can actually perform an action. A MenuItemModel holds multiple information related to this action like the name of the menu entry, the optional icon you want to use, if the action is doable in the current context, and the optional shortcut triggering the action. An interesting feature is that by applying a menu to a spec model, the shortcuts of its items will be used to automatically bind the corresponding key combination to the menu item action (taking in account the context to prevent to fire action when it does not make sense). So far, this feature has been introduced only in NewListModel to fix the possible issues before a global deployment. Thanks for reading this long email, thanks for your support and your feedback, and see you soon :) Ben
Re: [Pharo-dev] Spec new release :)
Benjamin wrote: Hello everyone, I am glad to announce a step has been made in Spec with the introduction of five new models: TreeNodeModel, TreeColumnModel, MenuModel, MenuGroupModel and MenuItemModel. I. Trees The two first models (TreeNodeModel, TreeColumnModel) are used to build and specify trees (in addition with TreeModel). a) TreeNodeModel TreeNode represent a node of the tree, and hold some basic information like what the children of the node are, or which icon to use. Previously, one could use directly subclasses of MorphTreeNodeModel directly. This has been removed to loose the bonds between Spec and Morphic. If you used direct Morphic nodes in your tree, you will need to replace them by TreeNodeModel instances. You could also have used TreeModel methods used to generically describe your nodes. In this case, the only change you will need is how you access the content of a node. The MorphTreeNodeModel method used for this is #item while in TreeNodeModel it is #content. TreeNodeModel also support filtering out of the box with an extensible mechanism. b) TreeColumnModel TreeColumnModel is used to specify the columns used to render the tree nodes. Where one used to use TreeColumnMorph, now TreeColumnModel have to be use. The mainly behave the same, only the API differs to provide a less morphic oriented set of methods. TreeColumnModel also resolve some some updating issue encountered in TreeColumnMorph. II. Menus The three remaining models are used to build menus for the spec models. The way to build menus has been rethink to provide a more natural way to think menus. a) MenuModel A MenuModel is a quite a simple object with only an optional name, an optional icon and a list of menu groups. A MenuModel can also be turned into an auto-refreshing menu. The main method of MenuModel is #addGroup: which takes a block as argument and build a group before adding it to the menu model groups list. Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. b) MenuGroupModel A MenuGroupModel represent a set of menu items which belong to a same logical set by providing related actions. A menu group only hold a list of menu items. The main method of MenuGroupModel is #addItem: , as you have seen in the previous example. Example: aGroup addItem: [ :anItem | anItem name: 'Browse Hierarchy'; action: [ self browseSelectedObjectClassHierarchy ]; shortcut: $h command mac | $h alt win | $h alt unix ] c) MenuItemModel A menu item is the core of a menu. It is the object that can actually perform an action. A MenuItemModel holds multiple information related to this action like the name of the menu entry, the optional icon you want to use, if the action is doable in the current context, and the optional shortcut triggering the action. An interesting feature is that by applying a menu to a spec model, the shortcuts of its items will be used to automatically bind the corresponding key combination to the menu item action (taking in account the context to prevent to fire action when it does not make sense). So far, this feature has been introduced only in NewListModel to fix the possible issues before a global deployment. Thanks for reading this long email, thanks for your support and your feedback, and see you soon :) Ben Thanks for your efforts. I'll try them out soon. regards -ben
Re: [Pharo-dev] Spec new release :)
Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? Stef
Re: [Pharo-dev] Spec new release :)
It is not necessary better, but it saves you from having hundreds of temp vars :) Ben On 12 Nov 2013, at 01:49, Stéphane Ducasse stephane.duca...@inria.fr wrote: Example: aMenu addGroup: [ :aGroup | aGroup addItem: [ :anItem | anItem name: 'Browse Full'; action: [ self browseSelectedObject ]; shortcut: $b command mac | $b alt win | $b alt unix ]. aGroup addItem: [ :anItem | anItem name: 'Browse Class'; action: [ self browseSelectedObjectClass ] ] ]. I do not see the value of passing block to add element to groups why not the normal way i.e. passing an object. I do not get why executing a block with an object is better? Stef