Hi to all, As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement: - chomp(separator=$/) -> new_str - chop() -> new_str - ljust(integer, padstr='') ->new_str - next -> new_str - partition(sep) -> [head, sep, tail] Could you help to find out if these methods are already available for the String class? If you have any idea of new methods for the string class, will be really welcome. -- Cheers , Daniela Meneses
Daniela you should try the method finder open it and select the example in the dropbox then you can type examples and see if a method already implement it for example âabcabâ . âaâ . âbcb' shows that copyWithoutAll: is the method. but it expects a character as second argument âabcabâ . $a . âbcbâ Stef On 24 Feb 2014, at 18:30, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
chomp(separator=$/) -> new_str chop() -> new_str ljust(integer, padstr='') ->new_str next -> new_str partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ). Alexandre On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal') It's too trivial, surely.
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
Sure, the hardest part of the work is not really about implementing the functionalities, but providing good method names, good comments and relevant examples. Alexandre On Feb 24, 2014, at 6:19 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ).
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
this is exactly the point of the project. Rethinking the API. And writing a systematic analysis of the situation so that we can get an overview. Stef On 24 Feb 2014, at 22:35, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Sure, the hardest part of the work is not really about implementing the functionalities, but providing good method names, good comments and relevant examples.
Alexandre
On Feb 24, 2014, at 6:19 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ).
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
And that is a great topic, too :) Keep it up. I would be very happy to play with it. Doru On Tue, Feb 25, 2014 at 7:48 AM, Pharo4Stef <pharo4Stef@free.fr> wrote:
this is exactly the point of the project. Rethinking the API. And writing a systematic analysis of the situation so that we can get an overview.
Stef
On 24 Feb 2014, at 22:35, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Sure, the hardest part of the work is not really about implementing the functionalities, but providing good method names, good comments and relevant examples.
Alexandre
On Feb 24, 2014, at 6:19 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <
alexandre.bergel@me.com> wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com "Every thing has its own flow"
And that is a great topic, too :)
Keep it up. I would be very happy to play with it.
me too. Doru I want your scripting skills to really try what she will produce. @Guys how without having an analysis how can we take decisions and learn? What daniela is doing is REALLY important :) so let us play the game. And remember Pharo is about reinventing Smalltalk not getting glued in the ANSI faked Standard. (daniela I will send it to you). Now let try to play the game. What are the operations on strings remove, cut, join, substitute? first one element multiple element multiple times multiple elements remove âaabaabaabâ .$a . âabaabaabâ âaabaabaabâ .âba . âaaabaabâ âaabaabaabâ .$a . âbbbâ âaabaabaabâ .âba . â aaaabâ cut substitute Stef BYW I spent part of my christmax holidays working on windows in VW2.5.4 and it was â¦well reallllllly dated. I mean no easy navigation (just menu hell), limited libraries,â¦.. so we are projecting what is granted today to what we used to have.
Doru
On Tue, Feb 25, 2014 at 7:48 AM, Pharo4Stef <pharo4Stef@free.fr> wrote: this is exactly the point of the project. Rethinking the API. And writing a systematic analysis of the situation so that we can get an overview.
Stef
On 24 Feb 2014, at 22:35, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Sure, the hardest part of the work is not really about implementing the functionalities, but providing good method names, good comments and relevant examples.
Alexandre
On Feb 24, 2014, at 6:19 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ).
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com
"Every thing has its own flow"
cool! Reviewing String is a chance to provide a clean, brief, readable API for whatâs probably the most popular set of needs. If youâre starting with computing it wont take too long to try to modify strings and get value from it. So doing more with the tool (instead of abandoning it for an easier alternative) is more likely. If youâre a veteran engineer you will face that too and end up appreciating the convenience. If you can do that in intuitive english instead of cryptic-memory-addicted things like printlf, etc then itâs an all win. Also wanted to say that you probably developed your most successful strategy but there is no single path or way to explore a system. Nature loves to try everything, all the paths, and select the most universally convenient. The more bridges we build the better* So, if the API additions are intuitive, then Iâm all for it sebastian o/ *because, among other things, we would make possible the success of less myopic software models / views of the world / future innovations On Feb 25, 2014, at 3:48 AM, Pharo4Stef <pharo4Stef@free.fr> wrote:
this is exactly the point of the project. Rethinking the API. And writing a systematic analysis of the situation so that we can get an overview.
Stef
Yes but... in Pharo strings are collections and a ton of things can be done with collections already. Other languages have more "basic" strings and are cutting them in all ways possible but not as collections. things like detect, inject etc are not really in the repertoire of other languages. Okay, there are chop, split, ... but these are pretty basic things. Why not have a test suite with a test for demonstrating how to do these things with the platform we do have? e.g. testChomp, testSplit, ...all put in a Tests-Strings-RubyStyle or Tests-Strings-PythonStyle packages? And like there are Seaside-Pharo-XXX packages, why not a String-Ruby-XXXX thing ? Phil On Tue, Feb 25, 2014 at 12:39 PM, Sebastian Sastre < sebastian@flowingconcept.com> wrote:
cool!
Reviewing String is a chance to provide a clean, brief, readable API for what's probably the most popular set of needs.
If you're starting with computing it wont take too long to try to modify strings and get value from it. So doing more with the tool (instead of abandoning it for an easier alternative) is more likely. If you're a veteran engineer you *will* face that too and end up appreciating the convenience.
If you can do that in intuitive english instead of cryptic-memory-addicted things like printlf, etc then it's an all win.
Also wanted to say that you probably developed your most successful strategy but there is no single path or way to explore a system. Nature loves to try everything, all the paths, and select the most universally convenient.
The more bridges we build the better*
So, if the API additions are intuitive, then I'm all for it
sebastian <https://about.me/sebastianconcept>
o/
*because, among other things, we would make possible the success of less myopic software models / views of the world / future innovations
On Feb 25, 2014, at 3:48 AM, Pharo4Stef <pharo4Stef@free.fr> wrote:
this is exactly the point of the project. Rethinking the API. And writing a systematic analysis of the situation so that we can get an overview.
Stef
2014-02-25 8:49 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
Yes but... in Pharo strings are collections and a ton of things can be done with collections already. Other languages have more "basic" strings and are cutting them in all ways possible but not as collections.
things like detect, inject etc are not really in the repertoire of other languages. Okay, there are chop, split, ... but these are pretty basic things.
Why not have a test suite with a test for demonstrating how to do these things with the platform we do have?
e.g. testChomp, testSplit, ...all put in a Tests-Strings-RubyStyle or Tests-Strings-PythonStyle packages?
And like there are Seaside-Pharo-XXX packages, why not a String-Ruby-XXXX thing ?
Yes, that is a really good idea. Hernán
On 2014-02-26, at 03:53, Hernán Morales Durand <hernan.morales@gmail.com> wrote:
2014-02-25 8:49 GMT-03:00 phil@highoctane.be <phil@highoctane.be>: Yes but... in Pharo strings are collections and a ton of things can be done with collections already. Other languages have more "basic" strings and are cutting them in all ways possible but not as collections.
things like detect, inject etc are not really in the repertoire of other languages. Okay, there are chop, split, ... but these are pretty basic things.
Why not have a test suite with a test for demonstrating how to do these things with the platform we do have?
e.g. testChomp, testSplit, ...all put in a Tests-Strings-RubyStyle or Tests-Strings-PythonStyle packages?
And like there are Seaside-Pharo-XXX packages, why not a String-Ruby-XXXX thing ?
Yes, that is a really good idea.
indeed, we can do it in two steps: 1. create the ruby / pythonic compatibility packages (blindly ignoring any pharo conventions) 2. see which methods (if any) actually make sense to steal
Which Ruby guru an Python guru is going to give it a shot? [I am a Tcl guy... hey, that's an everything is a string language... ] Oh well, I started something: http://www.smalltalkhub.com/#!/~philippeback/StringTclShim So, who is taking StringRubyShim and StringPythonShim :-p ? Phil On Wed, Feb 26, 2014 at 5:09 PM, Camillo Bruni <camillobruni@gmail.com>wrote:
On 2014-02-26, at 03:53, Hernán Morales Durand <hernan.morales@gmail.com> wrote:
2014-02-25 8:49 GMT-03:00 phil@highoctane.be <phil@highoctane.be>: Yes but... in Pharo strings are collections and a ton of things can be
done with collections already.
Other languages have more "basic" strings and are cutting them in all ways possible but not as collections.
things like detect, inject etc are not really in the repertoire of other languages. Okay, there are chop, split, ... but these are pretty basic things.
Why not have a test suite with a test for demonstrating how to do these things with the platform we do have?
e.g. testChomp, testSplit, ...all put in a Tests-Strings-RubyStyle or Tests-Strings-PythonStyle packages?
And like there are Seaside-Pharo-XXX packages, why not a String-Ruby-XXXX thing ?
Yes, that is a really good idea.
indeed, we can do it in two steps:
1. create the ruby / pythonic compatibility packages (blindly ignoring any pharo conventions) 2. see which methods (if any) actually make sense to steal
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel<alexandre.bergel@me.com> wrote: Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ).
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one. "I learned something today[tm]â Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel<alexandre.bergel@me.com
wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one.
"I learned something today[tm]"
But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO.
Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot
Am 24.02.2014 um 23:09 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel<alexandre.bergel@me.com> wrote: Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ).
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one.
"I learned something today[tm]â
But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO.
I agree that adding a lot of names is not helping because that might be the reason I didnât know that selector. What kind of selectors are the right ones Iâm not the one to judge. But to be honest if I think about a collection the selector #piecesCutWhere: is not intuitive to me, too. So Iâm glad you brought that to my attention. thanks again, Norbert
Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot
Not to hijack this thread but just noticed that piecesCutWhere: is implemented in Collection under Pharo and under SequencableCollection under Squeak. Need to check against latest Pharo3 but this should be changed in Pharo as piecesCutWhere: implementation depends on object being of type SequencableCollection. Cheers Carlo On 25 Feb 2014, at 12:47 AM, Norbert Hartl <norbert@hartl.name> wrote: Am 24.02.2014 um 23:09 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel<alexandre.bergel@me.com> wrote: Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ).
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one.
"I learned something today[tm]â
But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO.
I agree that adding a lot of names is not helping because that might be the reason I didnât know that selector. What kind of selectors are the right ones Iâm not the one to judge. But to be honest if I think about a collection the selector #piecesCutWhere: is not intuitive to me, too. So Iâm glad you brought that to my attention. thanks again, Norbert
Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot
On Mon, Feb 24, 2014 at 2:47 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 23:09 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel< alexandre.bergel@me.com> wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one.
"I learned something today[tm]"
But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO.
I agree that adding a lot of names is not helping because that might be the reason I didn't know that selector. What kind of selectors are the right ones I'm not the one to judge. But to be honest if I think about a collection the selector #piecesCutWhere: is not intuitive to me, too. So I'm glad you brought that to my attention.
I get that. All naming is difficult. That there are many different ways to say the same thing in natural language is I think a common problem to many languages, especially English. Just remember the last time you tried to do some free text search for some phrase. Takes me ages to find old messages in email. So even if method is well-named, it likely has only one of a number of plausible good names. And if it has a usefully short nickname (look at unix and lisp, cat & cdr etc) then it must likely be learned by rote. So the issue is not naming; it is how to /find/ functionality. And so in Smalltalk the issue is how to encourage programmers to go find things. The MessageFinder is amazing. But people don't use it. If they did no one would be proposing to add chomp to the standard library. <old man alert>When I learnt Smalltalk there were several factors that made it easy for me to learn. It was much smaller. I thought it was cool. I had the time to learn it. But when I learnt it the browser was simple, refactoring hadn't been invented, there was no MethodFinder, and there was almost _no_ documentation. Basically I learnt it by playing with it, exploring it, reading it, building it.</old man alert> So why aren't people taking the time to learn it today? Is it the system's fault? Is it too big? Are the readable parts of the system non-existent, or too difficult to find? Is it some cultural change that means people can't learn such systems any more? Was it only learnable by a few people back in the day and it remains unsuitable for a mass audience? Is it impossible to design user interfaces that invite exploration? Do people no longer want to play with the system but instead want to use it to get something done fast, and can't spare the time to learn it properly? Are computing languages like English, and every programming language must adopt the conventions and vocabulary of the most popular? Is inheritance too hard to navigate to discover that SequenceableCollection has lots of useful String mehtods, and some useful methods on ByteString are in String, etc? I think suggestions that one add functionality that already exists in the system point to some interesting issues. And I think someone with an HCI or UI bent might get somewhere approaching these questions systematically.
thanks again,
you're welcome :-)
Norbert
Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot
-- best, Eliot
Am 25.02.2014 um 00:10 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 2:47 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 23:09 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel<alexandre.bergel@me.com> wrote: Would be great to have: âConfigurationOfRoassalâ chopCamel => #(âConfigurationâ âOfâ âRoassalâ).
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one.
"I learned something today[tm]â
But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO.
I agree that adding a lot of names is not helping because that might be the reason I didnât know that selector. What kind of selectors are the right ones Iâm not the one to judge. But to be honest if I think about a collection the selector #piecesCutWhere: is not intuitive to me, too. So Iâm glad you brought that to my attention.
I get that. All naming is difficult. That there are many different ways to say the same thing in natural language is I think a common problem to many languages, especially English. Just remember the last time you tried to do some free text search for some phrase. Takes me ages to find old messages in email. So even if method is well-named, it likely has only one of a number of plausible good names. And if it has a usefully short nickname (look at unix and lisp, cat & cdr etc) then it must likely be learned by rote.
Oh dear! I was following you until you brought up unix as an example. Ok I stepped into it 1990 and all of those two to three letter acronyms made their way into my backspine so I donât question them. While Iâm knowing that stuff pretty well Iâm far from believing this is a good example. I also use vi now for 24 years and I can achieve a lot with it but again not something I would recommend to anyone looking for a text manipulating engine.
So the issue is not naming; it is how to /find/ functionality. And so in Smalltalk the issue is how to encourage programmers to go find things. The MessageFinder is amazing. But people don't use it. If they did no one would be proposing to add chomp to the standard library. <old man alert>When I learnt Smalltalk there were several factors that made it easy for me to learn. It was much smaller. I thought it was cool. I had the time to learn it. But when I learnt it the browser was simple, refactoring hadn't been invented, there was no MethodFinder, and there was almost _no_ documentation. Basically I learnt it by playing with it, exploring it, reading it, building it.</old man alert>
These are complaints of an old man :) I understand that because I think you are only slightly older than me. But to be honest the computation world was _much_ easier in the old days. There was more room to focus on the real problems computation wise. Today it is hard to see that the problems are still the same as they were years before just on another scale. The field of application of technology has exploded and it is hard to see for newcomers that they all boil down to a much smaller amount of problems to solve. Talking about the language we also need to see that it is not only a difficulty of the language but that languages are moving, they are not static. And so renaming of selectors might benefit the actual usage of language. Letâs see this straight. We are old hat and we should resist being grumpy old men. Well, I love statler and waldorf (if anyone remembers) and most of the time Iâm acting like being both in one person. But again not a good example.
So why aren't people taking the time to learn it today? Is it the system's fault? Is it too big? Are the readable parts of the system non-existent, or too difficult to find? Is it some cultural change that means people can't learn such systems any more? Was it only learnable by a few people back in the day and it remains unsuitable for a mass audience? Is it impossible to design user interfaces that invite exploration? Do people no longer want to play with the system but instead want to use it to get something done fast, and can't spare the time to learn it properly? Are computing languages like English, and every programming language must adopt the conventions and vocabulary of the most popular? Is inheritance too hard to navigate to discover that SequenceableCollection has lots of useful String mehtods, and some useful methods on ByteString are in String, etc?
I think it needs time. Iâm now nearly doing smalltalk full time for 10 years and I still donât know a lot of things in the image. Iâm learning when I have a problem to solve. And yes, I would wish I would have more time to learn those things. I was always interested in virtual machines butâ¦sad but true I didnât make it the last years and I donât think this will change in the coming years.
I think suggestions that one add functionality that already exists in the system point to some interesting issues. And I think someone with an HCI or UI bent might get somewhere approaching these questions systematically.
Maybe there is a way of making better UIs and leave people explore on their own. There is another possibility and that is education. And by giving an example how to do it you already solved the problem the educative way. This works for sure ;) All the best, Norbert
thanks again,
you're welcome :-)
Norbert
Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
⢠chomp(separator=$/) -> new_str ⢠chop() -> new_str ⢠ljust(integer, padstr='') ->new_str ⢠next -> new_str ⢠partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot
-- best, Eliot
Getting to appreciate all of those facets of Smalltalk takes time and dedication. So much to learn. Anyway, the journey is rewarding. I do not think that the current education system is producing people who want to explore etc. My wife is a maths teacher (for teens for the two years before university, 6+2 hours of math a week) and well, their attitude isn't too encouraging (there are 2 out of 30 who would be picking this up). This isn't deterring me from exposing them to Pharo tough. Phil On Tue, Feb 25, 2014 at 12:10 AM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
On Mon, Feb 24, 2014 at 2:47 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 23:09 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name>wrote:
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel< alexandre.bergel@me.com> wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one.
"I learned something today[tm]"
But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO.
I agree that adding a lot of names is not helping because that might be the reason I didn't know that selector. What kind of selectors are the right ones I'm not the one to judge. But to be honest if I think about a collection the selector #piecesCutWhere: is not intuitive to me, too. So I'm glad you brought that to my attention.
I get that. All naming is difficult. That there are many different ways to say the same thing in natural language is I think a common problem to many languages, especially English. Just remember the last time you tried to do some free text search for some phrase. Takes me ages to find old messages in email. So even if method is well-named, it likely has only one of a number of plausible good names. And if it has a usefully short nickname (look at unix and lisp, cat & cdr etc) then it must likely be learned by rote.
So the issue is not naming; it is how to /find/ functionality. And so in Smalltalk the issue is how to encourage programmers to go find things. The MessageFinder is amazing. But people don't use it. If they did no one would be proposing to add chomp to the standard library.
<old man alert>When I learnt Smalltalk there were several factors that made it easy for me to learn. It was much smaller. I thought it was cool. I had the time to learn it. But when I learnt it the browser was simple, refactoring hadn't been invented, there was no MethodFinder, and there was almost _no_ documentation. Basically I learnt it by playing with it, exploring it, reading it, building it.</old man alert>
So why aren't people taking the time to learn it today? Is it the system's fault? Is it too big? Are the readable parts of the system non-existent, or too difficult to find? Is it some cultural change that means people can't learn such systems any more? Was it only learnable by a few people back in the day and it remains unsuitable for a mass audience? Is it impossible to design user interfaces that invite exploration? Do people no longer want to play with the system but instead want to use it to get something done fast, and can't spare the time to learn it properly? Are computing languages like English, and every programming language must adopt the conventions and vocabulary of the most popular? Is inheritance too hard to navigate to discover that SequenceableCollection has lots of useful String mehtods, and some useful methods on ByteString are in String, etc?
I think suggestions that one add functionality that already exists in the system point to some interesting issues. And I think someone with an HCI or UI bent might get somewhere approaching these questions systematically.
thanks again,
you're welcome :-)
Norbert
Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot
-- best, Eliot
Hi All, Here is a moldy oldie from 2005: http://bugs.squeak.org/view.php?id=1821 The arguments against increasing the size of classes worked on me. All except two methods which I still use frequently. They are explode: and mergeDelimited: (I changed the name of merge: to mergeDelimited: to make it more clear). "explode the collection into a collection of collections broken by aDelimiter" "(#(#(1 2) #(3 4)) mergeDelimited: Character tab ) explode: Character tab = an OrderedCollection(#(1 2) #(3 4)) 'abcdef' explode: 'cd' = an OrderedCollection('ab' 'ef')" I use these all the time. Example: Mail >> replaceTokensIn: aString ^self tokens inject: aString into: [:str :assoc | ((str explode: assoc key) mergeDelimited: assoc value value)]. We have templates that users can throw tokens in like {!First Name} {!email} then we just resolve the tokens and their evaluator block into an array tokens: anArray "Set an array of associations that represent token - value pairs being substituted in the email. The keys are strings to be looked for, the values are blocks being evaluated to obtain the string result." standardTokens := anArray and process the template. While these two methods (explode: and mergeDelimited:) never actually made it into a release I still find them very useful. Daniela, Your partition looks like my explode. Ron Teitelbaum Eliot Miranda wrote: On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name> wrote: Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>: On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel<alexandre.bergel@me.com> wrote: Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal'). 'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal') It's too trivial, surely. No it is not. Because you have to know about it. Thanks for that one. "I learned something today[tm]" But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO. A modified Finder that had named fields for the formation of the "example" would go along way. I went a long time without knowing how to work with this. its a case of you-don't-know-what-you-don't-know cheers -ben Norbert Alexandre On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API (http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
. chomp(separator=$/) -> new_str . chop() -> new_str . ljust(integer, padstr='') ->new_str . next -> new_str . partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu <http://www.bergel.eu/> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. -- best, Eliot -- best, Eliot
On that front, MethodFinder and Spotlight should be a bit more aligned. Try searching for * or \\ in spotlight and you'll get nothing. Very annoying. Autocomplete maybe waiting for a couple chars in order to work. The searchbox in the VW browser is indeed useful. There is the Nautilus Finder plugin one can add (not there by default) but who is going to find out as Nautilus plugins are in a kind of bad state (some really do weird things and most have no description). Phil On Mon, Feb 24, 2014 at 11:09 PM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
On Mon, Feb 24, 2014 at 1:58 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 24.02.2014 um 22:19 schrieb Eliot Miranda <eliot.miranda@gmail.com>:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel< alexandre.bergel@me.com> wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
No it is not. Because you have to know about it. Thanks for that one.
"I learned something today[tm]"
But the real things to learn are the Method Finder and the browser. Adding a lot of names that are known to those that know some scripting language du jour, but are incomprehensible to me, and no doubt many others, is not doing anything for anybody, except trying to be pointlessly cool. Trying to encourage programmers to use the ability of the system to self-introspect and self-document is giving them general skills they can build upon. So a project to improve the UI so that programmers are led to tools they can use for discovery seems worth-while to me, while adding yet more short-hand to hand-hold the ignorant isn't helping, IMHO.
Norbert
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- best, Eliot
On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Nice piece of code. Not sure if it is too trivial. I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method. --Hannes
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
Indeed, it's a new addition to Pharo (originally developed in Moose). Doru On Thu, Jul 30, 2015 at 10:32 PM, H. Hirzel <hannes.hirzel@gmail.com> wrote:
On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Nice piece of code. Not sure if it is too trivial.
I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method.
--Hannes
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- www.tudorgirba.com "Every thing has its own flow"
Erm. Eliot added these methods to Squeak in 2012. Levente On Thu, 30 Jul 2015, Tudor Girba wrote:
Indeed, it's a new addition to Pharo (originally developed in Moose). Doru
On Thu, Jul 30, 2015 at 10:32 PM, H. Hirzel <hannes.hirzel@gmail.com> wrote: On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote: > On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel > <alexandre.bergel@me.com>wrote: > >> Would be great to have: 'ConfigurationOfRoassal' chopCamel => >> #('Configuration' 'Of' 'Roassal'). >> > > 'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b > isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal') > > It's too trivial, surely.
Nice piece of code. Not sure if it is too trivial.
I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method.
--Hannes
> > >> >> Alexandre >> >> >> On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> >> wrote: >> >> > Hi to all, >> > >> > As you may know I'm working on in some improvements for the String >> class. Until now I implemented some missing tests. Right now I'm looking >> forward to add new methods that could be useful based on Ruby API ( >> http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the >> methods that I'm planning to implement: >> > >> >    * chomp(separator=$/) -> new_str >> >    * chop() -> new_str >> >    * ljust(integer, padstr='') ->new_str >> >    * next -> new_str >> >    * partition(sep) -> [head, sep, tail] >> > >> > Could you help to find out if these methods are already available for >> the String class? >> > >> > If you have any idea of new methods for the string class, will be >> > really >> welcome. >> > >> > -- >> > Cheers, >> > Daniela Meneses >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> > > > -- > best, > Eliot >
-- www.tudorgirba.com
"Every thing has its own flow"
Sent from my iPhone
On Jul 30, 2015, at 2:05 PM, Levente Uzonyi <leves@elte.hu> wrote:
Erm. Eliot added these methods to Squeak in 2012.
Right. I reimplemented Travis Griggs original from VisualWorks.
Levente
On Thu, 30 Jul 2015, Tudor Girba wrote:
Indeed, it's a new addition to Pharo (originally developed in Moose). Doru On Thu, Jul 30, 2015 at 10:32 PM, H. Hirzel <hannes.hirzel@gmail.com> wrote: On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote: > On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel > <alexandre.bergel@me.com>wrote: > >> Would be great to have: 'ConfigurationOfRoassal' chopCamel => >> #('Configuration' 'Of' 'Roassal'). >> > > 'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b > isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal') > > It's too trivial, surely.
Nice piece of code. Not sure if it is too trivial.
I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method.
--Hannes
> > >> >> Alexandre >> >> >> On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> >> wrote: >> >> > Hi to all, >> > >> > As you may know I'm working on in some improvements for the String >> class. Until now I implemented some missing tests. Right now I'm looking >> forward to add new methods that could be useful based on Ruby API ( >> http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the >> methods that I'm planning to implement: >> > >> > * chomp(separator=$/) -> new_str >> > * chop() -> new_str >> > * ljust(integer, padstr='') ->new_str >> > * next -> new_str >> > * partition(sep) -> [head, sep, tail] >> > >> > Could you help to find out if these methods are already available for >> the String class? >> > >> > If you have any idea of new methods for the string class, will be >> > really >> welcome. >> > >> > -- >> > Cheers, >> > Daniela Meneses >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> > > > -- > best, > Eliot > -- www.tudorgirba.com "Every thing has its own flow"
Indeed. I just checked. We ported it to Pharo when we moved Moose from VW around 2008/2009 :). My bad. Cheers, Doru On Fri, Jul 31, 2015 at 5:33 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Sent from my iPhone
On Jul 30, 2015, at 2:05 PM, Levente Uzonyi <leves@elte.hu> wrote:
Erm. Eliot added these methods to Squeak in 2012.
Right. I reimplemented Travis Griggs original from VisualWorks.
Levente
On Thu, 30 Jul 2015, Tudor Girba wrote:
Indeed, it's a new addition to Pharo (originally developed in Moose). Doru On Thu, Jul 30, 2015 at 10:32 PM, H. Hirzel <hannes.hirzel@gmail.com>
wrote:
On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote: > On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel > <alexandre.bergel@me.com>wrote: > >> Would be great to have: 'ConfigurationOfRoassal' chopCamel => >> #('Configuration' 'Of' 'Roassal'). >> > > 'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase
and: [b
> isUppercase]] an OrderedCollection('Configuration' 'Of'
'Roassal')
> > It's too trivial, surely.
Nice piece of code. Not sure if it is too trivial.
I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method.
--Hannes
> > >> >> Alexandre >> >> >> On Feb 24, 2014, at 2:30 PM, Daniela Meneses <
daniela11290@gmail.com>
>> wrote: >> >> > Hi to all, >> > >> > As you may know I'm working on in some improvements for the
String
>> class. Until now I implemented some missing tests. Right now
I'm looking
>> forward to add new methods that could be useful based on Ruby
API (
>> http://www.ruby-doc.org/core-2.1.0/String.html). These are a
few of the
>> methods that I'm planning to implement: >> > >> > * chomp(separator=$/) -> new_str >> > * chop() -> new_str >> > * ljust(integer, padstr='') ->new_str >> > * next -> new_str >> > * partition(sep) -> [head, sep, tail] >> > >> > Could you help to find out if these methods are already
available for
>> the String class? >> > >> > If you have any idea of new methods for the string class,
will be
>> > really >> welcome. >> > >> > -- >> > Cheers, >> > Daniela Meneses >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> > > > -- > best, > Eliot > -- www.tudorgirba.com "Every thing has its own flow"
-- www.tudorgirba.com "Every thing has its own flow"
Sent from my iPhone
On Jul 30, 2015, at 1:34 PM, Tudor Girba <tudor@tudorgirba.com> wrote:
Indeed, it's a new addition to Pharo (originally developed in Moose).
piecesCutWhere: is by Travis Griggs and comes from VisualWorks
Doru
On Thu, Jul 30, 2015 at 10:32 PM, H. Hirzel <hannes.hirzel@gmail.com> wrote: On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Nice piece of code. Not sure if it is too trivial.
I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method.
--Hannes
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
-- www.tudorgirba.com
"Every thing has its own flow"
Where are the String extension packages available which were mentioned? 1. Olivier Auverlot has all kind of string distance. 2. Hernan Morales has also a package extending string. 3. ... more? On 7/30/15, H. Hirzel <hannes.hirzel@gmail.com> wrote:
On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely.
Nice piece of code. Not sure if it is too trivial.
I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method.
--Hannes
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
I did not know but looking around I found - http://smalltalkhub.com/#!/~olivierauverlot/Phonetix - http://smalltalkhub.com/#!/~hernan/StringExtensions Stef Le 30/7/15 22:34, H. Hirzel a écrit :
Where are the String extension packages available which were mentioned?
1. Olivier Auverlot has all kind of string distance. 2. Hernan Morales has also a package extending string. 3. ... more?
On 7/30/15, H. Hirzel <hannes.hirzel@gmail.com> wrote:
On 2/24/14, Eliot Miranda <eliot.miranda@gmail.com> wrote:
On Mon, Feb 24, 2014 at 12:29 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
'ConfigurationOfRoassal' piecesCutWhere: [:a :b| a isLowercase and: [b isUppercase]] an OrderedCollection('Configuration' 'Of' 'Roassal')
It's too trivial, surely. Nice piece of code. Not sure if it is too trivial.
I have never seen #piecesCutWhere before. It is not in Cuis and Squeak. Must be a new Pharo method.
--Hannes
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement: * chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class? If you have any idea of new methods for the string class, will be really welcome. -- Cheers, Daniela Meneses -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- best, Eliot
This exists already in CollectionExtensions: 'ConfigurationOfRoassal' piecesCutWhereCamelCase ==> an OrderedCollection('Configuration' 'Of' 'Roassal') Doru On Mon, Feb 24, 2014 at 9:29 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Would be great to have: 'ConfigurationOfRoassal' chopCamel => #('Configuration' 'Of' 'Roassal').
Alexandre
On Feb 24, 2014, at 2:30 PM, Daniela Meneses <daniela11290@gmail.com> wrote:
Hi to all,
As you may know I'm working on in some improvements for the String class. Until now I implemented some missing tests. Right now I'm looking forward to add new methods that could be useful based on Ruby API ( http://www.ruby-doc.org/core-2.1.0/String.html). These are a few of the methods that I'm planning to implement:
* chomp(separator=$/) -> new_str * chop() -> new_str * ljust(integer, padstr='') ->new_str * next -> new_str * partition(sep) -> [head, sep, tail]
Could you help to find out if these methods are already available for the String class?
If you have any idea of new methods for the string class, will be really welcome.
-- Cheers, Daniela Meneses
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com "Every thing has its own flow"
participants (16)
-
Alexandre Bergel -
btc@openinworld.com -
Camillo Bruni -
Carlo -
Daniela Meneses -
Eliot Miranda -
H. Hirzel -
Hernán Morales Durand -
Levente Uzonyi -
Norbert Hartl -
Pharo4Stef -
phil@highoctane.be -
Ron Teitelbaum -
Sebastian Sastre -
stepharo -
Tudor Girba