Re: [Pharo-users] SpecColumnLayout not behaving as expected

2017-10-18 Thread Steven R. Baker
You're right. Reformatted as one line it looks *way* more obvious.

Thanks!

-Steven


On 18/10/17 10:45, Peter Uhnák wrote:
> Try to think about is going on in the code, because then it is obvious
> (I hope).
> For example you do the following:
>
> column add: #sideBar; add:#listView.
>
> why do you think that adding items to a column would create columns?
> In Spec, one add:s rows to column, and columns to row.
>
> If people are going to get regularly stack on this, we can certainly
> change it.
>
> Peter
>
>
> On Tue, Oct 17, 2017 at 10:23 PM, Steven R. Baker
> mailto:ste...@stevenrbaker.com>> wrote:
>
> Oh!
>
> I remember fighting with this last week too. Am I the only who who
> struggled with that? If not, perhaps we could call #add: #addRow: ?
>
> -Steven
>
>
>
> On 17/10/17 18:00, Peter Uhnák wrote:
>> Because it is the other way around: in the block ([ :col | ... ])
>> you are describing the content of the column.
>>
>> So what you are actually doing is you create a Column
>> (SpecColumnLayout), inside which you create another column
>> (newColumn), and to that column you add two rows (add:, add:).
>>
>> On Tue, Oct 17, 2017 at 4:32 PM, Steven R. Baker
>> mailto:ste...@stevenrbaker.com>> wrote:
>>
>> Heya folks,
>>
>> I'm sure I'm doing something wrong, I just don't know what it is.
>>
>> I have the following:
>>
>> defaultSpec
>>     ^ SpecColumnLayout composed
>>         newColumn: [ :col |
>>             col
>>                 add: #sideBar;
>>                 add: #listView ];
>>         yourself
>>
>> In the resulting window, I get the widgets stacked one on top
>> of the
>> other, and I expected them to be next to each other (two
>> columns in a row.)
>>
>> What am I missing?
>>
>> Thanks!
>>
>> -Steven
>>
>>
>>
>
>



Re: [Pharo-users] SpecColumnLayout not behaving as expected

2017-10-17 Thread Steven R. Baker
Oh!

I remember fighting with this last week too. Am I the only who who
struggled with that? If not, perhaps we could call #add: #addRow: ?

-Steven



On 17/10/17 18:00, Peter Uhnák wrote:
> Because it is the other way around: in the block ([ :col | ... ]) you
> are describing the content of the column.
>
> So what you are actually doing is you create a Column
> (SpecColumnLayout), inside which you create another column
> (newColumn), and to that column you add two rows (add:, add:).
>
> On Tue, Oct 17, 2017 at 4:32 PM, Steven R. Baker
> mailto:ste...@stevenrbaker.com>> wrote:
>
> Heya folks,
>
> I'm sure I'm doing something wrong, I just don't know what it is.
>
> I have the following:
>
> defaultSpec
>     ^ SpecColumnLayout composed
>         newColumn: [ :col |
>             col
>                 add: #sideBar;
>                 add: #listView ];
>         yourself
>
> In the resulting window, I get the widgets stacked one on top of the
> other, and I expected them to be next to each other (two columns
> in a row.)
>
> What am I missing?
>
> Thanks!
>
> -Steven
>
>
>



[Pharo-users] SpecColumnLayout not behaving as expected

2017-10-17 Thread Steven R. Baker
Heya folks,

I'm sure I'm doing something wrong, I just don't know what it is.

I have the following:

defaultSpec
    ^ SpecColumnLayout composed
        newColumn: [ :col |
            col
                add: #sideBar;
                add: #listView ];
        yourself

In the resulting window, I get the widgets stacked one on top of the
other, and I expected them to be next to each other (two columns in a row.)

What am I missing?

Thanks!

-Steven




[Pharo-users] Can't find Cairo

2017-10-08 Thread Steven R. Baker
Heya,

I need some help telling Pharo where to find things. I've installed Bloc
into my image, and it can't find cairo. Cairo is installed, but as far
as I can tell Bloc is not looking for it in /usr/lib/x86_64-linux-gnu/
which is where it can be found.

I don't care to go making symlinks around my system: is there a sensible
way to tell Pharo where to find libcairo?

Thanks!

-Steven





[Pharo-users] FocusFrog

2017-10-07 Thread Steven R. Baker
Hey all!

Thanks for the help on all of my little issues. I've been plugging away
at FocusFrog, my application for Getting Things Done.  I have pushed the
current code (mostly UI stuff in there just now) to GitLab:
https://gitlab.com/srbaker/FocusFrog

I am not sure how to manage projects, or even how someone goes about
importing this stuff. If anyone of you cares to pull that down and
provide suggestions, I will be more than happy to take them! Currently,
I'm fixing up the view switching when you click the sidebar buttons, and
improving the task item views.

Is there a document somewhere about how you're supposed to publish
things for Pharo? I'd like to make sure this follows the "established
best practices."

Cheers!

-Steven





Re: [Pharo-users] FileReference#entries caching?

2017-10-07 Thread Steven R. Baker


On 07/10/17 14:22, Peter Uhnák wrote:
> On Sat, Oct 7, 2017 at 1:02 PM, Steven R. Baker
> mailto:ste...@stevenrbaker.com>> wrote:
>
> Is it cached or something? How do I guarantee that I'm *definitely*
> getting the current state of the directory on disk? 
>
>
> This looks extremely strange, I've never seen that inspecting
> files/directories would be somehow "out of sync" with the disk,
> because it is always asking the disk.
>
>
>
> Should I not even be using FileReference for this?
>
>
> If you are loading png icons into Pharo, you can consider
> using https://github.com/peteruhnak/IconFactory/ instead (shameless
> self promotion :) )

Will definitely switch to this; I wasn't aware of the pattern, but
obviously I want to follow them where possible. :)

