Re: [Pharo-users] Iceberg: Code directory missing

2017-12-11 Thread Prof. Andrew P. Black
> On 12 Dec 2017, at 03:17 , Evan Donahue wrote: > > Hi, > > I'm trying to push a local project to github via iceberg. I just pulled the > stable 70 threaded image & vm pair (70+vmT) and tried to follow the > instructions on the iceberg github page, but after successfully cloning the > new e

Re: [Pharo-users] Behold Pharo: The Modern Smalltalk

2017-12-09 Thread Prof. Andrew P. Black
> On 9 Dec 2017, at 07:44 , Dimitris Chloupis wrote: > > Making shortcuts in Pharo is no big deal, if 10% of people asking for Emacs > or vim shortcuts bothered creating just 10 shortcuts each we would have by > now at least 100 Emacs shortcuts in Pharo. When one say that needs something > th

[Pharo-users] Building a Baseline

2017-12-04 Thread Prof. Andrew P. Black
In the baseline configuration of my project, it says spec baseline: 'SmaCC' with: [ spec repository: 'github://apblack/SmaCC:working' ]. Later, I have a parser that depends on 'SmaCC'. However, when I load my baseline, it seems to

Re: [Pharo-users] Problem loading image after changing resolution from 4Kto HD

2017-12-01 Thread Prof. Andrew P. Black
> On 1 Dec 2017, at 20:31 , Ted F.A. van Gaalen wrote: > > Could it be that some logic within Pharo does not handle > resolution changes correctly? In Pharo 7, I sometimes — but not always — get crashes when I switch from the built-in display on my laptop to a large desktop monitor. Going fro

[Pharo-users] Simplifying a File reference

2017-12-01 Thread Prof. Andrew P. Black
I have a file reference containing multiple occurrences of .., like this File @ /Users/black/graceProgs/lists/../../Development/mg/gracelang/albums_junk.grace How do I simplify this to show the simpler path without the .. ? There should be a method on FileReference, no? Something like #normal

Re: [Pharo-users] I love the launcher!!!!

2017-11-29 Thread Prof. Andrew P. Black
> On 23 Nov 2017, at 12:56 , Herby Vojčík wrote: > > Pardon my question, I have downloaded it and looked at it, but I don't get > it. What does it do / what are the use cases (honest question)? I also was completely confused by what the launcher was for. And when I tried it, it did not seem

[Pharo-users] Using a TreePresenter

2017-11-27 Thread Prof. Andrew P. Black
I'm trying to use a (subclass of a) TreePresenter that is populated with FileReferences. I see that the current selection is, reasonably enough, a TreeNodePresenter, so I'm assuming that to set a selection programatically, I'm going to have to find the right TreeNodePresenter. So I've assumed

Re: [Pharo-users] Why does the test runner show red when I correct a test?

2017-11-21 Thread Prof. Andrew P. Black
While we are discussing colors, what should we do about a test that does not make any assertions at all? A couple of years ago, a smart student who was working on a testing dialect for me decided that such tests should be in a new category all of their own. Later I simplified things and just m

Re: [Pharo-users] Catching EOF in SmaCC

2017-11-17 Thread Prof. Andrew P. Black
> On 17 Nov 2017, at 14:10 , Thierry Goubier wrote: > > > there is an 'E O F' token generated by SmaCC; I haven't tried to use it in a > parser yet. I tried patching the tokenActions table to trap on this, but the token id for E O F is outside of the range of the table. The Python example

[Pharo-users] Catching EOF in SmaCC

