Re: [Pharo-users] Help in thinking about how to save a "program"

2017-06-11 Thread K K Subbu
On Monday 12 June 2017 04:52 AM, Glenn Hoetker wrote: I”m crafting a short program to help me process a large text file (specifically: extract, sorting, and regularizing the “keyword” fields of a large BibTex file). Especially since I don’t really know what I’m doing, working in a Playground has

Re: [Pharo-users] Can not save the source file

2017-06-16 Thread K K Subbu
On Friday 16 June 2017 05:38 PM, Marc Hanisch via Pharo-users wrote: -rw-rw-r-- 1 marc marc43775 Jun 9 15:47 PharoDebug.log You may want to check this log for error messages .. Subbu

Re: [Pharo-users] Using the Debugger to write code

2017-07-11 Thread K K Subbu
On Wednesday 12 July 2017 08:33 AM, horrido wrote: But for the life of me, I can't figure out how to create new classes for my application from within the Debugger. Must I create new classes using the System Browser first before I can continue adding new methods from within the Debugger? What's t

Re: [Pharo-users] Using the Debugger to write code

2017-07-12 Thread K K Subbu
On Wednesday 12 July 2017 01:36 PM, Marcus Denker wrote: The compiler knows two modes: “Interactive” and not. So if there is a undeclared var, it will in interactive mode ask the user what to do, but when compiling non-interactively it will just add the var to Undeclared (with a nil value) and co

Re: [Pharo-users] How to calculate someone's age elegantly? Does Duration work?

2017-07-20 Thread K K Subbu
Date>>ageOn: aDate " assert: (self <= aDate) | age | age = aDate year - self year + 1. aDate monthIndex < self monthIndex ifTrue: [ ^age - 1 ]. (aDate monthIndex = self monthIndex and: [aDate dayOfMonth < self dayOfMonth]) ifTrue: [ ^age - 1 ]. ^age HTH .. Subbu On Friday 21 July 2017 05:28 A

Re: [Pharo-users] How to calculate someone's age elegantly? Does Duration work?

2017-07-21 Thread K K Subbu
asses. I'm curious why it's not in there? And would we also expect to find its equivalent on a timespan (maybe delegating back to this date method? This assumes that timespan can be fixed as it loses precision unexpectedly). Thanks for the reply. Tim Sent from my iPhone On 21 Jul 2

Re: [Pharo-users] How to calculate someone's age elegantly? Does Duration work?

2017-07-21 Thread K K Subbu
On 21 Jul 2017, at 10:09, K K Subbu <mailto:kksubbu...@gmail.com>> wrote: ^aDate year - self year - (aDate dayOfYear < self dayOfYear) ifTrue: [ 1 ] ifFalse: [ 0 ])

Re: [Pharo-users] Why do we separate class/instance methods in the browser?

2017-07-22 Thread K K Subbu
On Saturday 22 July 2017 06:51 PM, Tim Mackinnon wrote: The one that stuck out for me (and is actually mentioned in another thread this week) was the class/instance method difference. They conceptually understood the difference coming from other languages but our UI is tricky to understand with

Re: [Pharo-users] Why do we separate class/instance methods in the browser?

2017-07-23 Thread K K Subbu
On Sunday 23 July 2017 08:34 PM, Tim Mackinnon wrote: I find it a straight jacket that we have to click that class button just because we want to write what is effectively a constructor that occurs to us when we are writing an instance method. Its very jarring and breaks your flow to “switch mode

Re: [Pharo-users] Embedded PDF viewer?

2017-11-13 Thread K K Subbu
On Monday 13 November 2017 09:50 AM, Ben Coman wrote: I've managed to build PDFium into a shared library on Ubuntu 16.04. (I'll announce a blog post on this later.) Now I'm considering the best bitmap format to bring the rendered page back into Pharo. Have you considered importing PDFs as a s

Re: [Pharo-users] Embedded PDF viewer?

2017-11-13 Thread K K Subbu
On Monday 13 November 2017 05:29 PM, Ben Coman wrote: Yes, I've certainly considered it.  Pragmatically, in my electrical career I deal with a lot of single page A3 PDF scans of schematic drawings, so pre-converting to a bitmap format outside of Pharo wouldn't lose much. PDF deals with vector

Re: [Pharo-users] Pharo things analog reads ?

2017-12-19 Thread K K Subbu
On Wednesday 20 December 2017 03:50 AM, Steven Costiou wrote: So connecting an Arduino-like device to the raspberry that is configured as an i2c slave, Pharo can ask for analog values. I will try tomorrow with analog sensors, I will share if i manage to build nice examples. Seems to be even easi