> Peter



[Pharo-users] FileReference#entries caching?

2017-10-07 Thread Steven R. Baker
Heya folks,

I'm loading some PNG icons from disk, and I'm noticing some weirdness
with FileReference#entries.

When I inspect: '/home/srbaker/Projects/FocusFrog/icons' asFileReference
entries it gives me an Array of size one, containing the refernce to the
only file there. Then I delete the file, the same thing gives an array
of size zero.

But then when I fill the directory with a bunch of icons (240, to be
exact), and inspect that line again I get zero. Eventually it gets the
right answer.

Is it cached or something? How do I guarantee that I'm *definitely*
getting the current state of the directory on disk? Should I not even be
using FileReference for this?

Thanks!

-Steven





[Pharo-users] SVG Icons

2017-10-05 Thread Steven R. Baker
Heya folks!

I need to load SVG images (for icons) in my application. I've searched
my 6.1 image for SVG, but haven't found anything.

Is there a library for loading SVGs? I'd really like to get them
directly into instances of Form if possible, but I'm flexible. :)

Thanks!

-Steven





Re: [Pharo-users] Pharo Launcher Source

2017-10-03 Thread Steven R. Baker


On 03/10/17 21:51, Sven Van Caekenberghe wrote:
>
>> On 3 Oct 2017, at 21:30, Steven R. Baker  wrote:
>>
>> Heya,
>>
>> I'm trying to build a Pharo Launcher of my own, but I can't find the
>> code. This says it's on SmalltalkHub:
>> https://github.com/pharo-project/pharo-launcher, but the link doesn't
>> show anything.
> As it says there: http://www.smalltalkhub.com/#!/~Pharo/PharoLauncher
Sigh. Apologies. I had an overzealous blocker. :(

Thanks!

-Steven

>> I tried looking on CI for the build script, but I can't find the build
>> script, just build results. What I'm looking for is how to check out,
>> build, and run Pharo Launcher from scratch. Can someone help me with this?
>>
>> Thanks!
>>
>> -Steven
>>
>>
>>
>




[Pharo-users] Pharo Launcher Source

2017-10-03 Thread Steven R. Baker
Heya,

I'm trying to build a Pharo Launcher of my own, but I can't find the
code. This says it's on SmalltalkHub:
https://github.com/pharo-project/pharo-launcher, but the link doesn't
show anything.

I tried looking on CI for the build script, but I can't find the build
script, just build results. What I'm looking for is how to check out,
build, and run Pharo Launcher from scratch. Can someone help me with this?

Thanks!

-Steven





Re: [Pharo-users] Organisation and workflows

2017-10-02 Thread Steven R. Baker


On 02/10/17 15:28, Esteban Lorenzano wrote:
>> On 2 Oct 2017, at 15:12, Stephane Ducasse  wrote:
>>
>> I discussed with esteban sooner this summer and we really want to have a 
>> process
>> where people can deploy applications and not just code.
>> Now we are not yet there.
>>
>> Stef
>>
>> On Sun, Oct 1, 2017 at 9:03 PM, Steven R. Baker  
>> wrote:
>>> Heya folks,
>>>
>>> [Please jump on any of my statements that sound crazy: use of Spec,
>>> other assumptions, etc.]
>>>
>>> I'm starting an application in Pharo, using Spec. Basically, a GTD
>>> application in the spirit of nirvanahq, omnifocus, things, nozbe. The
>>> code is working just fine, but I'm left with a lot of questions about
>>> how to organize it.
>>>
>>> First, is there some trick to managing images? Are people using
>>> one-per-project, or one-per-computer? All of the above? Anyone using
>>> PharoLauncher these days? Other tools?
> pharo users tend to prefer one-per-project approach :)
> most people uses (or should use) pharo launcher. In fact, we want to make it 
> the default download, is just that to get it right is complicated :)
>
> but… pharo launcher is to developers. A final app would require other stuff 
> to be accomplished (like closing development tools, etc.).
>
>>> I'm assuming that the current state of the art is Iceberg; where can I
>>> find a "This is how you should organize your project using Iceberg"
>>> document, blog, book, tutorial, video, or otherwise.
> beware: Iceberg is a cvs (like Monticello or git or svn…): it is use to store 
> code, not to organise your project. 
> To organise your project you have Metacello.
>
>>> Once the application is done, I assume I'll want to ship it in a minimal
>>> Pharo image. Is there documentation or prior art on this?
> this is what is hard :)
> I imagine with the headless VMs we are about to finish it will be easier (to 
> just initiate a window with your app, instead initiate a window with the full 
> world as now). 
> but we still require some work.
>
>>> Finally, is there a way to run and capture keybindings globally? I have
>>> one part of my application (a quick-entry window) which I want summoned
>>> from a global (OS-wide) hotkey. Has this been done before? Or is it not
>>> easy to break the fourth wall, so to speak, and register a global
>>> keybinding from inside the VM?
> there is a keybindings framework inside pharo, but since you have a lot of 
> development tools, it becomes hard to use (again, something that can be 
> solved in the near future, with same approach as before, but not yet). 
> now, to get the keybindings of the system you will need to install that *in* 
> the system. 
>
> for mac, for example, you can doit using the ObjC bridge (which does not 
> works in 64bit images... I’m working on a UFFI replacement, but… guess what? 
> not yet :P)
> and I guess using UFFI you can get that to work on windows and linux? I’m 
> really don’t know.
>
> all you ask is *doable*… but not all your requirements are *easily* doable 
> right now, which is want I want to fix :)
I don't mind contributing code and time on these things, as they present
real barriers to me. I'm looking for ways to get involved in the
community again. :)