2017-11-17 Thread Prof. Andrew P. Black
Is there a way, in SmaCC, or either - writing a grammar production that involves EOF (end of file) - or, writing a scanner action that is executed when EOF is read. Andrew

Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-17 Thread Prof. Andrew P. Black
> On 17 Nov 2017, at 08:49 , Peter Uhnák wrote: > > I find the concept of translating TZ of a Date silly. The real bug imho > should be that it prints both time and TZ this is Date, not DateAndTime. > I live in Oregon, and frequently work with people in New Zealand, which is (depending o

Re: [Pharo-users] Stream API

2017-11-16 Thread Prof. Andrew P. Black
> On 14 Nov 2017, at 16:49 , Denis Kudriashov wrote: > > > squares := (1 to: 1000) ~> #squared map ~> 1000 take ~> Set. > fileIn readStream ~> #isSeparator filter ~> fileOut writeStream. I’ve actually done something very similar for collections in Grace, except that I use >> as the operator s

Re: [Pharo-users] Stream API

2017-11-15 Thread Prof. Andrew P. Black
> On 14 Nov 2017, at 14:07 , Sven Van Caekenberghe wrote: > > I am curious though, why do you need it ? > > I mean, I got away (and try hard) to only use 1-element peeking and managed > to implement STON, NeoJSON, NeoCSV, Stomp, PostgresSQL, Redis, and other > protocols. > > A syntax that re

Re: [Pharo-users] Why does the test runner show red when I correct a test?

2017-11-15 Thread Prof. Andrew P. Black
> On Nov 15, 2017, at 08:30, Richard Sargent > wrote: > > I would say that is an entirely different question You are right: this is a different scenario. But the suggested fix sounds like a good one to me. After editing a test, even in the debugger, it makes sense to run the test (again?)

Re: [Pharo-users] Stream API

2017-11-14 Thread Prof. Andrew P. Black
> On 13 Nov 2017, at 20:27 , Sven Van Caekenberghe wrote: > > There is a discussion about positioning (#position , #position: and related) > but these cannot be supported _in general_ by the kind of streams described > above. I agree with that. But I think that general streams can, and shoul

[Pharo-users] Iterating through two collections in parallel

2017-11-14 Thread Prof. Andrew P. Black
What method will execute a two-parameter block with corresponding pairs of elements from two separate Ordered Collections. something like this example: #(1 2 3) and: 'abc' do: [ :aNumber :aLetter | do something first with 1 and $a,

Re: [Pharo-users] Peeking at a stream

2017-11-13 Thread Prof. Andrew P. Black
> On 2 Nov 2017, at 10:10 , Guillermo Polito wrote: > > My first hunch is that you don't want to change PositionableStream. Because > it works on collections and files (because of inheritance). But not on other > kind of streams that are not part of the hierarchy, such as sockets. And we > ar

Re: [Pharo-users] perspective request for those earningalivingfromSmalltalk

2017-11-10 Thread Prof. Andrew P. Black
> On 6 Nov 2017, at 21:00 , Andrew Glynn wrote: > > Btw, did Self ever work? At all? The last I remember it was in a similar > state to Electron without the M$ adds in Visual Studio, i.e. the samples from > the site don’t build. Self worked fine. It was a bit memory-hungry on the machines

[Pharo-users] Adding an Iceberg repository at startup

2017-11-10 Thread Prof. Andrew P. Black
I would like to have the git repositories that I’m working from automatically added to the list of known repositories in Iceberg at startup time. In other words, I don;t want to have to do a bunch of “Add local repository” commands before I can start work. What magic can I put in my settings.s

Re: [Pharo-users] Binary Decision Diagram Package in Smalltalk

2017-11-07 Thread Prof. Andrew P. Black
> On 28 Oct 2017, at 17:37 , Steffen Märcker wrote: > > Does that mean the sets/bdd would be constructed mainly at comile time? > Anyway, Andrew, feel free to contact me, I might help you with this. > Thanks for the offer, Steffen! The problem is that I need to use SmaCC for my current proj

[Pharo-users] Peeking at a stream

2017-11-02 Thread Prof. Andrew P. Black
I sometimes find, when working with a stream, that I need to "peek ahead” a few items, without disturbing the state of the stream. The message stream peek gives me the next item, but doesn’t generalize to multiple items, So I end up writing code like this: findSomething | savedPos

Re: [Pharo-users] Binary Decision Diagram Package in Smalltalk

2017-10-26 Thread Prof. Andrew P. Black
e about BDD (but I thought it was special > binary trees) so this is probably the same. > Did you check on Squeaksource? > http://www.squeaksource.com/BTree.html > If this is what you are looking for I can help porting it to Pharo. > > Stef > > > On Wed, Oct 25, 2017 at 9:02

[Pharo-users] Binary Decision Diagram Package in Smalltalk

2017-10-25 Thread Prof. Andrew P. Black
Does anyone know of a BDD — that’s Binary Decision Diagram — package written in Smalltalk? Andrew

Re: [Pharo-users] Dynamically changing code in a safe way

2017-10-24 Thread Prof. Andrew P. Black
> On 24 Oct 2017, at 22:48 , Peter Uhnák wrote: > > > Why the assignment of the new code is delayed until the end of the bloc > > execution? > > The assignment is performed immediately, but the old code is still being > executed. Once the value was sent to the block, the block started execut

Re: [Pharo-users] Dynamically changing code in a safe way

2017-10-24 Thread Prof. Andrew P. Black
> On 23 Oct 2017, at 23:12 , Richard Sargent > wrote: > > Imagine if I were to hand you a loaf of bread and tell you to feed it to the > dog. If I were then to hand you another loaf of bread, the dog would continue > eating the first loaf. We never told the dog to do anything else. If your

[Pharo-users] String >> #asSet

2017-10-23 Thread Prof. Andrew P. Black
If you have a String (or a Symbol), and you sent it the message #asSet, what do you expect to get as an answer? A set of characters, one would think. But do you care what class is used to implement that set of characters? -- One argument says that it should be a Set, because that’s what asSet

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread Prof. Andrew P. Black
> On 18 Oct 2017, at 08:32 , James Ladd wrote: > > What if accessors were generated but not mutators? > The point is that, once a method exists, there is not way to restrict who can send a message that will execute it. So if one were forces to generate a reader method, or a writer method, j

Re: [Pharo-users] Equals and HashCode Builder

2017-10-02 Thread Prof. Andrew P. Black
> On 2 Oct 2017, at 16:37 , Sean P. DeNigris wrote: > > 2. #hash > ^ var1 hash bitXor: (var2 hash bitXor: var3 hash) > Is this implementation always safe? It's what I usually hand roll based on > what I've seen, but Andres Valloud wrote a whole (large) book on hashing, so > I've always wo

Re: [Pharo-users] Testing a Unicode Character's Category

2017-10-01 Thread Prof. Andrew P. Black
Richard (and others): Marcus and I committed methods to implement these category tests on Friday. If any of you have time to review the code, it would be appreciated. The commit can be found here: https://github.com/pharo-project/pharo/pull/326/commits/933b1dcba05b837ab292e19aab413f67b3f9

Re: [Pharo-users] Testing a Unicode Character's Category

2017-09-26 Thread Prof. Andrew P. Black
Hi Richard, Normally I agree with you, and prefer boolean methods inCatagoryCc: aChar isCategorySm: aChar to categoryOf: aChar == #Cc categoryOf: aChar == #Sm In this particular case, though, the category codes are part of the Unicode Standard, so perhaps expos

[Pharo-users] Testing a Unicode Character's Category

2017-09-25 Thread Prof. Andrew P. Black
The Pharo image has a table of Unicode Character Categories in a class variable GeneralCategory of class Unicode. But there do not seem to be many methods to interpret this data. For example, while there is a method Unicode class >> #isDigit: aCharacter that checks if the Unicode cate