Re: [Pharo-users] Pharo 6 snap install

2017-04-12 Thread K K Subbu
On Wednesday 12 April 2017 07:33 PM, Alistair Grant wrote: Hi Everyone, I've made a snap package for Pharo 6 which I think is far enough along for some wider testing. Just tried it now. worked like charm. --classic - Snap packages are normally sandboxed for security reasons.

Re: [Pharo-users] Pharo 6 snap install

2017-04-15 Thread K K Subbu
On Friday 14 April 2017 03:39 PM, Luke Gorrie wrote: - The latest Pharo VM source release is compatible with the latest Pharo image. This is too strong a condition. For the OS, an image is just a filesystem within a file. It is sufficient if the VM does not use the same executable name if it

Re: [Pharo-users] [Ann] Pharo Sprint App to improve coordination during Pharo Sprints

2017-04-23 Thread K K Subbu
On Sunday 23 April 2017 08:43 PM, Juraj Kubelka wrote: As the Pharo Sprint is organized in several places around the world, we miss the connection with other guys. For that reason we decided to move the physical whiteboard to the internet and developed Pharo Sprint App. Excellent idea and a ve

Re: [Pharo-users] [Ann] Pharo Sprint App to improve coordination during Pharo Sprints

2017-04-24 Thread K K Subbu
On Monday 24 April 2017 08:00 PM, Juraj Kubelka wrote: Please, can you send me a screenshot? Or submit the screenshot here https://github.com/JurajKubelka/PharoSprint/issues/new Done. I think the error appears because when a login fails, the message causes a horiz scroll bar to be added to th

Re: [Pharo-users] Windows equivalent of kill -s SIGUSR1?

2017-05-14 Thread K K Subbu
On Monday 15 May 2017 02:47 AM, Alistair Grant wrote: The subject pretty much says it all: Is there an equivalent on Windows to the linux kill -s SIGUSR1 that gets the VM to dump its current status? signals is unix-specific IPC. On Windows, you should be able to "create dump file" from righ

Re: [Pharo-users] is this valid smalltalk

2019-04-04 Thread K K Subbu
On 04/04/19 4:46 PM, Roelof Wobben wrote: Hello, For a challenge of Exercism I need to check if some parenthes and brackets are balanced. so for example ()  = true ([])  = true but (])  is not true because the bracket has no opening bracket. Now I wonder if I can premature end a #do:  like

Re: [Pharo-users] difference between double dispatch and the method explains here