-Steven

> Esteban
>
>>> Thanks!
>>>
>>> -Steven
>>>
>>>
>>>
>




[Pharo-users] Organisation and workflows

2017-10-01 Thread Steven R. Baker
Heya folks,

[Please jump on any of my statements that sound crazy: use of Spec,
other assumptions, etc.]

I'm starting an application in Pharo, using Spec. Basically, a GTD
application in the spirit of nirvanahq, omnifocus, things, nozbe. The
code is working just fine, but I'm left with a lot of questions about
how to organize it.

First, is there some trick to managing images? Are people using
one-per-project, or one-per-computer? All of the above? Anyone using
PharoLauncher these days? Other tools?

I'm assuming that the current state of the art is Iceberg; where can I
find a "This is how you should organize your project using Iceberg"
document, blog, book, tutorial, video, or otherwise.

Once the application is done, I assume I'll want to ship it in a minimal
Pharo image. Is there documentation or prior art on this?

Finally, is there a way to run and capture keybindings globally? I have
one part of my application (a quick-entry window) which I want summoned
from a global (OS-wide) hotkey. Has this been done before? Or is it not
easy to break the fourth wall, so to speak, and register a global
keybinding from inside the VM?

Thanks!

-Steven





Re: [Pharo-users] HiDPI

2017-05-16 Thread Steven R. Baker
I would be happy to help, I just don't know where to get started.

-Steven


