Re: [Pharo-users] New booklet :) on Bloc this time
Excellent! Thanks you very much for another book!! -- View this message in context: http://forum.world.st/New-booklet-on-Bloc-this-time-tp4948511p4948601.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Mustache: Making a conditional section show its values.
Norbert, Dot notation solves the issue and [1] works as expected. =[1] '{{#twitter}} Twitter https://twitter.com/{{.}}";> {{.}} {{/twitter}}' asMustacheTemplate value: { #twitter -> '@offrayLC' } asDictionary === Thanks for the work on Mustache and the Enterprise Pharo chapter. Is a really good written book (so far I have read the Mustache, Teapot and ZnServer chapters). I wonder if there is a place for extensions and clarifications of this book in its online version, for example, regarding dot notation. Cheers, Offray On 29/05/17 16:48, Norbert Hartl wrote: > Offray, > > I think I didn't get what you want at first. When using a section in mustache > {{#twitter}} then the object value of the key twitter becomes the current > context. Every property is resolved relative to this current context. If you > want to use the current context itself as value you can use the dot notation > {{ . }}. There was a problem when this context itself is a string. I solved > that a year ago but I've seen that the newest configuration was not in the > MetaRepo. It means if you loaded mustache from the catalog then you loaded a > slightly older version that doesn't include that fix. I've update all > MetaRepos from pharo4 to pharo6 for the newest configuration. If you load it > now it should work. > > hope that helps, > > Norbert > >> Am 29.05.2017 um 17:15 schrieb Offray Vladimir Luna Cárdenas >> : >> >> Yes I can share the data. Please load Brea project from [1] and do: >> >> = >> >> | testUser | >> testUser := BreaMember new createTestUser. >> testUser html >> >> = >> >> [1] http://smalltalkhub.com/#!/~Offray/Brea >> >> >> You will see that the twitter portion of the row is showed, but without >> any actual data inside. You can also try this: >> >> = >> '{{#twitter}} >> >> > class="mdl-data-table__cell--non-numeric">Twitter >> >> > href="https://twitter.com/{{twitter}}";>{{twitter}} >> >> {{/twitter}}' asMustacheTemplate value: { #twitter -> '@offrayLC' } >> asDictionary >> = >> >> with the same behavior. >> >> I think that the proper output will be the row showed with the data >> inside filled. >> >> Let me know how can I help to debug this. >> >> Thanks, >> >> Offray >> >> On 29/05/17 09:26, Norbert Hartl wrote: >>> To clarify. If the object you inject has a value which either does not >>> contain the key twitter or it does container the key twitter but its value >>> is nil then the section won't be shown. >>> >>> '{{#twitter}} >>> >>> >> class="mdl-data-table__cell--non-numeric">Twitter >>> >>> >> href="https://twitter.com/{{twitter}}";>{{twitter}} >>> >>> {{/twitter}}' asMustacheTemplate value: { #twitter -> nil } asDictionary >>> >>> gives empty string in my case. >>> >>> Norbert >>> Am 29.05.2017 um 16:20 schrieb Norbert Hartl : Can you show some data you are injecting? It should work as you expect it. Norbert > Am 29.05.2017 um 15:26 schrieb Offray Vladimir Luna Cárdenas > : > > Hi, > > I'm using Mustache for a project to build a dynamic distributed web site > generator for public & open data, backed by Fossil and using Material > Design Lite. I have a template like this: > > > > {{#twitter}} > > class="mdl-data-table__cell--non-numeric">Twitter > > href="https://twitter.com/{{twitter}}";>{{twitter}} > > {{/twitter}} > > > > that is mean to show or hide a row in a table, depending on if Twitter > data for a profile is found in a user profile. When the profile doesn't > have twitter data, the row is hidden, as supposed, and when it has, the > row is shown, but without any actual twitter data. What I'm missing? > Should I use partials in this case and how? > > Thanks, > > Offray > > > >>> >> >> > >
Re: [Pharo-users] Mustache: Making a conditional section show its values.
Offray, I think I didn't get what you want at first. When using a section in mustache {{#twitter}} then the object value of the key twitter becomes the current context. Every property is resolved relative to this current context. If you want to use the current context itself as value you can use the dot notation {{ . }}. There was a problem when this context itself is a string. I solved that a year ago but I've seen that the newest configuration was not in the MetaRepo. It means if you loaded mustache from the catalog then you loaded a slightly older version that doesn't include that fix. I've update all MetaRepos from pharo4 to pharo6 for the newest configuration. If you load it now it should work. hope that helps, Norbert > Am 29.05.2017 um 17:15 schrieb Offray Vladimir Luna Cárdenas > : > > Yes I can share the data. Please load Brea project from [1] and do: > > = > > | testUser | > testUser := BreaMember new createTestUser. > testUser html > > = > > [1] http://smalltalkhub.com/#!/~Offray/Brea > > > You will see that the twitter portion of the row is showed, but without > any actual data inside. You can also try this: > > = > '{{#twitter}} > >class="mdl-data-table__cell--non-numeric">Twitter > > href="https://twitter.com/{{twitter}}";>{{twitter}} > > {{/twitter}}' asMustacheTemplate value: { #twitter -> '@offrayLC' } > asDictionary > = > > with the same behavior. > > I think that the proper output will be the row showed with the data > inside filled. > > Let me know how can I help to debug this. > > Thanks, > > Offray > > On 29/05/17 09:26, Norbert Hartl wrote: >> To clarify. If the object you inject has a value which either does not >> contain the key twitter or it does container the key twitter but its value >> is nil then the section won't be shown. >> >> '{{#twitter}} >> >> > class="mdl-data-table__cell--non-numeric">Twitter >> >> > href="https://twitter.com/{{twitter}}";>{{twitter}} >> >> {{/twitter}}' asMustacheTemplate value: { #twitter -> nil } asDictionary >> >> gives empty string in my case. >> >> Norbert >> >>> Am 29.05.2017 um 16:20 schrieb Norbert Hartl : >>> >>> Can you show some data you are injecting? It should work as you expect it. >>> >>> Norbert >>> Am 29.05.2017 um 15:26 schrieb Offray Vladimir Luna Cárdenas : Hi, I'm using Mustache for a project to build a dynamic distributed web site generator for public & open data, backed by Fossil and using Material Design Lite. I have a template like this: {{#twitter}} >>> class="mdl-data-table__cell--non-numeric">Twitter >>> href="https://twitter.com/{{twitter}}";>{{twitter}} {{/twitter}} that is mean to show or hide a row in a table, depending on if Twitter data for a profile is found in a user profile. When the profile doesn't have twitter data, the row is hidden, as supposed, and when it has, the row is shown, but without any actual twitter data. What I'm missing? Should I use partials in this case and how? Thanks, Offray >>> >> >> > > >
[Pharo-users] Roassal @ Pharo TechTalk
Hello, Tomorrow Roassal will be the topic of the month Pharo TechTalk. When: TechTalk Voice channel @ Discord, Youtube channel When: 4:00 PM (GMT+2, Paris Time), 11:00 (GMT-3, Argentina time) 10:00 AM (GMT-4, Chile time), 7:00 AM (PDT, San Francisco) Length: about 30 minutes How to join: - Youtube Channel for the video: https://www.youtube.com/watch?v=hmnDGbM5vsY - Discord for the sound: http://discord.gg/Sj2rhxn Website of Pharo TechTalk: https://association.pharo.org/event-2489995 Content of the Roassal TechTalk: 1 - General introduction of Roassal 2 - Latest news in Roassal (Theme support, Scatterplot Matrix, Elastic boxes, ...) 4 - Applications based on Roassal (Test Coverage, Memory profiling) 3 - Ongoing effort and future work The presentation of the TechTalk will be essentially demo-based. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Re: [Pharo-users] Mustache: Making a conditional section show its values.
Yes I can share the data. Please load Brea project from [1] and do: = | testUser | testUser := BreaMember new createTestUser. testUser html = [1] http://smalltalkhub.com/#!/~Offray/Brea You will see that the twitter portion of the row is showed, but without any actual data inside. You can also try this: = '{{#twitter}} Twitter https://twitter.com/{{twitter}}";>{{twitter}} {{/twitter}}' asMustacheTemplate value: { #twitter -> '@offrayLC' } asDictionary = with the same behavior. I think that the proper output will be the row showed with the data inside filled. Let me know how can I help to debug this. Thanks, Offray On 29/05/17 09:26, Norbert Hartl wrote: > To clarify. If the object you inject has a value which either does not > contain the key twitter or it does container the key twitter but its value is > nil then the section won't be shown. > > '{{#twitter}} > > class="mdl-data-table__cell--non-numeric">Twitter > > href="https://twitter.com/{{twitter}}";>{{twitter}} > > {{/twitter}}' asMustacheTemplate value: { #twitter -> nil } asDictionary > > gives empty string in my case. > > Norbert > >> Am 29.05.2017 um 16:20 schrieb Norbert Hartl : >> >> Can you show some data you are injecting? It should work as you expect it. >> >> Norbert >> >>> Am 29.05.2017 um 15:26 schrieb Offray Vladimir Luna Cárdenas >>> : >>> >>> Hi, >>> >>> I'm using Mustache for a project to build a dynamic distributed web site >>> generator for public & open data, backed by Fossil and using Material >>> Design Lite. I have a template like this: >>> >>> >>> >>> {{#twitter}} >>> >>> >> class="mdl-data-table__cell--non-numeric">Twitter >>> >>> >> href="https://twitter.com/{{twitter}}";>{{twitter}} >>> >>> {{/twitter}} >>> >>> >>> >>> that is mean to show or hide a row in a table, depending on if Twitter >>> data for a profile is found in a user profile. When the profile doesn't >>> have twitter data, the row is hidden, as supposed, and when it has, the >>> row is shown, but without any actual twitter data. What I'm missing? >>> Should I use partials in this case and how? >>> >>> Thanks, >>> >>> Offray >>> >>> >>> >> > >
Re: [Pharo-users] Mustache: Making a conditional section show its values.
To clarify. If the object you inject has a value which either does not contain the key twitter or it does container the key twitter but its value is nil then the section won't be shown. '{{#twitter}} Twitter https://twitter.com/{{twitter}}";>{{twitter}} {{/twitter}}' asMustacheTemplate value: { #twitter -> nil } asDictionary gives empty string in my case. Norbert > Am 29.05.2017 um 16:20 schrieb Norbert Hartl : > > Can you show some data you are injecting? It should work as you expect it. > > Norbert > >> Am 29.05.2017 um 15:26 schrieb Offray Vladimir Luna Cárdenas >> : >> >> Hi, >> >> I'm using Mustache for a project to build a dynamic distributed web site >> generator for public & open data, backed by Fossil and using Material >> Design Lite. I have a template like this: >> >> >> >> {{#twitter}} >> >> > class="mdl-data-table__cell--non-numeric">Twitter >> >> > href="https://twitter.com/{{twitter}}";>{{twitter}} >> >> {{/twitter}} >> >> >> >> that is mean to show or hide a row in a table, depending on if Twitter >> data for a profile is found in a user profile. When the profile doesn't >> have twitter data, the row is hidden, as supposed, and when it has, the >> row is shown, but without any actual twitter data. What I'm missing? >> Should I use partials in this case and how? >> >> Thanks, >> >> Offray >> >> >> > >
Re: [Pharo-users] Mustache: Making a conditional section show its values.
Can you show some data you are injecting? It should work as you expect it. Norbert > Am 29.05.2017 um 15:26 schrieb Offray Vladimir Luna Cárdenas > : > > Hi, > > I'm using Mustache for a project to build a dynamic distributed web site > generator for public & open data, backed by Fossil and using Material > Design Lite. I have a template like this: > > > > {{#twitter}} > > class="mdl-data-table__cell--non-numeric">Twitter > > href="https://twitter.com/{{twitter}}";>{{twitter}} > > {{/twitter}} > > > > that is mean to show or hide a row in a table, depending on if Twitter > data for a profile is found in a user profile. When the profile doesn't > have twitter data, the row is hidden, as supposed, and when it has, the > row is shown, but without any actual twitter data. What I'm missing? > Should I use partials in this case and how? > > Thanks, > > Offray > > >
[Pharo-users] Mustache: Making a conditional section show its values.
Hi, I'm using Mustache for a project to build a dynamic distributed web site generator for public & open data, backed by Fossil and using Material Design Lite. I have a template like this: {{#twitter}} Twitter https://twitter.com/{{twitter}}";>{{twitter}} {{/twitter}} that is mean to show or hide a row in a table, depending on if Twitter data for a profile is found in a user profile. When the profile doesn't have twitter data, the row is hidden, as supposed, and when it has, the row is shown, but without any actual twitter data. What I'm missing? Should I use partials in this case and how? Thanks, Offray
[Pharo-users] Pharo and QT
Is there an interest for working with QT from Pharo ? I make no promises just something I was interested in trying.
Re: [Pharo-users] New booklet :) on Bloc this time
Congratulations * 100 times I love to see more and more documentation for Pharo :) On Mon, May 29, 2017 at 2:53 PM Marc Hanisch via Pharo-users < pharo-users@lists.pharo.org> wrote: > Hello, > > thanks again for another fantastic tutorial / book! > For beginners (like me), it would be nice to have some sentences in the > introduction about what Bloc is about :-) There are so many Smalltalk > Projects with fancy names out there, that it is hard to have get an > overview ;-) > > Best regards, > Marc > > 2017-05-28 23:48 GMT+02:00 Stephane Ducasse : > >> Hi happy Pharoers >> >> We are happy to announce a nice tutorial on Bloc. The turorial is still >> in alpha version but fully working for now. We will add animations and more >> in the future. >> >> http://files.pharo.org/books-pdfs/booklet-Bloc/BLOCDRAFT.pdf >> >> A. Chis, S. Ducasse, and A. Syrel >> > >
Re: [Pharo-users] New booklet :) on Bloc this time
--- Begin Message --- Hello, thanks again for another fantastic tutorial / book! For beginners (like me), it would be nice to have some sentences in the introduction about what Bloc is about :-) There are so many Smalltalk Projects with fancy names out there, that it is hard to have get an overview ;-) Best regards, Marc 2017-05-28 23:48 GMT+02:00 Stephane Ducasse : > Hi happy Pharoers > > We are happy to announce a nice tutorial on Bloc. The turorial is still in > alpha version but fully working for now. We will add animations and more in > the future. > > http://files.pharo.org/books-pdfs/booklet-Bloc/BLOCDRAFT.pdf > > A. Chis, S. Ducasse, and A. Syrel > --- End Message ---
Re: [Pharo-users] New booklet :) on Bloc this time
Nice! :) Glenn. - Glenn Cavarlé -- View this message in context: http://forum.world.st/New-booklet-on-Bloc-this-time-tp4948511p4948539.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] How to use uFFI with String
On Mon, May 29, 2017 at 7:24 AM, horrido wrote: > I don't use GitHub. I've never used GitHub. I don't know how to use GitHub. > > I looked at making a pull request and I was totally stymied. "Clueless" > doesn't even begin to describe how I felt. Everyone starts there. Its a useful skill to have, so if you are interested to learn, here's a quickstart guide... (Note since its a text file, we are shortcutting so you don't even need git on your local machine) 1. Click on this link. https://github.com/SquareBracketAssociates/UpdatedPharoByExample/blob/master/Morphic/Morphic.pier 2. Click the button in the top tight, then browse to "Morphic.pier" in your fork. 3. To the right of the buttons, click the button to edit the file. 4. After editing, at the bottom select "Create a new branch for this commit and start a pull request" and enter commit title, comment and new-branch-name to reflect your contribution. Click 5. Now looking at "Open a pull request", this is issuing a PR to your own fork. We need to change to the upstream fork. At the top click on "forked from SquareBracketAssociates/UpdatedPharoByExample" . 6. Under "Your recently pushed branches" click 7. Check... base fork: SquareBracketAssociates/UpdatedPharoByExample base: master head fork: YourName/UpdatedPharoByExample compare: your new-branch-name Review the diff, enter PR title and comment, then click . If you have problems, try to catch me on Discord... https://discord.gg/dKv4qR/KCKQSSt cheers -ben P.S. @Stef, btw, it looks like "the guidelines for contributing" is out of date... https://github.com/SquareBracketAssociates/UpdatedPharoByExample/blob/master/CONTRIBUTING.md "This is a test to see if it makes sense to convert PharoByExample into pier format." > > > Ben Coman wrote >> On Sat, May 27, 2017 at 9:15 PM, horrido < > >> horrido.hobbies@ > >> > wrote: >>> Yes, I did. I found it difficult to understand. It would be nice to have >>> some >>> clear examples in the documentation, for example, really simple and >>> common >>> situations such as a C function returning an integer in a >>> passed-by-reference argument. >>> >>> Speaking of documentation, in "Pharo by Example 50," I found this >>> statement: >>> (Recall that you should set halosEnabled in the Preferences >>> browser.) >>> >>> However, nowhere else in the book is there any reference to halosEnabled >>> or >>> Preferences browser. >> >> Nice pick up. Now in Settings (in a fresh 60473 image), filtering on >> "halo" shows only: >> * Cycle both directions >> * Encloses fullbounds >> * Exhibits bounds >> so the comment seems irrelevant >> >> and #halosEnabled & #halosEnabled: each have one implementor class-side of >> Morph >> with one sender from MorphTest each, and one sender from Morph>>addHalo: >> >> and "Morph halosEnabled" ==> true, so the statement seems unnecessary. >> Would you like to contribute a pull request removing it? >> https://github.com/SquareBracketAssociates/UpdatedPharoByExample/blob/master/Morphic/Morphic.pier >> >> >>> Did you guys forget and leave out a chunk of the book? >> >> Its an evolutionary book originally from Squeak. It could well be >> that some parts of the book have been cleaned >> better than others to match Image changes. Thanks for reporting, and >> even better if you can correct it. >> >> cheers -ben > > > > > > -- > View this message in context: > http://forum.world.st/How-to-use-uFFI-with-String-tp4947890p4948512.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. >
Re: [Pharo-users] How to use uFFI with String
Time to learn. Phil On Mon, May 29, 2017 at 1:24 AM, horrido wrote: > I don't use GitHub. I've never used GitHub. I don't know how to use GitHub. > > I looked at making a pull request and I was totally stymied. "Clueless" > doesn't even begin to describe how I felt. > > > Ben Coman wrote > > On Sat, May 27, 2017 at 9:15 PM, horrido < > > > horrido.hobbies@ > > > > wrote: > >> Yes, I did. I found it difficult to understand. It would be nice to have > >> some > >> clear examples in the documentation, for example, really simple and > >> common > >> situations such as a C function returning an integer in a > >> passed-by-reference argument. > >> > >> Speaking of documentation, in "Pharo by Example 50," I found this > >> statement: > >> > >>> (Recall that you should set halosEnabled in the Preferences > >> browser.) > >> > >> However, nowhere else in the book is there any reference to halosEnabled > >> or > >> Preferences browser. > > > > Nice pick up. Now in Settings (in a fresh 60473 image), filtering on > > "halo" shows only: > > * Cycle both directions > > * Encloses fullbounds > > * Exhibits bounds > > so the comment seems irrelevant > > > > and #halosEnabled & #halosEnabled: each have one implementor class-side > of > > Morph > > with one sender from MorphTest each, and one sender from Morph>>addHalo: > > > > and "Morph halosEnabled" ==> true, so the statement seems unnecessary. > > Would you like to contribute a pull request removing it? > > https://github.com/SquareBracketAssociates/UpdatedPharoByExample/blob/ > master/Morphic/Morphic.pier > > > > > >> Did you guys forget and leave out a chunk of the book? > > > > Its an evolutionary book originally from Squeak. It could well be > > that some parts of the book have been cleaned > > better than others to match Image changes. Thanks for reporting, and > > even better if you can correct it. > > > > cheers -ben > > > > > > -- > View this message in context: http://forum.world.st/How-to- > use-uFFI-with-String-tp4947890p4948512.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > > >
Re: [Pharo-users] YAML parser (2017)
Hi Peter, If you have a BNF of YAML, then a SmaCC parser with AST generation is at most a day of work. I can help. Thierry 2017-05-29 9:15 GMT+02:00 Peter Uhnak : > Hi, > > do we have a working parser for YAML? > > There's PPYAMLGrammar (in PetitParser), however it doesn't seem to work in > Pharo 6 at all (not even tests pass). > In Pharo 5 the tests are green, but using it on YAML content still > fails... with small fix I managed it to "pass", however the output seems to > be a very fine-grained AST decomposition and not the expected output > (dictionaries/arrays). > > So do we have some else/working? > > YAML specs have BNF descriptions, so maybe SmaCC can generate it? (I don't > know SmaCC, so maybe this is not how it works.) > > Thanks, > Peter > >
[Pharo-users] YAML parser (2017)
Hi, do we have a working parser for YAML? There's PPYAMLGrammar (in PetitParser), however it doesn't seem to work in Pharo 6 at all (not even tests pass). In Pharo 5 the tests are green, but using it on YAML content still fails... with small fix I managed it to "pass", however the output seems to be a very fine-grained AST decomposition and not the expected output (dictionaries/arrays). So do we have some else/working? YAML specs have BNF descriptions, so maybe SmaCC can generate it? (I don't know SmaCC, so maybe this is not how it works.) Thanks, Peter