2019-04-06 Thread K K Subbu
On 06/04/19 4:49 PM, Roelof Wobben wrote: Hello, I just learned double dispatch. And now for the Robot challenge of exercism Tim has pointed me to this article(https://blog.metaobject.com/2019/04/accessors-have-message-obsession.html) but I fail to see how the move method looks like in that

Re: [Pharo-users] How do you rotate a morph by degrees

2019-04-25 Thread K K Subbu
On 25/04/19 7:29 PM, Steve Quezadas wrote: I am trying to rotate an instance of a [Transformation morph]. I am sending an "angle:" message, which should work since "angle:" is listed as a method in it's parent class, yet when I sent a message, it claims "it does not understand #angle". Shouldn'

Re: [Pharo-users] Why doesn't the VM command line help show the useful image commands anymore?

2019-04-30 Thread K K Subbu
On 30/04/19 3:35 AM, Tim Mackinnon wrote: Anyway - I tried using the command line on OSX ( I noticed they had used pharo, and not pharo-ui — which I never understood: why is it not pharo for ui and pharo-cmd for terminal, as it burns most people?) - and typed “pharo —help”, and you get an impress

Re: [Pharo-users] Why doesn't the VM command line help show the useful image commands anymore?

2019-04-30 Thread K K Subbu
On 30/04/19 6:14 PM, Tim Mackinnon wrote: Subbu - I didn’t understand your point? How would I know to do pharo -- --list , by looking at the output of —help? (And in fact that doesn’t work on OSX, it prompts me for an image - thus reinforcing my point that the default image doesn’t appear to work

Re: [Pharo-users] Creating a dictionary from a list of associations

2019-05-02 Thread K K Subbu
On 02/05/19 9:14 PM, Konrad Hinsen wrote: | words lengths | words := #('abc' 'defg'). lengths := Dictionary new. words do: [ :each | lengths at: each put: each size ]. Dictionary withKeys: words andValues: (words collect: #size) HTH .. Subbu

Re: [Pharo-users] Creating a dictionary from a list of associations

2019-05-02 Thread K K Subbu
On 02/05/19 9:52 PM, Sven Van Caekenberghe wrote: Dictionary withKeys: words andValues: (words collect: #size) HTH .. Subbu Never saw that one, cool. But it is #newFromKeys:andValues: as far as I can see You're right. I got mixed up. Thanks for the correction .. Subbu

Re: [Pharo-users] Distribution of test method name length

2019-06-20 Thread K K Subbu
Nice graph, Ben! The larger test names (selector size > 100) look more like sentences than names ;-). On 21/06/19 6:50 AM, Ben Coman wrote:    classes := Object allSubclasses select: [ :cc | cc isKindOf: TestCase class ].    methods := c flatCollect: [ :c | c allMethods  ]. Did you mean cl

Re: [Pharo-users] Linux init script

2019-07-10 Thread K K Subbu
On 10/07/19 10:30 PM, Sebastián Filippini wrote: Hello everyone, I'm trying to write a Linux init script for a Pharo application. I'm using a bash script wrapper to launch pharo. This script executes the pharo script provided by get.pharo.org. ./pharo myapp.image start.st & PID=$! echo $PID

Re: [Pharo-users] Why Smalltalk is so easy to evangelize

2020-01-09 Thread K K Subbu
On 10/01/20 12:25 AM, Kasper Østerbye wrote: This rant states once again that in Smalltalk everything is an object. The word 'object' has been bandied about with multiple meanings, so it is understandable that you would challenge this claim. Smalltalk uses the term 'object' with a specific me

Re: [Pharo-users] What is the difference between a form and a morph?

2020-02-23 Thread K K Subbu
On 24/02/20 2:00 AM, Steve Quezadas wrote: [Morph], from what I understand, deals with manipulating graphics on smalltalk. But when I use ZnEasy to get a jpeg file, I notice that it returns a [Form] and not a [Morph] to display a jpeg. Spec2 also wants [Form] for displaying images rather than [

Re: [Pharo-users] What is the difference between a form and a morph?

2020-02-23 Thread K K Subbu
On 24/02/20 10:37 AM, Steve Quezadas wrote: > A Form is a rectangular of pixel. I don't understand. What is a "rectangular of a pixel"? I meant rectangle of pixels. Sorry for the typo. If you want to display a bitmap, you need to know its width x height x depth. This is what a Form provides.

Re: [Pharo-users] Slots vs collections

2020-03-20 Thread K K Subbu
On 20/03/20 4:54 PM, N. Bouraqadi wrote: Hi, Suppose I have an instance variable referencing a collection of booleans. I want to have all elements of the collection be stored as bits. Is there a way I can express it using slots? What do the bits represent? Is there an ordering among these bool

Re: [Pharo-users] Morph Code problem

2020-03-22 Thread K K Subbu
On 22/03/20 11:20 AM, shawon58 wrote: i am new in morph code. so i try this code "Color orange asMorph openInWorld" . in my screen it shows a line but i cant able to close that. screen shot added below. thanks What you are seeing is a StringMorph

Re: [Pharo-users] Pharo IDE - change mouse cursor color/size

2018-01-30 Thread K K Subbu
On Tuesday 30 January 2018 01:06 PM, Norbert Hartl wrote: Am 30.01.2018 um 08:26 schrieb "p...@highoctane.be " >: On Tue, Jan 30, 2018 at 12:12 AM, Torsten Bergmann > wrote: Cursor>>beCursor with Cursor being a Form m

Re: [Pharo-users] Morph & MVC tutorials

2018-06-06 Thread K K Subbu
On Thursday 07 June 2018 03:07 AM, Matias Maretto wrote: Hi guys, I have been doing some things with Dolphin, actually feel very confortable with it, but now I am trying to learn Pharo. I have noticed that many things are quite similars,  but others are very differents, one of this things is th

Re: [Pharo-users] pharo bash script with startup

2018-06-27 Thread K K Subbu
On Wednesday 27 June 2018 01:08 PM, Otto Behrens wrote: I am running with an absolute image path. The issue is definitely exec "$image" in the script. If I remove the "", i.e. exec $image, then it works. The double quotes are required here to skip splitting arguments with embedded spaces into

Re: [Pharo-users] pharo bash script with startup

2018-06-27 Thread K K Subbu
On Wednesday 27 June 2018 06:39 PM, K K Subbu wrote: The double quotes are required here to skip splitting arguments with embedded spaces into different words. I suspect the error is earlier in the image=$@ assignment. This requires double quotes. Double quotes are also required while

Re: [Pharo-users] Naming parameters - conventions?

2018-07-11 Thread K K Subbu
On Thursday 12 July 2018 03:54 AM, Tim Mackinnon wrote: I was taught {“a”/“an”}DataType, so it would be: #name: aString It depends on the current level of abstraction. At the lowest levels, it is okay to use basic types like aString since classes (types) define behavior. If you are operating

Re: [Pharo-users] rotating a morph through messaging

2018-12-31 Thread K K Subbu
On 31/12/18 1:54 AM, Steve Quezadas wrote: I am experimenting with pharo right now, particularly with Morphs. The weird thing is that some morphs can have a rotation halo and others do not. This has a "rotate halo": bar := EllipseMorph new. bar openInWorld. This does not: foo := Morph new. foo

Re: [Pharo-users] [VIDEO TUTORIAL] How to use external code editors to code in Pharo

2019-01-24 Thread K K Subbu
On 24/01/19 4:40 PM, Dimitris Chloupis wrote: Actually not only you can do it, its also very easy. So the following video tutorial explains in the first 3 minutes how to do this and then spends another 10 min talking about how this could be automated to be completely automatic and instantaneous

Re: [Pharo-users] [VIDEO TUTORIAL] How to use external code editors to code in Pharo

2019-01-24 Thread K K Subbu
On 24/01/19 7:23 PM, Sven Van Caekenberghe wrote: Everybody is of course totally free to do whatever they want, but really, why the hell would you want to do that ? Because text has many uses other than just feeding into a compiler for translation to machine code? People who come from Unix/Linux

Re: [Pharo-users] [VIDEO TUTORIAL] How to use external code editors to code in Pharo

2019-01-24 Thread K K Subbu
On 24/01/19 9:47 PM, Sven Van Caekenberghe wrote: On 24 Jan 2019, at 17:04, K K Subbu wrote: On 24/01/19 7:23 PM, Sven Van Caekenberghe wrote: Everybody is of course totally free to do whatever they want, but really, why the hell would you want to do that ? Because text has many uses

Re: [Pharo-users] Why is #findString: in accessing?

2019-02-27 Thread K K Subbu
On 28/02/19 5:23 AM, Richard O'Keefe wrote: It is surprisingly hard to keep categories consistent.  If there is a way to say "here I am browsing method M in category G of class C, is there an ancestor of C that puts the selector of M in a different category?" I would love to know it.  (Adding

Re: [Pharo-users] Interval form: x to: y when x > y - or how to count down...

2019-02-28 Thread K K Subbu
On 28/02/19 6:33 PM, Tim Mackinnon wrote: So I would expect “1 to: 0” to see: 1 -> 1 2 -> 0. It is difficult for code to guess the intent of the coder. Did the coder intend an decreasing sequence or a stopping condition (i == end or i > end?). Perhaps, we could use an explicit selector:

Re: [Pharo-users] Interval form: x to: y when x > y - or how to count down...

2019-03-01 Thread K K Subbu
On 01/03/19 5:35 PM, Sven Van Caekenberghe wrote: I like this too. Why would this not happen ? It is just one selector more. I think the only possible issue is that #to:do: is known by the compiler, which makes it faster than any other iteration, even do: - there is always a tradeoff between re

Re: [Pharo-users] Noob Question - slicing

2019-03-06 Thread K K Subbu
On Wed, 6 Mar 2019 at 12:00, Craig Johnson > wrote: What is the simplest way to copy characters between positions 4 and 8 from a string in Pharo? '1234567890' copyFrom: 5 to: 8 "5678" Page 207 in Updated Pharo by Example book explains more on substrings.

Re: [Pharo-users] Hmmm sending at:put: to an undefined object (nil) gives a confusing error message

2019-03-12 Thread K K Subbu
On 12/03/19 9:25 AM, Richard O'Keefe wrote: Squeak where (20 factorial at: 1) answers 0 (oh dear oh dear oh dear). Richard, Could you please elaborate on why this is an error? Large integers are place value encoded (base 256 little endian) and stored in byte arrays, so they need #at:/#at:put

Re: [Pharo-users] Hmmm sending at:put: to an undefined object (nil) gives a confusing error message

2019-03-13 Thread K K Subbu
On 13/03/19 12:45 PM, Richard O'Keefe wrote: Base 256: that's an implementation detail. Little-endian: that's an implementation detail. Architecture-specific no. Implementation yes. But that should be fine for private methods. My Smalltalk uses base 65536 native-endian and takes some care n

Re: [Pharo-users] eval from the linux commandline

2019-03-24 Thread K K Subbu
On 24/03/19 5:23 AM, test email wrote: i need to eval an object from my linux commandline. I understand that clap-st is able to do this, but I can't seem to import it into pharo7, I suppose because of compatability reasons. Someone sent me this, but I can't seem to replicate the help screen. Is