On 16/05/17 18:01, Tim Mackinnon wrote:
> I raised a similar thing with a new MacBook Pro a few months ago - currently 
> Pharo is blurry and I also find it quite jolting moving from apps like Chrome 
> or IntelliJ to a slightly fuzzier Pharo.
>
> Unfortunately - this isn’t an easy fix as it seems like the solution is tied 
> to Bloc. I believe progress is moving forward with Bloc, but I’m keen to hear 
> at Pharo days if there is some way to move higher res screen implications 
> forward as well.
>
> I know many current Pharo developers either have lower res screens, or have 
> just got used to it (I’m not finding I’m getting used to it) - but more 
> importantly it makes it very difficult for me to show new developers how cool 
> Pharo is as they all comment that it looks funny compare to their other tools.
>
> Of course, its open source, and we can all chip in - unfortunately this one 
> seems like it needs quite specialised knowledge - but I think the desire is 
> there.
>
> Tim
>
>> On 15 May 2017, at 17:52, Steven R. Baker  wrote:
>>
>> Heya folks,
>>
>> I have a laptop with a 3K screen. Is it possible to tell Pharo to render
>> everything at a double resolution or something? I feel like this ought
>> to have been a solved problem already, sorry if it's really obvious and
>> I just haven't found it.
>>
>> I use Debian if that matters; I suspect this just works out of the box
>> on Macs.
>>
>> Cheers!
>>
>> -Steven
>>
>>
>




[Pharo-users] HiDPI

2017-05-15 Thread Steven R. Baker
Heya folks,

I have a laptop with a 3K screen. Is it possible to tell Pharo to render
everything at a double resolution or something? I feel like this ought
to have been a solved problem already, sorry if it's really obvious and
I just haven't found it.

I use Debian if that matters; I suspect this just works out of the box
on Macs.

Cheers!

-Steven




Re: [Pharo-users] Smalltalkers will, eventually, win. So says this old C++ programmer.

2017-05-09 Thread Steven R. Baker
> I think he forgets to mention Haskell, which is probably the reason
> behind the shift of Swift towards optional values (Option type in
> Scala, Maybe type in Haskell). You can't talk about modern type system
> without talking about Haskell, Monads and Algebraic Data Types (Maybe
> is a monad).
>
> I don't believe the future is dynamic typing, I believe it is type
> inference and optional typing. There is no need to be radical about
> it. One great sadly forgotten example of this is Strongtalk, which was
> rumored to be the fastest implementation of Smalltalk ever made (I
> don't know how it compares to the latest Pharo VM, though) and
> included an optional strong type system
I talked to some folks about Strongtalk at StS a few years back, and
they told me that in order to achieve the speed improvements, they had
to throw away type information. Basically, they tried to prove that
static typing was faster, and proved the opposite.

I'd like to have that confirmed; it would challenge "conventional
wisdom" on static typing.

-Steven


> (http://www.strongtalk.org/). Strongtalk team was bought by Sun before
> they could release the language and their advancements in virtual
> machine development were taken by the Java Virtual Machine. It is one
> of my dreams to see Strongtalk back into action or maybe a version of
> Self with optional typing, but I unfortunately lack the required
> skills and time to do so. 
>
> 2017-05-09 10:26 GMT-03:00 Ben Coman  >:
>
> Fantastic article.  Very well rounded.  I particularly liked
> "Meanwhile the Smalltalk programmers were scratching their heads
> wondering what the big deal was. You see, their language was also
> strongly typed; but their types were undeclared. In Smalltalk
> types were enforced at runtime."
>
> and..."You see, the Smalltalk programmers had solved the missile
> problem in their own unique way. They invented a discipline. Today
> we call that discipline: Test Driven Development. ...  You see,
> when a Java programmer gets used to TDD, they start asking
> themselves a very important question: “Why am I wasting time
> satisfying the type constraints of Java when my unit tests are
> already checking everything?” 
>
> cheers -ben
>
> On Tue, May 9, 2017 at 2:49 PM, askoh  > wrote:
>
> This is a quote from Bob Martin of "Clean Code" fame. Enjoy,
> Aik-Siong Koh
>
> http://blog.cleancoder.com/uncle-bob/2016/05/01/TypeWars.html
> 
>
>
>
> --
> View this message in context:
> 
> http://forum.world.st/Smalltalkers-will-eventually-win-So-says-this-old-C-programmer-tp4945895.html
> 
> 
> Sent from the Pharo Smalltalk Users mailing list archive at
> Nabble.com.
>
>
>