[Pharo-users] caching proxy for domain data

2023-11-02 Thread Siemen Baader
Hi,

I'm looking for something to hold a cached version of a parsed domain
model, typically from large HTML or CSV files on disk, parsed with
XMLHTTPParser or NeoCSV. Occasionally also JSON and HTML from a web
service. The files are frequently updated, so it should check for this at
least on disk and reload before returning the cached model to the
application.

It's not really difficult to implement and I have several "satisficing"
solutions implemented, but I think it ought to be a common problem so maybe
there is something matured and well abstracted out there. It could
even/also be a design pattern common to industry applications. Have you
seen anything?

cheers
Siemen


[Pharo-users] Re: Personal wiki / information manager

2023-08-12 Thread Siemen Baader
On Fri, Jul 14, 2023 at 4:21 AM  wrote:

> TheProjectProject 
> is the GTD component of my Dynabook project
> . Behind it is about 20 years
> of work incorporating ideas from countless productivity disciplines - GTD,
> Steven Covey, Landmark Education’s Mission Control spin off, etc…
>

Very interesting, I'll check it out! And yes, I agree - it is very helpful
to be able to extend and also automate a productivity system with any
concept from one's life. Very cool that you have extended it with Corey's 7
habits. I have meeting announcements that I'd like to automate across email
and SoMe channels, and recipes, meal planning, online grocery ordering and
bulk cooking. The Dynabook approach sort of legitimates the approach of
evolving such a system yourself as empowering literacy, rather than using a
patchwork of specialized end user applications. I get the impression that
Lisp folks do have an ASCII inspired Dynabook universe with Emacs and
OrgMode. We could ask Nicolas Petton.. I found his Pharo projects to be
extremely creative and well-engineered. Now he is using GTD & OrgMode and
maintaining Emacs. [3]

My own Dynabook system has a Pharo backend and internal Pharo DSL and AJAX
web app frontend based on Iliad. The latter to allow collaboration with
non-pharo end users on certain projects. I'm interested in adding
instrumental interaction [1] to the web frontend to provide context
appropriate editing tools in a feasible way, along with the context
appropriate views HTML gives me quite nicely (similar to the inspectors in
the GToolkit philosophy). A big project and certainly more to talk about...

Do you have a mobile workflow too? I use mobile a lot - for now with
OrgMode and the beOrg mobile app. I also have a wearable computer with a
Raspberry Pi, Vufine [2] and Twiddler one hand keyboard which has some
advantages over mobile because I can type faster and maintain a view of the
world through the HUD. The Twiddler is quite efficient for text/emacs-style
editing and emacs runs quite well on the Pi, so I'm still interested in
some sort of OrgMode compatibility to remain pragmatic & productive on
these journeys.

Sorry for my late response BTW, summer time... I really appreciate
TheProjectProject and the thoughts behind it.

cheers
Siemen

1: https://www.lri.fr/~mbl/INSTR/eintroduction.html
2:
https://www.theverge.com/circuitbreaker/2017/7/27/16035508/diy-wearable-computer-google-glass-raspberry-pi-instructions
3: https://emacs.cafe/emacs/orgmode/gtd/2017/06/30/orgmode-gtd.html


[Pharo-users] Re: Personal wiki / information manager

2023-07-01 Thread Siemen Baader
Hi Offray,

that is very interesting material, and well described. No, it doesn't have
to be OrgMode per se, I just wanted to make use of something that already
can support a GTD workflow and implement something on top of it gradually.

I look deeper into this - thanks a lot!

cheers,
Siemen


[Pharo-users] Re: Personal wiki / information manager

2023-06-26 Thread Siemen Baader
On Mon, Jun 26, 2023 at 2:36 PM Craig Johnson  wrote:

>
> I'm in CAT time, which is the same as CEST at the moment.  Let's wait a
> bit to see if others jump-in.
>

Great! I'm curious to hear what has happened to these older projects
discussed in the thread.


[Pharo-users] Re: Personal wiki / information manager

2023-06-26 Thread Siemen Baader
Hi Craig,

On Mon, Jun 26, 2023 at 12:48 PM Craig Johnson  wrote:

>
> I'd be interested in joining you on this journey.  I'm a complete novice
> to Pharo, but will be willing to help where I can.
>

that's great to hear! Lets see what people on this list chips in with to
build on top of, and then perhaps we should have an online meeting and hash
it out how to proceed. I'm in the CEST time zone. And you?

cheers
Siemen


[Pharo-users] searching for pharo code on disk

2023-03-21 Thread Siemen Baader
Hi,

I'm looking for some code I wrote maybe 7 years ago. A web scraper that
collected data from a specific web shop. It must be somewhere in my home
dir in an image, perhaps Pharo 4.0, or in .mcz files stored by Monticello.
What would be a good way to search for it? I tried

`grep -r --include \*.changes "server-url.com" ~`

(I also asked ChatGPT as per the previous discussion on this list, and it
tries its best to teach me about grep and sound very convincing while
providing me with arguments that grep can't evaluate :))


with no luck so far.

Any ideas?

Thanks,
Siemen


[Pharo-users] Re: mapping CamelCase to

2022-11-05 Thread Siemen Baader
Hi Richard,

On Wed, Oct 26, 2022 at 11:42 AM Richard O'Keefe  wrote:

> What's wrong with
>
> $- join: (s cutCamelCase collect: [ :each | each asLowercase])
>
> where s is the string you want to transform?
> I'm sure you're aware of the proverb:
>   You have a problem and you decide to solve it with
>   a regular expression.  Now you have TWO problems.
>

I was not, but I like it :)


>
> MYWeirdName and MyWeirdName both map to my-weird-name,
> but perhaps you are happy with that.
>

Indeed - that is not a problem in my situation.

cheers
Siemen



>
> On Sat, 22 Oct 2022 at 21:57, Siemen Baader 
> wrote:
>
>> Hi,
>>
>> I'm looking for an elegant way to convert class names with optional
>> namespace prefixes to names for custom html elements.
>>
>> MYCustomElement and CustomElement
>>
>> to
>>  and 
>>
>> There must be an elegant way to do it with regex or inject, but I'm
>> embarrassed to say I can't get my head around it. I can get it to match the
>> regex '((:isUppercase:+)*)((:isUppercase::isLowercase:+)*)', (if I recall
>> correctly) but can't get a collection of the individual elements 'MY'
>> 'Custom" 'Element' to lowercase and join.
>>
>> Thanks for any hints!
>>
>> cheers
>> Siemen
>>
>


[Pharo-users] Re: mapping CamelCase to

2022-10-24 Thread Siemen Baader
Thank you very much, Kasper! Even with an implementation, wow.. I will use
your solution.

cheers
Siemen


On Sat, Oct 22, 2022 at 4:08 PM Kasper Osterbye 
wrote:

> I took this a my afternoon code-quiz, so here is a solution if you want it:
> splitCamelCase
> | str split word|
> "Split an expanded camelcase word into constituents. Extened camel
> case allow some words to be fully uppercase"
> "'ZAPMeToo' splitCamelCase >>> #('ZAP' 'Me' 'Too')"
> str := ReadStream on: self.
> split := OrderedCollection new.
> word := WriteStream on: ''.
> [ str atEnd ] whileFalse: [ | char |
> char := str next.
> (char isUppercase and: [str atEnd or: [str peek
> isLowercase]])
> ifTrue: [ split add: word contents. word :=
> WriteStream on: '' ].
> word nextPut: char ].
> split add: word contents.
> ^ split asArray
>
> You should then use cute join and asLowercase to go rest of the way.
>
> Best,
>
> Kasper
>
>
>
> > On 22 Oct 2022, at 14.53, Kasper Osterbye 
> wrote:
> >
> > My feeling is that it cannot be solved by regular expressions. The
> reason it that there is the regular expressions in smalltalk/pharo does not
> have look-ahead or backtracking. In your example the capital Y is part of
> MY, but C starts a new word. I do not know of anyway to express that in
> smalltalk regular expressions.
> >
> > So I believe this is one of the cases where you add an extension method
> to string which does the job using plain coding.
> >
> > Best,
> >
> > Kasper
> >
> >> On 22 Oct 2022, at 10.56, Siemen Baader  wrote:
> >>
> >> Hi,
> >>
> >> I'm looking for an elegant way to convert class names with optional
> namespace prefixes to names for custom html elements.
> >>
> >> MYCustomElement and CustomElement
> >>
> >> to
> >>  and 
> >>
> >> There must be an elegant way to do it with regex or inject, but I'm
> embarrassed to say I can't get my head around it. I can get it to match the
> regex '((:isUppercase:+)*)((:isUppercase::isLowercase:+)*)', (if I recall
> correctly) but can't get a collection of the individual elements 'MY'
> 'Custom" 'Element' to lowercase and join.
> >>
> >> Thanks for any hints!
> >>
> >> cheers
> >> Siemen
> >
>


[Pharo-users] mapping CamelCase to

2022-10-22 Thread Siemen Baader
Hi,

I'm looking for an elegant way to convert class names with optional
namespace prefixes to names for custom html elements.

MYCustomElement and CustomElement

to
 and 

There must be an elegant way to do it with regex or inject, but I'm
embarrassed to say I can't get my head around it. I can get it to match the
regex '((:isUppercase:+)*)((:isUppercase::isLowercase:+)*)', (if I recall
correctly) but can't get a collection of the individual elements 'MY'
'Custom" 'Element' to lowercase and join.

Thanks for any hints!

cheers
Siemen


[Pharo-users] Pharo CMS

2022-08-26 Thread Siemen Baader
Hi everyone,

I was looking for a Pharo CMS. I got the Pier one-click image from
www.piercms.com, but it seems there is a hardcoded path in the image. I get
the error message:

Pharo cannot write to the changes file named
/private/var/folders/ImndBm_rpdOz3Bpyfiqvv0d4dc000Ogn/T/AppTranslocation/24424,42
BEB3 4E. BBC5 CMFBIElgi12/3/35/d/Pier app/Contents/Resources/Pier.changes

(the image is not there but in my ~/Downloads folder).

Any ideas how I can fix this?

And what does Pharo.org use for its CMS?

thanks,
Siemen


[Pharo-users] Re: Too many parenthesis - a matter of syntax

2022-02-26 Thread Siemen Baader
Hi Kasper,

perhaps not what you are asking, but I find that this kind of nesting
happens to me when parsing serialized data (web page sources or JSON as in
your example). For me, the root cause of the problem is that these data
structures are not represented by real classes in my code. I often start
with what you are showing in a Playground, but then refactor it into
specific parsers for the web sites I am scraping. The parsing selectors go
into classes that mirror the parts of the data I am interested in. I find
this to be more declarative and maintainable, and more natural in the Pharo
environment with its browsers and code extractors.

I hope this is of any use :)

cheers
Siemen

On Fri, Jan 28, 2022 at 11:55 PM Vitor Medina Cruz 
wrote:

> I think that's OK when you can choose when to use parentheses. If you
> think it would improve readability it is ok to use it, the problem is to be
> forced to use it even when you think it decreases readability, what I
> believe to be the case in discussion.
>
> On Thu, Jan 27, 2022 at 3:24 PM Russ Whaley  wrote:
>
>> What I like about parentheses (and I hate parentheses) is that it allows
>> me to view/describe the intent of the code. When parens are not used, it is
>> up to me (perhaps years later) to determine whether the original developer
>> (sometimes me) understood (or not) the actual 'order of processing'.
>> Parens - or another vehicle - should help me understand the intent (as
>> would detailed comments) - so I can devise tests (oh yeah, are those
>> available, too?) for the intent - even if it is just me in the debugger.
>>
>> So, I'm for whatever helps me understand the intent of the code - even if
>> there is some slick way to nest everything. I generally prefer breaking
>> nested processes down into multiple steps. Benchmarking rarely shows
>> significant performance differences, for me.
>>
>> (and I've used parentheses 7 times in this one email!)  :-)
>>
>> Russ
>>
>> On Wed, Jan 26, 2022 at 4:20 AM Kasper Osterbye <
>> kasper.oster...@gmail.com> wrote:
>>
>>> Cheers all
>>>
>>> I have noticed that I often ends up with quite a number of nested
>>> expressions, for example:
>>>
>>> (((json at: 'tree')
>>> select: [ :e | (e at: 'type') = ‘blob' ])
>>> collect: [:e | Path from: (e at: 'path')])
>>> select: [ :p | p segments last
>>> in: [ :name | (name endsWith: '.md') |
>>> (name endsWith: '.mic') ] ]
>>>
>>> What kind of proposals (if any) have been for a different syntax which
>>> could give a more streamlined syntax?
>>>
>>> My own thinking has been around an alternative to the cascade semicolon.
>>> What symbol to use does not matter for me, but something like
>>> json at: ‘tree' º
>>> select: [ :e | ((e at: 'type') = 'blob’)]º
>>> collect: [:e | Path from: (e at: 'path’)]º
>>> select: [ :p | p segments last
>>> in: [ :name | (name endsWith: '.md') | (name endsWith:
>>> '.mic') ] ]
>>>
>>> Basically, a send the right hand expression to the result of the left
>>> hand expression.
>>>
>>> Has anyone ever tried this, or is it just one of the many small
>>> annoyances best left alone?
>>>
>>> Best,
>>>
>>> Kasper
>>
>>
>>
>> --
>> Russ Whaley
>> whaley.r...@gmail.com
>>
>


Re: [Pharo-users] [Ann] Workshop: IndieWeb with pocket infrastructures

2020-08-29 Thread Siemen Baader



> On 29 Aug 2020, at 02.07, Offray Vladimir Luna Cárdenas 
>  wrote:
> 
> Hi all,
> 
> Due to the confinement in the pandemic, our forms of telepresence become
> more important and many suddenly got even more immersed into an
> Oligopoly cyberspace (Zoom, Google, Facebook, Twitter, Apple, Amazon,
> Microsoft, etc) with opaque algorithms that under extractive logic
> commodify our privacy and communications, try to condition our attention
> and habits, as well as to shape our current and future behavior. But
> this is not the only way to inhabit cyberspace.
> 
> From the Grafoscopio community[1], we would like to invite you to a
> series of workshops that we are doing to make visible other ways of
> populating and building the web, aligned with the movements of
> IndieWeb[1a], from what we have called "pocket infrastructures".

This is very cool! Thanks! 

Siemen


> You can
> find more information about these topics in [2] and in particular about
> the workshops in [3] (in Spanish).
> 
> [1] https://mutabit.com/grafoscopio/en.html
> [1a] https://indieweb.org/
> [2] https://mutabit.com/repos.fossil/indieweb/
> [3]
> https://mutabit.com/repos.fossil/indieweb/doc/trunk/docs/es/index.html#talleres
> 
> 
> The second workshop will be tomorrow, Saturday, Aug. 29 from 3:15 PM to
> 7:15PM CO (GMT - 5) -- I will try to share the other workshops earlier,
> but the site in [2] will be the consolidated memory of them, for those
> who want to join us asynchronously.
> 
> We will see how IndieWeb sites help us to untangle and reweave that
> other web and how this help us to reconnect in this stranger times.
> 
> Rethinking the infrastructure is also to rethink the ways in which it
> enables and makes visible (or not) certain ways of being and acting.
> Infrastructures are embodied discourses. So thank you in advance for
> joining us in rethinking this in practice.
> 
> Of course, Pharo is behind scenes, as usual, powering this experience.
> But with these IndieWeb workshops I think we have found a sweet spot
> that puts coding in front with a practical introduction and motivation
> beyond the kind of boring "Hello World". Following a "local first"
> approach, documentation will be in Spanish, but source code[5] and
> interactive documentation will be in English to bridge our worlds :-),
> 
> [4] https://mutabit.com/offray/blog/en/entry/dumb-hello-world
> [5] https://mutabit.com/repos.fossil/brea/
> 
> 
> See you on cyberspace,
> 
> Offray
> 
> 
> 



Re: [Pharo-users] pharo books as audiobooks

2020-08-29 Thread Siemen Baader
Hi Marek,

Thanks for the pointer. This is useful and interesting, but I wasn't clear
enough - I need the audio on my mobile phone and it needs to bookmark where
I left off, like audio book players and podcast apps do. Pocket has a very
nice workflow for this because I can bookmark a web site in Firefox, then
play back on mobile later. I've also used http://talkify.net and saved the
whole .mp3 file as an audio book to my mobile device, but talkify and
Pocket only work with HTML accessible over http via a public URL. But
thanks, and I'll probably learn something from this tool as well.

Besides - another reason why it would be cool if http://books.pharo.org had
supplementary HTML builds with unique anchors for chapters and sections
because this makes it very easy to point to specific sections in the books
when answering questions on the mailing list.

cheers,
Siemen

On Fri, Aug 28, 2020 at 12:37 PM niepiekm  wrote:

> Hi Siemen, all,
>
> you may listen to PDF files from the Web via 'Read Aloud' Chrome extension
> (
> https://chrome.google.com/webstore/detail/read-aloud-a-text-to-spee/hdhinadidafjejdhmfkjgnolgimiaplp
> )
> and use its service at
> https://assets.lsdsoftware.com/read-aloud/page-scripts/pdf-upload.html to
> open and listen to local PDF files.
>
> Simply open a local PDF file via the service and click on the extension
> button.
>
> Regards,
> Marek
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


[Pharo-users] pharo books as audiobooks

2020-08-28 Thread Siemen Baader
Hi all,

I'm interested in listening to the pharo books as audiobooks, away from my
desk. I read them to learn higher level concepts and can get back to the
code boxes later to look up the details, so I'm not too worried about how
to exactly convert the code boxes to audio.

One way to enable this would be if the books were served publicly as static
HTML. One can then use the Pocket App to save them and listen on the go. In
theory this should be something that the CI system could just be set up to
do, right?

(There are apps to convert PDFs to audio too, but those I have been able to
find are inconvenient and / or expensive.)

Is anyone who is already familiar with the CI system interested in setting
this up? I'd love to help but don't have the time, unfortunately. But I'm
happy to provide feedback. I'v

cheers
Siemen


Re: [Pharo-users] Zinc & IdentityServer4

2019-11-15 Thread Siemen Baader
Hi Tim,

If you get to it before me I'd be happy if you would like to share the actual 
code you use to log in and / or which tutorial you used.

Siemen

Sent from my iPhone

> On 9 Nov 2019, at 17.16, Tim Mackinnon  wrote:
> 
> 
> Interestingly I came across a need to investigate oauth and its only because 
> I happened to read this msg that I knew how to find such a useful resource - 
> the examples are brilliant, thanks Sven! 
> 
> This said, it highlights that ‘the published documentation in this area is 
> not very accessible or indexed - if you search for ”pharo oauth” on google, 
> you find lots of old stuff and pages that reference st-hub , and definitely 
> not the crucial information below.
> 
> Do you think we could update some of the old zinc pages with a header that 
> points people to the newer github locations? Also, as oauth is becoming more 
> and more prevalent, should we have something written that google will find 
> first, to help people get to this stuff?
> 
> tim
> 
>> On Mon, 4 Nov 2019, at 9:49 AM, Sven Van Caekenberghe wrote:
>> Hi Siemen,
>> 
>> This seems to be an implementation of OpenID Connect and OAuth 2.0.
>> 
>> There already exists a working implementation of OAuth for Zinc/Pharo, load 
>> the 'SSO' group from the baseline to get the code.
>> 
>> Now, this subject requires some learning curve, it is not super complex, but 
>> you have to really understand how it works in order to set it up and debug 
>> it. You have to start by reading a couple of good tutorials.
>> 
>> I am not using this, but others are, so maybe they can help you further.
>> 
>> Sven
>> 
>> > On 4 Nov 2019, at 10:37, Siemen Baader  wrote:
>> > 
>> > Hi,
>> > 
>> > I’m trying to log a registered user into a webshop (https://mad.coop.dk) 
>> > using Zinc, but it uses IdentityServer4 
>> > (https://github.com/IdentityServer/IdentityServer4) for authentication (at 
>> > https://accounts.cl.coop.dk/). So there are more steps involved than just 
>> > submitting credentials.
>> > 
>> > Usually I just inspect how things work in the Firefox console, then 
>> > replicate the interactions in Pharo, but this system is a bit too complex, 
>> > with many unrelated requests happening.
>> > 
>> > Can anyone guide me towards the correct steps to sign in?
>> > 
>> > thanks
>> > Siemen
>> 
>> 
>> 
> 



[Pharo-users] transactional saving of images

2019-11-15 Thread Siemen Baader
Hi,

I have had a few occasions where I broke an image because I either ran out
of disk space or had an endless loop that grew my image endlessly (I think).

But why does Pharo not save the image & .changes file in hidden files named
eg  ~Pharo.image while it saves? Then it can rename them when saving was
successful. Many unix programs do this.

(I'm using pharo 6.1 so don't know if newer versions do this)

-- Siemen


[Pharo-users] recovering non-ascii code in 6.1

2019-11-15 Thread Siemen Baader
Hi,

I have a broken 6.1 image and uncommited code with non-ascii characters in
it. When I drag the .changes file onto a new 6.1 image it won't import due
to the non-ascii code, but I can rename the .changes file so it matches the
new image's filename and import individual code changes (also with
non-chars) with Wold Menu -> Tools -> Code Changes.

Can I somehow file in the whole .changes file at once to end with the same
code state as in the original image?

-- Siemen


Re: [Pharo-users] Zinc & IdentityServer4

2019-11-04 Thread Siemen Baader
Thanks, Sven - I'll do that!

-- Siemen

On Mon, Nov 4, 2019 at 10:50 AM Sven Van Caekenberghe  wrote:

> Hi Siemen,
>
> This seems to be an implementation of OpenID Connect and OAuth 2.0.
>
> There already exists a working implementation of OAuth for Zinc/Pharo,
> load the 'SSO' group from the baseline to get the code.
>
> Now, this subject requires some learning curve, it is not super complex,
> but you have to really understand how it works in order to set it up and
> debug it. You have to start by reading a couple of good tutorials.
>
> I am not using this, but others are, so maybe they can help you further.
>
> Sven
>
> > On 4 Nov 2019, at 10:37, Siemen Baader  wrote:
> >
> > Hi,
> >
> > I’m trying to log a registered user into a webshop (https://mad.coop.dk)
> using Zinc, but it uses IdentityServer4 (
> https://github.com/IdentityServer/IdentityServer4) for authentication (at
> https://accounts.cl.coop.dk/). So there are more steps involved than just
> submitting credentials.
> >
> > Usually I just inspect how things work in the Firefox console, then
> replicate the interactions in Pharo, but this system is a bit too complex,
> with many unrelated requests happening.
> >
> > Can anyone guide me towards the correct steps to sign in?
> >
> > thanks
> > Siemen
>
>
>


[Pharo-users] Zinc & IdentityServer4

2019-11-04 Thread Siemen Baader
Hi,

I’m trying to log a registered user into a webshop (https://mad.coop.dk)
using Zinc, but it uses IdentityServer4 (
https://github.com/IdentityServer/IdentityServer4) for authentication (at
https://accounts.cl.coop.dk/). So there are more steps involved than just
submitting credentials.

Usually I just inspect how things work in the Firefox console, then
replicate the interactions in Pharo, but this system is a bit too complex,
with many unrelated requests happening.

Can anyone guide me towards the correct steps to sign in?

thanks
Siemen


[Pharo-users] Iliad & disbled JS

2019-02-22 Thread Siemen Baader
Hi,

has support for disabled JavaScript been removed from Iliad? When I do

$ curl http://localhost:/examples/counters

I get

[...]
0++

[...]

So it works only with JS enabled.

It would be nice to be able to make requests from non-JS-capable clients
such as ZnEasy for testing purposes. Can I re-enable it?

-- Siemen


[Pharo-users] Iliad on Pharo 7.0

2019-02-05 Thread Siemen Baader
Hi,

is anyone planning to port Iliad to Pharo 7.0? The Grease package seams to
have been removed from 7.0 so Iliad does not work out of the box.

cheers,
Siemen


Re: [Pharo-users] Seaside or Iliad for business applications?

2019-02-01 Thread Siemen Baader
Thanks to you both, Cyril and  Esteban!

On 23 Jan 2019, at 14:22, Cyril Ferlicot  wrote:

You can use JQuery with ajax to refresh part of the page.

You can check for example this component in MDL that is working with ajax:

https://mdl.ferlicot.fr/mdl/Widgets/DatePicker


Nice demo! Ok, so it is possible but seems to be more low-level than what
Iliad does - there every WAComponent is re-rendered in the client by the
framework when marked dirty. Good to see the alternative!

On 23 Jan 2019, at 14.28, Esteban Lorenzano  wrote:

There is also Willow (a framework on top of Seaside):
https://github.com/ba-st/Willow

Thanks, this looks interesting. I'll have to consider if it does what I
need and if the fact that it is based on Seaside means that there is good
community support.

On 23 Jan 2019, at 14:22, Cyril Ferlicot  wrote:

We talked with Johan not long ago about clean URLs. It's possible to
have them by storing the fields in cookies, but it mean that you can
only have one session by browser.

But this is what everyone else I know does, including Iliad. Try to log
into Facebook or Gmail and open a new tab, you will be logged in to your
session. To get a new session people open a private browser tab. And if
users copy the URL and share it with someone else, they wouldn't want to
give away their session ID. Or am I missing something? As I said, I don't
know Seaside and my be misunderstanding why it does things the way it does.

best,
Siemen


[Pharo-users] Seaside or Iliad for business applications?

2019-01-23 Thread Siemen Baader
Hi,

I’m a very happy Iliad user but I’m wondering if it would make sense to
switch to Seaside for commercial development since it has a larger user
base. I have only used Seaside briefly to try it out and found I was more
happy with Iliad back then, but now I’d like to hear your input. Especially
from those of you who use it for business applications with paying
customers. My questions are:

- does Seaside support partial updates of the DOM, like Iliad, or do I need
to refresh the whole website for every interaction?

- Iliad has REST-like URLS that look clean and can be shared, Seaside seems
not to. Is this possible with Seaside?

- directly writing javascript. I suppose there is a WAComponent that can
emit raw JS?

- what is the status of Websocket / Comet in Seaside?

Is there anything else I should consider?

thanks,
Siemen


Re: [Pharo-users] Pillar Book Tester

2018-08-05 Thread Siemen Baader
Very cool, this should be very useful to keep documentation up-to-date.
Good job!

cheers
Siemen

On Tue, Jul 31, 2018 at 11:25 AM Quentin DUCASSE (CI_2020) <
quentin.duca...@ensta-bretagne.org> wrote:

> Hello everyone!
>
> I am currently in an internship within the RMoD team and would like to
> present my work. My internship subject was the following: “How to test
> documents (books, slides) written in Pillar?”. Let me first introduce
> Pillar then what I managed to implement and what is left to do.
>
>
>
> -*What is Pillar?*
>
>
>
> Pillar is a markup syntax and associated tools to write and generate
> documentation, books, slide-based presentations or websites. Pillar syntax
> is similar to Markdown’s one but its emphasis is stressed on publishing to
> different formats/languages (Markdown, html, LateX, pdf).
>
>
>
> -*What does it mean to ‘test a book’?*
>
>
> --  *Display code within the book*
>
> Pillar syntax allows you to write codeblocks, showing a part of code. The
> inside of a codeblock allows one to display any part of code you might
> want to. For example:
>
> [[[
>
> YourClass >> yourMethod
>
> ^ ‘bla’
>
> ]]]
>
> This codeblock presents a method definition, the other two possible
> codeblocks are the following:
>
>
>   Class definition
>
> [[[
>
> Object subclass: #YourClass
>
> instanceVariableNames: ''
>
> classVariableNames: ''
>
> package: YourPackage'
>
> ]]]
>
>
>   Example
>
> [[[
>
> 1+1
>
> >>> 2
>
> ]]]
>
>
>
> --  *How to test it?*
>
> The use of ‘>>>’ and parameters in the codeblock will help us to test the
> code within it. The BookTester will turn examples into tests.
>
>
>
> Testing examples:
>
> [[[testcase=true
>
> 3+4  becomes   self assert: (3+4) equals: 7
>
> >>>7
>
> ]]]
>
>
> Testing methodDefinitions and classDefinitions:
>
>
>
> Testing method or class definitions resumes is the same as testing if the
> compilation of the method does not raise any error. It can help make sure
> your book is up to date with the latest Pharo version. Those tests are done
> the same way as testing an example: stating methodDefinition=true or
> classDefinition=true as code block parameters will make them elible for
> tests. Now, we are adding more features to code block or Pillar to help
> book writers.
>
>
>
> -*Additional Features*
>
> In Pillar, several annotations can be used for different purposes like
> including columns/tables/citations/figures/links…
>
>
>
> -- *  Loading code:* loader
>
> ${loader:account=QDucasse|project=TestBook|tag=Chapter1}$
>
> allows you to load the github project as it was in the commit tagged
> Chapter1. This will help you test every chapter of your code with its
> current progression and also allow you to test the objects you are defining
> in your book.
>
>
> -   *Executing Tests:* run
>
> ${run:testClass=YourClassTest}$ runs the test defined in the class
> testClass. And of course this testClass can be
>
>
> Other annotations have been added to help you write your book:
>
>
> -  * Display a class definition:* showClass:
>
> ${showClass:className=YourClass}$ displays a codeblock with the class
> definition within it
>
> This helps you quickly include a class definition you want to display in
> your book. Combined with the loader it means that the code can be the
> source of your book.
>
>
>
> -  * Display a method definition:* showMethod:
>
> ${showMethod:className=YourClass|methodName=yourMethod}$ will display a
> codeblock with the method definition within it
>
> This helps you quickly include a method definition you want to display in
> your book.
>
>
>
> -  * Screenshot:*
>
>
> ${showMethod:packageName=yourPackage|className=YourClass|methodName=yourMethod|caption|width|label}$
>
> saves a screenshot of a Calypso browser open at the selected package,
> class and method and includes it in both your book (using the designated
> Pillar figure reference) and the figures subfolder in the pillar book
> folder (saved as PNG).
>
>
> -*Future objectives*
>
>
>
> One of the future improvements would be to make everyone able to write
> examples and test them in the comments of method definitions. It is already
> partially possible “3+4 >>> 7” will be highlighted differently and if
> printed will display “7->7”. However, an automation or UI improvement would
> be nice.
>
>
>
> I hope this gave you the will to write something you had in mind. Are
> there any books you want to try the tools on? Feel free to ask !
>
>
>
> Quentin Ducasse
>
>


Re: [Pharo-users] Status of Caffeine

2018-07-26 Thread Siemen Baader
Hi again,

I played a bit with the online demo. Do you have implemented a basic file 
browser with
DOM (not canvas) UI? But it is not compatible at the Morphic level, right? So 
it is not a DOM element based backend that existing Morphic applications could 
use..?

Also, what happens when you have an exception in code in a DOM callback like 
xhr completed or a click event? Does it pop up a real Squeak debugger and 
allows coding in the debugger like real smalltalk?

Cheers,
Siemen 

Sent from my iPhone

> On 20 Jul 2018, at 11.27, Siemen Baader  wrote:
> 
> Ok, Thanks!
> 
> :)
> Siemen
> 
> Sent from my iPhone
> 
>> On 20 Jul 2018, at 10.08, Craig Latta  wrote:
>> 
>> 
>>> What about the UI lag and the occasional spinner that blocks the UI,
>>> is this related to the debugging protocol (I see that the IDEs are
>>> loaded in iframes) that will go away when run from local, or is this
>>> something that can be optimized away?
>> 
>>That's just the speed of Morphic. The VM is set up to display the
>> spinner whenever anything takes more than a certain amount of time (one
>> alternative is to just turn it off :). While Morphic in SqueakJS has
>> gotten a lot faster since the first release, just because JavaScript
>> engines have gotten faster, I was still motivated to explore
>> alternatives. That's why I experimented with animated HTML wireframes,
>> morphic.js from Snap, and using a separate HMTL5 canvas for each morph.
>> 
>>All three of these approaches are much faster than traditional
>> Morphic. However, the traditional Morphic UI has the appeal that it's
>> pixel-portable between the Web and native apps.
>> 
>> 
>>thanks again,
>> 
>> -C
>> 
>> --
>> Craig Latta
>> Black Page Digital
>> Amsterdam :: San Francisco
>> cr...@blackpagedigital.com
>> +31   6 2757 7177 (SMS ok)
>> + 1 415  287 3547 (no SMS)
>> 



Re: [Pharo-users] Status of Caffeine

2018-07-20 Thread Siemen Baader
Ok, Thanks!

:)
Siemen

Sent from my iPhone

> On 20 Jul 2018, at 10.08, Craig Latta  wrote:
> 
> 
>> What about the UI lag and the occasional spinner that blocks the UI,
>> is this related to the debugging protocol (I see that the IDEs are
>> loaded in iframes) that will go away when run from local, or is this
>> something that can be optimized away?
> 
> That's just the speed of Morphic. The VM is set up to display the
> spinner whenever anything takes more than a certain amount of time (one
> alternative is to just turn it off :). While Morphic in SqueakJS has
> gotten a lot faster since the first release, just because JavaScript
> engines have gotten faster, I was still motivated to explore
> alternatives. That's why I experimented with animated HTML wireframes,
> morphic.js from Snap, and using a separate HMTL5 canvas for each morph.
> 
> All three of these approaches are much faster than traditional
> Morphic. However, the traditional Morphic UI has the appeal that it's
> pixel-portable between the Web and native apps.
> 
> 
> thanks again,
> 
> -C
> 
> --
> Craig Latta
> Black Page Digital
> Amsterdam :: San Francisco
> cr...@blackpagedigital.com
> +31   6 2757 7177 (SMS ok)
> + 1 415  287 3547 (no SMS)
> 



Re: [Pharo-users] Status of Caffeine

2018-07-19 Thread Siemen Baader
Very good!

What about the UI lag and the occasional spinner that blocks the UI, is
this related to the debugging protocol (I see that the IDEs are loaded in
iframes) that will go away when run from local, or is this something that
can be optimized away?

Thanks for the details so far!
Siemen



On Thu, Jul 19, 2018 at 8:12 PM, Craig Latta 
wrote:

>
> > The minimal example seems to load fast enough. Do you think there is a
> > potential to slim it down even further for a production system that
> > uses the DOM as its UI, ie remove morphic and others and use the image
> > in headless mode?
>
>  Certainly. I've done some experiments with "animated wireframes"
> for the development tools. See [1]. I can compose UIs in HTML, then read
> them into SqueakJS and give them behavior by giving them DOM event
> handlers written in Smalltalk.
>
> > Thanks for the offer to work together on the Pharo port. It is too
> > early for me to commit to that, but I definitely like the idea. Right
> > now I'm just checking out. I'd like to use Pharo's (or Squak's)
> > interactive development workflow to develop single page web apps and
> > mobile apps in a reliable manner.
>
>  Yes, I've found it to be a very productive environment. It's great
> to be able to debug things in situ, in the DOM environment.
>
> > Is there a way to run the IDE in a separate window from the actual
> > application, so that the UI would behave as in production during
> > development? I'm especially thinking of responsive web applications
> > here.
>
>  Yes; I've also built an interface to the Google remote debugging
> protocol, so (in Chrome) I can run SqueakJS in one browser window, and
> control whatever's going on in any other browser window.
>
> > (If not then perhaps putting them into divs next to each other might
> > be a decent workaround)
>
>  Yeah, this is what I did in the first Caffeine demo[2]. When I want
> the Smalltalk IDE to disappear I just set the opacity of its div to zero
> and its pointer-events to none. This approach works across all browsers.
>
>
>  thanks,
>
> -C
>
> [1] https://tinyurl.com/y9ngn363 (github.com)
> [2] https://caffeine.js.org
>
> --
> Craig Latta
> Black Page Digital
> Amsterdam :: San Francisco
> cr...@blackpagedigital.com
> +31   6 2757 7177 (SMS ok)
> + 1 415  287 3547 (no SMS)
>
>


Re: [Pharo-users] Status of Caffeine

2018-07-19 Thread Siemen Baader
Hi Craig,

Great, thanks! The minimal example seems to load fast enough. Do you think 
there is a potential to slim it down even further for a production system that 
uses the DOM as its UI, ie remove morphic and others and use the image in 
headless mode?

Thanks for the offer to work together on the Pharo port. It is too early for me 
to commit to that, but I definitely like the idea. Right now I'm just checking 
out. I'd like to use Pharo's (or Squak's) interactive development workflow to 
develop single page web apps and mobile apps in a reliable manner. 

Is there a way to run the IDE in a separate window from the actual application, 
so that the UI would behave as in production during development? I'm especially 
thinking of responsive web applications here. 

(If not then perhaps putting them into divs next to each other might be a 
decent workaround)

Cheers,
Siemen 

Sent from my iPhone

> On 19 Jul 2018, at 14.25, Craig Latta  wrote:
> 
> 
> 
> 
> Hi Siemen--
> 
>> What is the status of Caffeine now - is it production-ready with
>> Pharo, and how large is a minimal (not development) image with
>> everything required to run a production system - i.e. what would be
>> the load time of a Caffeine web app?
> 
> I'm using Caffeine in production with Squeak; there are a few bugs
> to deal with in Pharo. Would you like to work together on it?
> 
> A minimal system is a few hundred kilobytes, depending on the
> application. The VR app I'm doing now is fairly large and loads in 10
> seconds. A small app should take about two seconds. The mini image demo
> at [1] is a good approximation.
> 
> Please feel free to join in on Caffeine issues, at [2].
> 
> 
> thanks,
> 
> -C
> 
> [1] https://squeak.js.org/demo/simple.html#fullscreen
> [2] https://github.com/ccrraaiigg/ccrraaiigg.github.io/issues
> 
> --
> Craig Latta
> Black Page Digital
> Amsterdam :: San Francisco
> cr...@blackpagedigital.com
> +31   6 2757 7177 (SMS ok)
> + 1 415  287 3547 (no SMS)
> 
> 



Re: [Pharo-users] Status of Caffeine

2018-07-19 Thread Siemen Baader
Thanks!

My idea was to use it in a similar manner to e.g. Angular, with a full app 
being loaded into the browser which communicates with a backend API. But this 
requires the load time to be acceptable.. another direction would be to embed 
it in a phone gap app and use it to build DOM-based mobile apps. There a larger 
footprint would be ok. 

-- Siemen

Sent from my iPhone

> On 19 Jul 2018, at 11.26, Erik Stel  wrote:
> 
> You can find the source at the GitHub-link below. Craig seems active on this
> project seeing the number of recent commits. Focus is on creating a live
> VR-environment. Cool stuff I think . It will run Pharo, but if that means
> 'production ready'... Small image sizes for production systems/applications
> is probably a separate topic. Caffeine is a Smalltalk VM written in JS (with
> some extra's), so image size depends on how small you can make your image. I
> read in some of the more recent issues that on some mobile devices (based on
> iOS) the page reloads after switching apps and/or locking the device. This
> will loose any data currently in the Caffeine app. Craig is working on a
> solution based on WebWorkers. This probably means: not production ready for
> mobiles yet .   
> 
> Link:  https://github.com/ccrraaiigg/ccrraaiigg.github.io
>   
> 
> HTH
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 



[Pharo-users] Status of Caffeine

2018-07-19 Thread Siemen Baader
What is the status of Caffeine now - is it production-ready with Pharo, and how 
large is a minimal (not development) image with everything required to run a 
production system - i.e. what would be the load time of a Caffeine web app?

Thanks,
Siemen 

Sent from my iPhone


Re: [Pharo-users] reading from a named pipe in Pharo

2018-05-07 Thread Siemen Baader
Wow, thanks for your help, Alistair! I'll try it out.

cheers,
Siemen


On Sun, May 6, 2018 at 7:47 PM, Alistair Grant 
wrote:

> Hi Siemen & Mariano,
>
> On 5 May 2018 at 16:26, Mariano Martinez Peck 
> wrote:
> > Hi Siemen,
> >
> > You may want to check the pipe support code in OSSubprocess [1]. Note
> that
> > the pipes should work outside of OSSubprocess. You can read the
> > documentation as well as the unit tests for the pipes.
> >
> > Cheers,
> >
> > [1] https://github.com/marianopeck/OSSubprocess
>
> OSSPipe seems to assume that is controlling both ends of the pipe,
> while it may be that Siemen just wants to read from the pipe.  Anyway,
> Mariano mentioned that pipes should work outside of OSSubprocess, and
> I've made some modifications to FilePlugin which should facilitate
> that, so thought I'd have a go.  This still doesn't completely meet
> Siemen's requirements as it polls the stream, but...  I've attached a
> little demo class, tested only on Ubuntu 16.04.  Be warned, I've never
> used Unix pipes before, so feel free to critique the code:
>
>
> NamedPipeEcho provides sample code showing how to read from a Unix
> named pipe and echo the contents to stdout.
>
> Interesting attributes of the sample code include:
>
> - It is just a sample, it isn't intended to be production ready.
> - It marks the pipe non-blocking so that multiple pipes can be
> processed without the image blocking when reading.
> - It's polling, rather than event driven.
> - It doesn't have any external dependencies outside the core Pharo
> image and standard Pharo VM.
> - It defines a method that directly calls a primitive - I consider
> this bad practice and would like to make the primitive generally
> available through FilePlugin.
>
>
> The simplest way to run this is in one terminal (bash shell):
>
> $ mkfifo /dev/shm/pharopipe
> $ pharo --headless Pharo.image eval "(NamedPipeEcho on:
> '/dev/shm/pharopipe') run"
>
> and in a second terminal (bash shell):
>
> $ pharo --headless Pharo.image eval "NamedPipeEcho sampleWriteTo:
> '/dev/shm/pharopipe'"
>
> You should see:
>
> Hello World
> Line 2
>
> in the first terminal, with a 15 second delay between the lines and exit.
>
>
> There's also AsyncFile, which should make it event driven instead of
> polled, but I haven't had a chance to look at that yet.
>
> This is tested with:
>
>
> Pharo7.0alpha
> Build information:
> Pharo-7.0+alpha.build.839.sha.675decd24230e0ef7d1579af07c2112c104c6d7b
> (64 Bit)
>
>
> 5.0-20180416  Thu Apr 12 22:34:48 UTC 2018 gcc 4.8 [Production
> Spur 64-bit VM]
> CoInterpreter VMMaker.oscog-eem.2361 uuid:
> 7ca2f89a-de70-422f-b92b-54f91ac4e47b Apr 12 2018
> StackToRegisterMappingCogit VMMaker.oscog-eem.2361 uuid:
> 7ca2f89a-de70-422f-b92b-54f91ac4e47b Apr 12 2018
> VM: 20180416 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
> Date: Thu Apr 12 15:26:17 2018 -0700 $ CommitHash: 07c6dc3 $
> Plugins: 20180416 https://github.com/OpenSmalltalk/opensmalltalk-
> vm.git $
> Linux travis-job-b95e67e4-9fb2-4d69-a59f-1fbf859b912c
> 4.4.0-101-generic #124~14.04.1-Ubuntu SMP Fri Nov 10 19:05:36 UTC 2017
> x86_64 x86_64 x86_64 GNU/Linux
> plugin path: /home/alistair/pharo7/Issue21692/vm/pharo-vm/lib/
> pharo/5.0-20180416
> [default: /home/alistair/pharo7/Issue21692/vm/pharo-vm/lib/
> pharo/5.0-20180416/]
>
>
> Earlier VMs probably won't work as #atEnd will always return true or
> false (I forget which).
>
> Cheers,
> Alistair
>


Re: [Pharo-users] reading from a named pipe in Pharo

2018-05-05 Thread Siemen Baader
Thanks, I'll check it out!

-- Siemen

On Sat, May 5, 2018 at 4:26 PM, Mariano Martinez Peck <marianop...@gmail.com
> wrote:

> Hi Siemen,
>
> You may want to check the pipe support code in OSSubprocess [1]. Note that
> the pipes should work outside of OSSubprocess. You can read the
> documentation as well as the unit tests for the pipes.
>
> Cheers,
>
> [1] https://github.com/marianopeck/OSSubprocess
>
> On Sat, May 5, 2018 at 8:29 AM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'd like to use an external tool to edit HTML code and then store and
>> version it in my Pharo image. I'd like to create a named pipe that the
>> external application will save to, and then have Pharo watch for whenever
>> the named pipe is written to and then execute code to handle the data from
>> there.
>>
>> But I can't find any place to register a callback on FileReference and
>> similar classes that will notify Pharo when the named pipe is changed, and
>> when the external editor will read from it. Is there any support for this?
>>
>> I know there are workarounds like polling or reading the file when it is
>> used, but I'd prefer to wire things together directly and avoid duplicating
>> the data if possible.
>>
>> thanks,
>> Siemen
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>


[Pharo-users] reading from a named pipe in Pharo

2018-05-05 Thread Siemen Baader
Hi,

I'd like to use an external tool to edit HTML code and then store and
version it in my Pharo image. I'd like to create a named pipe that the
external application will save to, and then have Pharo watch for whenever
the named pipe is written to and then execute code to handle the data from
there.

But I can't find any place to register a callback on FileReference and
similar classes that will notify Pharo when the named pipe is changed, and
when the external editor will read from it. Is there any support for this?

I know there are workarounds like polling or reading the file when it is
used, but I'd prefer to wire things together directly and avoid duplicating
the data if possible.

thanks,
Siemen


Re: [Pharo-users] Raspberry Pi

2018-04-26 Thread Siemen Baader
Thanks, I'll try!

Sent from my iPhone

> On 26 Apr 2018, at 22.36, Cédrick Béler <cdric...@gmail.com> wrote:
> 
> Hi Siemen,
> 
> Running pharo on Pi is on my shirt to do list ^^
> 
> Did you try :
> https://github.com/pharo-iot/PharoThings/blob/master/README.md
> 
> The Pi vm link is different:
> http://files.pharo.org/vm/pharo-spur32/linux/armv6/latest.zip
> 
> 
> 
> Never tried though !
> 
> Hth,
> 
> Cedrick
> 
> 
>> Le 26 avr. 2018 à 21:19, Siemen Baader <siemenbaa...@gmail.com> a écrit :
>> 
>> Hi,
>> 
>> I'm trying to run a headless Pharo 6.1 server on a Raspberry Pi following 
>> the instructions on 
>> https://medium.com/concerning-pharo/pharo-pi-9eef257b6a21.
>> 
>> The latest vm I can download is from 14 dec 2017 (see 
>> http://files.pharo.org/vm/pharoS/raspbian/) and only works with Pharo 4.0. 
>> Are Pharo 6 and 7 not being built for ARM anymore? 
>> 
>> Also Pharo does not want to start in headless mode as indicated by the vm's 
>> help text:
>> 
>> pi@raspberrypi:~/Pharo6.1-3 $ ./PharoS -headless Pharo.image  eval "5+5"
>> setlocale() failed (check values of LC_CTYPE, LANG and LC_ALL)
>> unknown option: -headless
>> Usage: ./PharoS [...] [ [...]]
>>./PharoS [...] -- [...]
>> 
>> ALSA s:
>>   -nomixer  disable mixer (volume) adjustment
>>   -soundcard  open the named sound card (default: default)
>>   -playback   play to the named sound device (default: default)
>>   -capturerecord from the named sound device (default: default)
>> 
>> X11 s:
>>   -browserWindow   run in window 
>>   -browserPipes   run as Browser plugin using descriptors  
>>   -cmdmodmap Mod to the Command key
>>   -compositioninput enable overlay window for composed characters
>>   -display display on  (default: $DISPLAY)
>>   -fullscreen   occupy the entire screen
>>   -glxdebug  set GLX debug verbosity level to 
>>   -headless run in headless (no window) mode
>> 
>> <-snip-->
>> 
>> 
>> Has anyone had success with a recent Pharo server on Pi?
>> 
>> -- Siemen


[Pharo-users] Raspberry Pi

2018-04-26 Thread Siemen Baader
Hi,

I'm trying to run a headless Pharo 6.1 server on a Raspberry Pi following
the instructions on
https://medium.com/concerning-pharo/pharo-pi-9eef257b6a21.

The latest vm I can download is from 14 dec 2017 (see
http://files.pharo.org/vm/pharoS/raspbian/) and only works with Pharo 4.0.
Are Pharo 6 and 7 not being built for ARM anymore?

Also Pharo does not want to start in headless mode as indicated by the vm's
help text:

pi@raspberrypi:~/Pharo6.1-3 $ ./PharoS -headless Pharo.image  eval "5+5"
setlocale() failed (check values of LC_CTYPE, LANG and LC_ALL)
unknown option: -headless
Usage: ./PharoS [...] [ [...]]
   ./PharoS [...] -- [...]

ALSA s:
  -nomixer  disable mixer (volume) adjustment
  -soundcard  open the named sound card (default: default)
  -playback   play to the named sound device (default: default)
  -capturerecord from the named sound device (default:
default)

X11 s:
  -browserWindow   run in window 
  -browserPipes   run as Browser plugin using descriptors  
  -cmdmodmap Mod to the Command key
  -compositioninput enable overlay window for composed characters
  -display display on  (default: $DISPLAY)
  -fullscreen   occupy the entire screen
  -glxdebug  set GLX debug verbosity level to 
  -headless run in headless (no window) mode

<-snip-->


Has anyone had success with a recent Pharo server on Pi?

-- Siemen


Re: [Pharo-users] cancel changes in Nautilus broken on 6.1?

2018-03-09 Thread Siemen Baader
On Fri, Mar 9, 2018 at 8:02 AM, Ben Coman <b...@openinworld.com> wrote:

> thx for looking into this.  half way there ;)
> do you have the Pharo build numbers that match these Nautilus versions?
>

I don't. PharoLauncher didn't work for me, when I try to launch an image I
get an exception "MessageNotUnderstood: MacProcess>>waitForCommand:". So I
just downloaded images from get.pharo.org and then used Monticello to
identify the Nautilus packages versions and bisected in a 6.0 image until I
found the version that introduced the bug. Do you need the build numbers? I
suppose I can get the builds from
https://ci.inria.fr/pharo/ ?

cheers,
Siemen


>
> cheers -ben
>
> On 9 March 2018 at 14:30, Siemen Baader <siemenbaa...@gmail.com> wrote:
>
>> The regression happens between Nautilus-TheIntegrator1352.mcz and
>> Nautilus-TheIntegrator1351.mcz. Pharo 6.0 uses
>> Nautilus-TheIntegrator1366.mcz
>>
>> I'll look more to find the actual code that breaks.
>>
>> -- Siemen
>>
>>
>>
>>
>> On Mon, Feb 12, 2018 at 6:57 PM, Siemen Baader <siemenbaa...@gmail.com>
>> wrote:
>>
>>> Hi Stef,
>>>
>>> On Sat, Feb 10, 2018 at 6:22 PM, Stephane Ducasse <
>>> stepharo.s...@gmail.com> wrote:
>>>
>>>> Hi Siemen
>>>>
>>>> I use often cmd-L too and may be we got a regression.
>>>>
>>>
>>> I'm pretty sure I started doing it after I saw you do it in the MOOC ;)
>>>
>>> And indeed I have the same behavior in Pharo 70.
>>>> Can you try to see how to address it?
>>>>
>>>
>>> Yes, I can try to look into it. I don't have any clear idea where to
>>> start other than browsing Nautilus code and perhaps uses of
>>> NautilusChanged, but perhaps it is not that hard to find.
>>>
>>> -- Siemen
>>>
>>>>
>>>> Stef
>>>>
>>>> On Fri, Feb 9, 2018 at 8:37 PM, Siemen Baader <siemenbaa...@gmail.com>
>>>> wrote:
>>>> > Hi all,
>>>> >
>>>> > I downloaded Pharo 6.1 for OSX and whenever I revert changes in
>>>> Nautilus
>>>> > with CMD-L, the content is reverted and the orange dirty marker
>>>> triangle
>>>> > disappears. But when I switch to a different method, Nautilus shows
>>>> the
>>>> > 'Content has been modified. What do you want to do?' dialog, as it
>>>> only
>>>> > should when content is actually different.
>>>> >
>>>> > I use this all the time, I can't imagine I'm the only one, but I
>>>> couldn't
>>>> > find the problem mentioned anywhere. Does anyone else have it? What
>>>> to do?
>>>> >
>>>> > -- Siemen
>>>>
>>>>
>>>
>>
>


Re: [Pharo-users] cancel changes in Nautilus broken on 6.1?

2018-03-08 Thread Siemen Baader
The regression happens between Nautilus-TheIntegrator1352.mcz and
Nautilus-TheIntegrator1351.mcz. Pharo 6.0 uses
Nautilus-TheIntegrator1366.mcz

I'll look more to find the actual code that breaks.

-- Siemen



On Mon, Feb 12, 2018 at 6:57 PM, Siemen Baader <siemenbaa...@gmail.com>
wrote:

> Hi Stef,
>
> On Sat, Feb 10, 2018 at 6:22 PM, Stephane Ducasse <stepharo.s...@gmail.com
> > wrote:
>
>> Hi Siemen
>>
>> I use often cmd-L too and may be we got a regression.
>>
>
> I'm pretty sure I started doing it after I saw you do it in the MOOC ;)
>
> And indeed I have the same behavior in Pharo 70.
>> Can you try to see how to address it?
>>
>
> Yes, I can try to look into it. I don't have any clear idea where to start
> other than browsing Nautilus code and perhaps uses of NautilusChanged, but
> perhaps it is not that hard to find.
>
> -- Siemen
>
>>
>> Stef
>>
>> On Fri, Feb 9, 2018 at 8:37 PM, Siemen Baader <siemenbaa...@gmail.com>
>> wrote:
>> > Hi all,
>> >
>> > I downloaded Pharo 6.1 for OSX and whenever I revert changes in Nautilus
>> > with CMD-L, the content is reverted and the orange dirty marker triangle
>> > disappears. But when I switch to a different method, Nautilus shows the
>> > 'Content has been modified. What do you want to do?' dialog, as it only
>> > should when content is actually different.
>> >
>> > I use this all the time, I can't imagine I'm the only one, but I
>> couldn't
>> > find the problem mentioned anywhere. Does anyone else have it? What to
>> do?
>> >
>> > -- Siemen
>>
>>
>


Re: [Pharo-users] casting to subclass

2018-03-06 Thread Siemen Baader
On Fri, Mar 2, 2018 at 9:19 PM, Hernán Morales Durand <
hernan.mora...@gmail.com> wrote:

> Hi Siemen
>
> IIRC this was known as "wide classes", there is some paper about it.
>

Thanks for the pointer! I found
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.31.4708 but no
Pharo implementation. Was it available in Pharo at some point?

cheers
Siemen


Cheers,
>
> Hernán
>
> 2018-03-02 15:45 GMT-03:00 Siemen Baader <siemenbaa...@gmail.com>:
> > Hi all,
> >
> > it seems like we cannot cast the class of object to its subclass if that
> > subclass has had new instance variables added to it:
> >
> > http://forum.world.st/changing-the-class-of-an-existing-
> object-to-a-subclass-td4239041.html
> >
> > But I (think) I need it - I'm transforming a DOM tree from
> XMLHTMLParser's
> > XMLElement s to a subclass of Iliad's ILHTMLBuilderElement s, and for
> single
> > occurences I would like to use the more specific subclasses, like
> > ILCheckboxElement. I can make the cast manually, I know when it is safe
> to
> > do.
> >
> > What else could I do, apart from removing the element from its tree,
> > creating a new (subclass) instance and then putting this element in
> place of
> > the old one? Some #perform or `super` magic..?
> >
> > hm..
> >
> > thanks for any pointers!
> >
> > -- Siemen
>
>


Re: [Pharo-users] casting to subclass

2018-03-06 Thread Siemen Baader
On Fri, Mar 2, 2018 at 9:21 PM, Esteban A. Maringolo <emaring...@gmail.com>
wrote:

> "Castings" are aliens in the Smalltalk world, although there is a
> #become*: method family, I would discourage you from using it as an
> alternative unless you really need to do it.
>

Ok, thanks. I think this use case is specific enough for casting to be
useful, but I see your point.

>
> If your use case is that concrete, I'd do something like:
>
> `ILHTMLBuilderElement fromXMLElement: anXMLElement`
>

Yes.. :)

-- Siemen


>
> Then all subclasses of `ILHTMLBuilderElement` will know what to look
> and what to omit from the `XMLElement` parameter.
>
> Regards!
>
> Esteban A. Maringolo
>
>
> 2018-03-02 17:08 GMT-03:00 Stephan Eggermont <step...@stack.nl>:
> > Siemen Baader <siemenbaa...@gmail.com> wrote:
> >>
> >> What else could I do, apart from removing the element from its tree,
> >> creating a new (subclass) instance and then putting this element in
> place
> >> of the old one? Some #perform or `super` magic..?
> >
> > Use composition? Generate accessing code where necessary.
> > Is this very performance critical code?
> >
> > Stephan
> >
> >
> >
>
>


Re: [Pharo-users] casting to subclass

2018-03-06 Thread Siemen Baader
On Fri, Mar 2, 2018 at 9:08 PM, Stephan Eggermont <step...@stack.nl> wrote:

> Siemen Baader <siemenbaa...@gmail.com> wrote:
> >
> > What else could I do, apart from removing the element from its tree,
> > creating a new (subclass) instance and then putting this element in place
> > of the old one? Some #perform or `super` magic..?
>
>
Use composition? Generate accessing code where necessary.
>

Hm yes.. This is probably what I'll end up doing eventually. I was trying
to save a lot of typing work. XMLElement and ILHTMLBuilder both have useful
interfaces, and some of it is called from behind the scenes by their
respective frameworks.

> Is this very performance critical code?

I don't think so. But it is the HTML construction code of a web app, so it
*might* become a bottleneck. I don't treat it like this ATM.

Siemen

>
> Stephan
>
>
>
>


[Pharo-users] casting to subclass

2018-03-02 Thread Siemen Baader
Hi all,

it seems like we cannot cast the class of object to its subclass if that
subclass has had new instance variables added to it:

http://forum.world.st/changing-the-class-of-an-existing-object-to-a-subclass-td4239041.html

But I (think) I need it - I'm transforming a DOM tree from XMLHTMLParser's
XMLElement s to a subclass of Iliad's ILHTMLBuilderElement s, and for
single occurences I would like to use the more specific subclasses, like
ILCheckboxElement. I can make the cast manually, I know when it is safe to
do.

What else could I do, apart from removing the element from its tree,
creating a new (subclass) instance and then putting this element in place
of the old one? Some #perform or `super` magic..?

hm..

thanks for any pointers!

-- Siemen


Re: [Pharo-users] [Iliad] raw HTML in Iliad

2018-02-13 Thread Siemen Baader
Thanks!

On Tue, Feb 13, 2018 at 9:51 AM, Cyril Ferlicot <cyril.ferli...@gmail.com>
wrote:

> On Tue, Feb 13, 2018 at 9:20 AM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
> > Formulating the question helped me to find the solution after I posted:
> >
> > index
> > ^ [ :e | e add: (ILRawHtmlElement new contents: 'hello
> > world') ]
> >
> > :)
> >
>
> Hi!
>
> Just for the record,
>
> There is a Pharo mustache implementation.
> (https://ci.inria.fr/pharo-contribution/view/Books/job/
> EnterprisePharoBook/lastSuccessfulBuild/artifact/
> book-result/Mustache/Mustache.pdf)
> Also, it is possible with Seaside to render raw html via the method #html:
>
> > cheers,
> > Siemen
> >
> >
> > On Tue, Feb 13, 2018 at 9:14 AM, Siemen Baader <siemenbaa...@gmail.com>
> > wrote:
> >>
> >> Hi all,
> >>
> >> is there a way to render raw HTML from Iliad widgets, or perhaps
> mustache
> >> templates? I'm interested in not using the builders always because I
> use an
> >> external web editor that generates plain HTML and that has some
> advantages
> >> in my workflow.
> >>
> >> Is it possible do it with Seaside & Reef instead?
> >>
> >> -- Siemen
> >
> >
>
>
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>
>


Re: [Pharo-users] [Iliad] raw HTML in Iliad

2018-02-13 Thread Siemen Baader
Formulating the question helped me to find the solution after I posted:

index
^ [ :e | e add: (ILRawHtmlElement new contents: 'hello
world') ]

:)

cheers,
Siemen


On Tue, Feb 13, 2018 at 9:14 AM, Siemen Baader <siemenbaa...@gmail.com>
wrote:

> Hi all,
>
> is there a way to render raw HTML from Iliad widgets, or perhaps mustache
> templates? I'm interested in not using the builders always because I use an
> external web editor that generates plain HTML and that has some advantages
> in my workflow.
>
> Is it possible do it with Seaside & Reef instead?
>
> -- Siemen
>


[Pharo-users] [Iliad] raw HTML in Iliad

2018-02-13 Thread Siemen Baader
Hi all,

is there a way to render raw HTML from Iliad widgets, or perhaps mustache
templates? I'm interested in not using the builders always because I use an
external web editor that generates plain HTML and that has some advantages
in my workflow.

Is it possible do it with Seaside & Reef instead?

-- Siemen


Re: [Pharo-users] cancel changes in Nautilus broken on 6.1?

2018-02-13 Thread Siemen Baader
Thanks for the tip!

-- Siemen

On Mon, Feb 12, 2018 at 11:34 PM, Ben Coman <b...@openinworld.com> wrote:

>
>
> On 13 February 2018 at 01:57, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
>
>> Hi Stef,
>>
>> On Sat, Feb 10, 2018 at 6:22 PM, Stephane Ducasse <
>> stepharo.s...@gmail.com> wrote:
>>
>>> Hi Siemen
>>>
>>> I use often cmd-L too and may be we got a regression.
>>>
>>
>> I'm pretty sure I started doing it after I saw you do it in the MOOC ;)
>>
>> And indeed I have the same behavior in Pharo 70.
>>> Can you try to see how to address it?
>>>
>>
>> Yes, I can try to look into it. I don't have any clear idea where to
>> start other than browsing Nautilus code and perhaps uses of
>> NautilusChanged, but perhaps it is not that hard to find.
>>
>
> One approach would be to start with PharoLauncher to quickly open Images
> from different builds, to bisect which build changed it, then review the
> code modified between builds.
> cheers -ben
>
>
>
>>
>> -- Siemen
>>
>>>
>>> Stef
>>>
>>> On Fri, Feb 9, 2018 at 8:37 PM, Siemen Baader <siemenbaa...@gmail.com>
>>> wrote:
>>> > Hi all,
>>> >
>>> > I downloaded Pharo 6.1 for OSX and whenever I revert changes in
>>> Nautilus
>>> > with CMD-L, the content is reverted and the orange dirty marker
>>> triangle
>>> > disappears. But when I switch to a different method, Nautilus shows the
>>> > 'Content has been modified. What do you want to do?' dialog, as it only
>>> > should when content is actually different.
>>> >
>>> > I use this all the time, I can't imagine I'm the only one, but I
>>> couldn't
>>> > find the problem mentioned anywhere. Does anyone else have it? What to
>>> do?
>>> >
>>> > -- Siemen
>>>
>>>
>>
>


Re: [Pharo-users] cancel changes in Nautilus broken on 6.1?

2018-02-12 Thread Siemen Baader
Hi Stef,

On Sat, Feb 10, 2018 at 6:22 PM, Stephane Ducasse <stepharo.s...@gmail.com>
wrote:

> Hi Siemen
>
> I use often cmd-L too and may be we got a regression.
>

I'm pretty sure I started doing it after I saw you do it in the MOOC ;)

And indeed I have the same behavior in Pharo 70.
> Can you try to see how to address it?
>

Yes, I can try to look into it. I don't have any clear idea where to start
other than browsing Nautilus code and perhaps uses of NautilusChanged, but
perhaps it is not that hard to find.

-- Siemen

>
> Stef
>
> On Fri, Feb 9, 2018 at 8:37 PM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
> > Hi all,
> >
> > I downloaded Pharo 6.1 for OSX and whenever I revert changes in Nautilus
> > with CMD-L, the content is reverted and the orange dirty marker triangle
> > disappears. But when I switch to a different method, Nautilus shows the
> > 'Content has been modified. What do you want to do?' dialog, as it only
> > should when content is actually different.
> >
> > I use this all the time, I can't imagine I'm the only one, but I couldn't
> > find the problem mentioned anywhere. Does anyone else have it? What to
> do?
> >
> > -- Siemen
>
>


[Pharo-users] cancel changes in Nautilus broken on 6.1?

2018-02-09 Thread Siemen Baader
Hi all,

I downloaded Pharo 6.1 for OSX and whenever I revert changes in Nautilus
with CMD-L, the content is reverted and the orange dirty marker triangle
disappears. But when I switch to a different method, Nautilus shows the
'Content has been modified. What do you want to do?' dialog, as it only
should when content is actually different.

I use this all the time, I can't imagine I'm the only one, but I couldn't
find the problem mentioned anywhere. Does anyone else have it? What to do?

-- Siemen


[Pharo-users] Soup bug(fix)

2017-11-08 Thread Siemen Baader
Hi all,

who maintains Soup, the HTML parser? Stef?

It seems to auto-close  (and ) tags when nested inside another
element. I wrote this test that fails:

testNestedButton
"this works with nested  tags instead of  and when there
is no enclosing  at all. but here  is auto-closed."

"a does not work either"

| soup |
soup := Soup
fromString:
'
text
   
'.
self assert: soup div button span string equals: 'text'




Where should I look to prevent Soup from auto-closing the tag, and where &
how should I submit my fix?

cheers,
Siemen


[Pharo-users] object serialization, STON & PharoJS

2017-07-16 Thread Siemen Baader
Hi all,

I’m trying to transpile the STON class to JavaScript with PharoJS to use it
in a client side web application. The goal is it to retrieve object(graphs)
from the server and deserialize them in the frontend via xhr.

But PharoJS doesn't support thisContext, I think that's a limitation of the
JavaScript VM. PharoJS raises "PjJavascriptTranspilationError - thisContext
not supported. Found in Collection >> #toBraceStack:". I tried to add the
 pragma to the method in the hope that it will not be needed
for my uses, but no luck.

Is the use of thisContext needed in STON, can I avoid it? I had hoped to
use STON because it is simple and well documented and unlike JSON handles
object graphs and classes.

What are my options?

Alternatively, what else could I use to serialize objects? I'm already
using Voyage & Mongo on the backend which deal with JSON internally, and I
think Moose also has a serialization component. Using a JS library in the
frontend is also an option if there is a Pharo implementation for its
format as well.

Thanks,
Siemen


Re: [Pharo-users] [Pharo-dev] vested interest in PharoJS?

2017-06-22 Thread Siemen Baader
Very cool, Norbert. I have been watching what you are doing at 2denker and
thought you might be interested ;)

What is holding you back - do you need more from PharoJS before starting to
use it commercially, or are you waiting for a (paid) project before you can
start?

-- Siemen

On Thu, Jun 22, 2017 at 1:08 PM, Norbert Hartl <norb...@hartl.name> wrote:

> I thought I responded already. We are interested in pharoJS. We developed
> stuff with amber but stopped using it. We have one app in the app store
> with ionic and amber and I'd like to do another one with pharoJS.
> Additionally I think that combining pharoJS with electron could be a nice
> thing to have in order to create desktop apps. And finally I was shortly
> researching native callouts from javascript with javascript core on ios and
> it seems you can do pharo code, transpile to javascript that calls
> javascript functions which are OS-native functions.
>
> Norbert
>
> > Am 14.06.2017 um 11:46 schrieb Siemen Baader <siemenbaa...@gmail.com>:
> >
> > Hi all,
> >
> > Is anyone else interested in PharoJS and making it mature for their own
> commercial mobile and single page web app (and node.js) development?
> >
> > I think it has a huge potential because it brings the browser runtime
> and many libraries and online services from the JS world to us Smalltalkers
> while letting us keep our agile development and good CS practices. But it
> does not yet have the necessary features and documentation to work smoothly.
> >
> > -- Siemen
>
>


Re: [Pharo-users] vested interest in PharoJS?

2017-06-22 Thread Siemen Baader
On Thu, Jun 15, 2017 at 7:03 PM, Brad Selfridge 
wrote:

> I'm very interested in it as I'm programming in Node.js and Typescript as
> we
> speak. However, I so busy I'm having a hard time just keeping up with the
> PharoJS progress.
>

Would you be able to use PharoJS in your (future?) projects and save time
in a way that would justify you investing time into improving PharoJS or
participate in the community in other ways?

-- Siemen


>
>
>
>
>
> -
> Brad Selfridge
> --
> View this message in context: http://forum.world.st/vested-
> interest-in-PharoJS-tp4951357p4951518.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] vested interest in PharoJS?

2017-06-22 Thread Siemen Baader
On Wed, Jun 14, 2017 at 4:10 PM, Dimitris Chloupis <kilon.al...@gmail.com>
wrote:

> from my extremely limited understanding about web dev, Seaside if my
> memory serves me correctly it integrate JS/ HTML/ CSS . IT has many great
> features, its mature and well documented. Most likely most existing pharo
> web dev frameworks do this as well.
>

Yes, it is good. But all the state is on the server, so it is not much help
for an in-browser web app. A thin client model rather than a fat client
that has a very responsive UI and also works well with interrupted
connectivity as is often the case with mobile. So not really my use case.

>
> PharoJS is definitely a very cool idea, but its a big project none the
> less , so it will take some time for it to get there. Assuming devs
> contribute to it, the massive difference between "I want" and "I make".
>

Exactly. It would be cool if we could unite a few competent people with
self-interest to help the project forward. I have this self-interest, but
not the skills (or time to acquire them) to do it alone. Have tried ;)

-- Siemen


>
>
> On Wed, Jun 14, 2017 at 12:47 PM Siemen Baader <siemenbaa...@gmail.com>
> wrote:
>
>> Hi all,
>>
>> Is anyone else interested in PharoJS and making it mature for their own
>> commercial mobile and single page web app (and node.js) development?
>>
>> I think it has a huge potential because it brings the browser runtime and
>> many libraries and online services from the JS world to us Smalltalkers
>> while letting us keep our agile development and good CS practices. But it
>> does not yet have the necessary features and documentation to work smoothly.
>>
>> -- Siemen
>>
>


[Pharo-users] vested interest in PharoJS?

2017-06-14 Thread Siemen Baader
Hi all,

Is anyone else interested in PharoJS and making it mature for their own
commercial mobile and single page web app (and node.js) development?

I think it has a huge potential because it brings the browser runtime and
many libraries and online services from the JS world to us Smalltalkers
while letting us keep our agile development and good CS practices. But it
does not yet have the necessary features and documentation to work smoothly.

-- Siemen


Re: [Pharo-users] diff'ing with metacello

2017-03-31 Thread Siemen Baader

> One of the thing that can be done is to temporarily copy all the versions 
> concerned into a Git-based repository with Iceberg or GitFileTree, and then 
> sees if git can provides a better diff, or even a git blame ability

Great tip, thanks, Thierry!

-- Siemen

> . I've done that multiple times... copy multiple versions in a repo, study 
> the diff, and then just throw it away.
> 


> Thierry
>  
>> 
>> Thanks for enlightening me!
>> 
>> Siemen
>> 
>> On Thu, Mar 30, 2017 at 4:57 PM, Thierry Goubier <thierry.goub...@gmail.com> 
>> wrote:
>>> 
>>> 
>>> 2017-03-30 16:42 GMT+02:00 Ben Coman <b...@openinworld.com>:
>>>> On Thu, Mar 30, 2017 at 2:58 PM, Siemen Baader <siemenbaa...@gmail.com> 
>>>> wrote:
>>>> > Below is a fileout of 'ConfigurationOfPharoJS'. I download new releases 
>>>> > of
>>>> > PharoJS as they become available. Recently I found a regression  - a  
>>>> > method
>>>> > 'PjApplication class >> playgroundWithoutLaunch' did not work any more. 
>>>> > What
>>>> > I wanted to do was to revert the whole project to an earlier version 
>>>> > until
>>>> > the method worked again - then look for the code that has been changed
>>>> > between releases and find the bug.
>>>> >
>>>> > In practice, even the earliest version (version 1.0 - method #version10) 
>>>> > did
>>>> > have the bug and I could not roll back the project to earlier release 
>>>> > states
>>>> > because there is no metadate for them. But I'd still like to learn how 
>>>> > to do
>>>> > it, so let's just say I want to compare version 1.2 and 1.3:
>>>> >
>>>> > version12: spec
>>>> > 
>>>> >
>>>> > version13: spec
>>>> > 
>>>> >
>>>> >
>>>> > I hope this makes sense. Thanks for helping me understand!
>>>> 
>>>> You can only directly diff the Configurations themselves.
>>>> I fairly sure you can't auto-diff the packages loaded by each 
>>>> configuration.
>>>> This is a missing feature.  It would be nice to have something like
>>>> the merge-diff,
>>>> but there are probably other priorities.  Maybe the new git workflow
>>>> will open some possibilities??
>>> 
>>> If you have a project-oriented way of committing to git (you commit both 
>>> the configuration and all the packages in one commit), then diffing via git 
>>> would work.
>>> 
>>> Current status on that feature is:
>>> 
>>> - BaselineOf and all related packages save in one commit can be done with 
>>> GitFileTree. I added an API for that and made a few experiments by 
>>> organising and saving projects via the Metacello registry (with GUI 
>>> support). I rolled back that extension in AltBrowser and I will reimplement 
>>> it soon in a different, better way.
>>> 
>>> - Iceberg ?
>>> 
>>> - ConfigurationOf ? The approach of storing a configurationOf inside a meta 
>>> repository makes implementing that harder.
>>> 
>>> Now, I think the tools would probably be able to get that to work over 
>>> Monticello with few changes, but they are a tad complex to implement, as in 
>>> loading two different configurationsOf and resolving related packages 
>>> (without loading them), and then changing the diff viewer to project all 
>>> differences between all classes of the two groups of packages. One thing to 
>>> remember is that complete packages, in multiple versions, can be loaded 
>>> simultaneously as Monticello models without disrupting the code currently 
>>> loaded and active in the image, as when you "browse" a Monticello package 
>>> on disk.
>>> 
>>> Thierry
>>>  
>>>> 
>>>> cheers -ben
> 


Re: [Pharo-users] diff'ing with metacello

2017-03-30 Thread Siemen Baader
with: [
spec requires: #('PharoJsTranspiler' 'PharoJsApp' ). ];
package: 'PharoJsTestFramework' with: [
spec requires: #(#PharoJsExporter 'PharoJsBridge' 'PharoJsApp' ). ];
package: #PharoJsTiming with: [
spec requires: #(#PharoJsTranspilerOptimization 'PharoJsBridge' ). ];
package: 'PharoJsTools' with: [
spec requires: #('PharoJsBridge' ). ];
package: 'PharoJsTranspiler' with: [
spec requires: #('ReusableBricks' ). ];
package: #PharoJsTranspilerOptimization with: [
spec requires: #('PharoJsTranspiler' ). ]. ].
! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

ConfigurationOfPharoJS class
instanceVariableNames: ''!

!ConfigurationOfPharoJS class methodsFor: 'loading' stamp: 'NouryBouraqadi
12/6/2016 10:27'!
loadDevelopment
"Load the #development version defined for this platform. The #development
version will change over time and is not expected to be stable."

"self loadDevelopment"


^(self project version: #development) load! !

!ConfigurationOfPharoJS class methodsFor: 'loading' stamp: 'NouryBouraqadi
12/6/2016 10:27'!
load
"Load the #stable version defined for this platform. The #stable version is
the version that is recommended to be used on this platform."

"self load"


^(self project version: #stable) load! !

!ConfigurationOfPharoJS class methodsFor: 'loading' stamp: 'NouryBouraqadi
12/6/2016 10:27'!
loadBleedingEdge
"Load the latest versions of the mcz files defined for this project. It is
not likely that the #bleedingEdge has been tested."

"self loadBleedingEdge"


^(self project version: #bleedingEdge) load! !


!ConfigurationOfPharoJS class methodsFor: 'private' stamp: 'NouryBouraqadi
12/6/2016 10:27'!
ensureMetacello

(self baseConfigurationClassIfAbsent: []) ensureMetacello! !

!ConfigurationOfPharoJS class methodsFor: 'private' stamp: 'NouryBouraqadi
12/6/2016 10:27'!
baseConfigurationClassIfAbsent: aBlock

^Smalltalk
at: #'ConfigurationOf'
ifAbsent: [
self ensureMetacelloBaseConfiguration.
Smalltalk at: #'ConfigurationOf' ifAbsent: aBlock ].! !

!ConfigurationOfPharoJS class methodsFor: 'private' stamp: 'NouryBouraqadi
12/6/2016 10:27'!
ensureMetacelloBaseConfiguration
  Smalltalk
at: #'ConfigurationOf'
ifAbsent: [
  | repository version |
  repository := MCHttpRepository
location: 'http://smalltalkhub.com/mc/dkh/metacello/main'
user: ''
password: ''.
  repository
versionReaderForFileNamed: 'Metacello-Base-dkh.107'
do: [ :reader |
  version := reader version.
  version load.
  version workingCopy repositoryGroup addRepository: repository ]
]! !


!ConfigurationOfPharoJS class methodsFor: 'development support' stamp:
'NouryBouraqadi 12/6/2016 10:27'!
DevelopmentSupport

"See the methods in the 'development support' category on the class-side of
MetacelloBaseConfiguration. Decide what development support methods you
would like to use and copy them the the class-side of your configuration."
! !

!ConfigurationOfPharoJS class methodsFor: 'development support' stamp:
'NouryBouraqadi 12/6/2016 10:27'!
validate
"Check the configuration for Errors, Critical Warnings, and Warnings (see
class comment for MetacelloMCVersionValidator for more information).
Errors identify specification issues that will result in unexpected
behaviour when you load the configuration.
Critical Warnings identify specification issues that may result in
unexpected behavior when you load the configuration.
Warnings identify specification issues that are technically correct, but
are worth take a look at."

"self validate"


self ensureMetacello.
^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #()
recurse: false) explore! !


!ConfigurationOfPharoJS class methodsFor: 'accessing' stamp:
'NouryBouraqadi 12/6/2016 10:27'!
project

^self new project! !


!ConfigurationOfPharoJS class methodsFor: 'metacello tool support' stamp:
'NouryBouraqadi 12/6/2016 10:27'!
isMetacelloConfig
"Answer true and the Metacello tools will operate on you"
^true! !


On Tue, Mar 28, 2017 at 2:56 PM, Ben Coman <b...@openinworld.com> wrote:

> Can you provide a concrete case of two versions you want to compare?
> cheers -ben
>
> On Tue, Mar 28, 2017 at 8:51 PM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
> >
> >
> > Sent from my iPhone
> >
> > On 28/03/2017, at 13.52, Ben Coman <b...@openinworld.com> wrote:
> >
> >> Do you mean the difference between two "ConfigurationXXXmcz" files?
> >
> > I didn't know there were 'ConfigurationOfX.mcz' files. What do they
> contain?
> >
> > What I want to see is what code has changed between two releases. In Git
> I would do it with a diff of the two releases' checksums. In other words, I
> want to see for releases described with metacello what the
> > 

Re: [Pharo-users] diff'ing with metacello

2017-03-28 Thread Siemen Baader


Sent from my iPhone

On 28/03/2017, at 14.56, Ben Coman <b...@openinworld.com> wrote:

> Can you provide a concrete case of two versions you want to compare?
> cheers -ben
> 
Sure! I'm away from the computer but will post one ASAP!

> On Tue, Mar 28, 2017 at 8:51 PM, Siemen Baader <siemenbaa...@gmail.com> wrote:
>> 
>> 
>> Sent from my iPhone
>> 
>> On 28/03/2017, at 13.52, Ben Coman <b...@openinworld.com> wrote:
>> 
>>> Do you mean the difference between two "ConfigurationXXXmcz" files?
>> 
>> I didn't know there were 'ConfigurationOfX.mcz' files. What do they contain?
>> 
>> What I want to see is what code has changed between two releases. In Git I 
>> would do it with a diff of the two releases' checksums. In other words, I 
>> want to see for releases described with metacello what the
>> Monticello browser can show us for versions of packages. Does this make 
>> sense? It seems like a very common use case to me, people must be doing it 
>> all the time, or...?
>> 
>> cheers,
>> Siemen
>> 
>> 
>>> As a workaround, perhaps load one and then from Monticello,
>>> "start" to merge the other from Monticello and you will see a diff between 
>>> them.
>>> 
>>> cheers -ben
>>> 
>>> On Tue, Mar 28, 2017 at 7:06 PM, Siemen Baader <siemenbaa...@gmail.com> 
>>> wrote:
>>>> Hi all,
>>>> 
>>>> is there a tool to diff two Metacello versions with different baselines? I
>>>> tried MetacelloBrowser
>>>> (http://www.squeaksource.com/@6xz1bzmNF75EduBA/vZ263dVA) but it does not
>>>> install on Pharo 5.0.
>>>> 
>>>> I need it to see what has changed when I install a new release of PharoJS
>>>> and to bisect in search for regressions.
>>>> 
>>>> thanks,
>>>> Siemen
> 



Re: [Pharo-users] diff'ing with metacello

2017-03-28 Thread Siemen Baader


Sent from my iPhone

On 28/03/2017, at 13.52, Ben Coman <b...@openinworld.com> wrote:

> Do you mean the difference between two "ConfigurationXXXmcz" files?

I didn't know there were 'ConfigurationOfX.mcz' files. What do they contain? 

What I want to see is what code has changed between two releases. In Git I 
would do it with a diff of the two releases' checksums. In other words, I want 
to see for releases described with metacello what the
Monticello browser can show us for versions of packages. Does this make sense? 
It seems like a very common use case to me, people must be doing it all the 
time, or...?

cheers,
Siemen


> As a workaround, perhaps load one and then from Monticello,
> "start" to merge the other from Monticello and you will see a diff between 
> them.
> 
> cheers -ben
> 
> On Tue, Mar 28, 2017 at 7:06 PM, Siemen Baader <siemenbaa...@gmail.com> wrote:
>> Hi all,
>> 
>> is there a tool to diff two Metacello versions with different baselines? I
>> tried MetacelloBrowser
>> (http://www.squeaksource.com/@6xz1bzmNF75EduBA/vZ263dVA) but it does not
>> install on Pharo 5.0.
>> 
>> I need it to see what has changed when I install a new release of PharoJS
>> and to bisect in search for regressions.
>> 
>> thanks,
>> Siemen
> 



[Pharo-users] diff'ing with metacello

2017-03-28 Thread Siemen Baader
Hi all,

is there a tool to diff two Metacello versions with different baselines? I
tried MetacelloBrowser (
http://www.squeaksource.com/@6xz1bzmNF75EduBA/vZ263dVA) but it does not
install on Pharo 5.0.

I need it to see what has changed when I install a new release of PharoJS
and to bisect in search for regressions.

thanks,
Siemen


Re: [Pharo-users] self in Nautilus

2017-01-31 Thread Siemen Baader
On Fri, Jan 27, 2017 at 9:11 PM, stepharong  wrote:

> I should tell you that I do not like it at all.
> Hey students inside comments self means the class and outside the
> instance! WTF?
>

Which behaviour do you no like, Stef? The current or the one we are
discussing?

>
> I think that we should have another kind of pseudo variable but not self.
>

Also an option and more explicit than `self `working, but meaning something
else than at run-time. In the case where `self` is the current object (as
in the debugger) the code can be executed with DO like when it is later
run. That is what I would find useful for prototyping.

-- Siemen


>
>
> Hi all,
>
> in Nautilus, `self` is always the current class instance. This is great
> for coding class side methods because we can test code fragments live in
> the editor, but for instance side methods I have not seen the usefulness of
> it. At times it can even be confusing and cause errors since a "print it"
> of it looks quite like an instance (`a Listener` vs `Listener`).
>
> Is there a rationale why `self` in instance view does not raise an error
> or is nil? And, more importantly, could there be a way to set it to a
> specific value (= can we browse a class with self bound to an specific
> instance).
>
>
> In Pharo 6 if you tag a class method with
>
>
>...
> ^ return the instance
>
> then you get automatically an icon to get an inspector on the instance.
> From there you can do whatever you want.
>
>
> This would resemble programming in the debugger, but provide the overview
> that a class browser provides.
>
> cheers,
> Siemen
>
>
>
>
>
> --
> Using Opera's mail client: http://www.opera.com/mail/
>


Re: [Pharo-users] self in Nautilus

2017-01-27 Thread Siemen Baader
Hi,

On Fri, Jan 27, 2017 at 4:09 PM, Denis Kudriashov 
wrote:

> Hi Tudor.
>
> 2017-01-27 10:23 GMT+01:00 Tudor Girba :
>
>> > Is there a rationale why `self` in instance view does not raise an
>> error or is nil?
>>
>> That is because you can write: self new and work with an instance.
>
>
> I expect from you some exciting ideas in this direction. :) Because your
> examples framework provide many interesting possibility to work always in
> context of some live instance.
>
> In browser we can add some pluggability to specify what instance use for
> playing in context of selected class or method. By default it could be just
> "self new".
>

Yes, I had ideas along these lines as well. There could be a field above
the code panel that defines self as self new, which could be changed
accordingly..


> It will gives many interesting options:
> - when "examplar" method is selected "self" will point to describing
> instance.
> - when browser is opened from debugger or inspector "self" will point to
> current object from these tools.
> - type hints. No type inference - just live information
> - LightTable features. When method is selected, it executed in background
> and browser collects and show live data: temp types, values, execution
> could, dead code, also visualization if possible.
>
> So it could add many power to our environment.
>

-- Siemen


Re: [Pharo-users] self in Nautilus

2017-01-27 Thread Siemen Baader
Hi Tudor,

On Fri, Jan 27, 2017 at 10:23 AM, Tudor Girba  wrote:

>
> >
> > Is there a rationale why `self` in instance view does not raise an error
> or is nil?
>
> That is because you can write: self new and work with an instance.
>

ok.


>
> > And, more importantly, could there be a way to set it to a specific
> value (= can we browse a class with self bound to an specific instance).
> > This would resemble programming in the debugger, but provide the
> overview that a class browser provides.
>
> You can do that to some extent in the Meta tab of the inspector.
>

The inspector. Another great place to write code. I should use it more for
that also - thanks!

-- Siemen


[Pharo-users] self in Nautilus

2017-01-27 Thread Siemen Baader
Hi all,

in Nautilus, `self` is always the current class instance. This is great for
coding class side methods because we can test code fragments live in the
editor, but for instance side methods I have not seen the usefulness of it.
At times it can even be confusing and cause errors since a "print it" of it
looks quite like an instance (`a Listener` vs `Listener`).

Is there a rationale why `self` in instance view does not raise an error or
is nil? And, more importantly, could there be a way to set it to a specific
value (= can we browse a class with self bound to an specific instance).

This would resemble programming in the debugger, but provide the overview
that a class browser provides.

cheers,
Siemen


Re: [Pharo-users] singleton trait

2017-01-19 Thread Siemen Baader
On Thu, Jan 19, 2017 at 3:51 PM, Siemen Baader <siemenbaa...@gmail.com>
wrote:

>
> On Thu, Jan 19, 2017 at 11:33 AM, Cyril Ferlicot D. <
> cyril.ferli...@gmail.com> wrote:
>
>>
>> You just need a class variable #UniqueInstance and those methods:
>>
>> current
>> "Can also be named #default or #instance"
>> ^ UniqueInstance
>> ifNil: [ UniqueInstance := self basicNew; initialize;
>> yourself ]
>>
>
Actually this should have been: (no `;` between basicNew and initialize).

^ currentInstance
ifNil: [ currentInstance := self basicNew
initialize;
yourself ]

This is not a problem. But it illustrates that this would be nice to have
it unit tested separately and mixed in with a trait/mixin to avoid the risk
of manual errors in what in the end is an already solved problem - if one
wants singletons, of course.

:)

Siemen

>
> Wouldn't a class instance variable be better? I want new singletons for
> every subclass. http://rmod-pharo-mooc.lille.inria.fr/MOOC/Slides/Week3/
> C019-W3S03-Basic-Variables.pdf
>
> I would also have used super new, why BasicNew? But my wish to create
> subclasses seems to answer that already.
>
> Thanks for your find-grained example, Cyril!
>
> Siemen
>


Re: [Pharo-users] singleton trait

2017-01-19 Thread Siemen Baader
On Thu, Jan 19, 2017 at 11:33 AM, Cyril Ferlicot D. <
cyril.ferli...@gmail.com> wrote:

>
> You just need a class variable #UniqueInstance and those methods:
>
> current
> "Can also be named #default or #instance"
> ^ UniqueInstance
> ifNil: [ UniqueInstance := self basicNew; initialize;
> yourself ]
>

Wouldn't a class instance variable be better? I want new singletons for
every subclass.
http://rmod-pharo-mooc.lille.inria.fr/MOOC/Slides/Week3/C019-W3S03-Basic-Variables.pdf

I would also have used super new, why BasicNew? But my wish to create
subclasses seems to answer that already.

Thanks for your find-grained example, Cyril!

Siemen


Re: [Pharo-users] singleton trait

2017-01-19 Thread Siemen Baader
On Thu, Jan 19, 2017 at 11:37 AM, Sven Van Caekenberghe <s...@stfx.eu>
wrote:

> The Traits would be cool to standardise the behaviour and to mark it as
> such (implicit documentation)


Exactly.


> , however, Traits cannot add instance/class variables IIUC, that limits
> what they can do (and would make it more than one step).
>

Ok. So that's the difference between a Ruby mixin and a trait. That's a
shame, I think what Ruby does with mixins is really nice because it a)
results in less code to test, and b) makes hineritance chains more semantic
- you only inherit to model spcialization, not to reuse features.

Cyril, many thanks! I know how to implement it and it is true that it is
not much, but I had hoped to eliminate the code (and tests!) and use a
standard feature if possible ;)

-- Siemen


>
> > On 19 Jan 2017, at 11:33, Cyril Ferlicot D. <cyril.ferli...@gmail.com>
> wrote:
> >
> > On 19/01/2017 11:23, Siemen Baader wrote:
> >> Is there a trait to quickly create singletons in Pharo, along the way of
> >> the Ruby Singleton mixin?
> >>
> >> https://ruby-doc.org/stdlib-1.9.3/libdoc/singleton/rdoc/Singleton.html
> >>
> >> (and ideally also observer/observable, which I am going to need next..)
> >>
> >> -- Siemen
> >
> > Hi!
> >
> > Singleton in Smalltalk are really easy so there is no Trait.
> >
> > You just need a class variable #UniqueInstance and those methods:
> >
> > current
> >"Can also be named #default or #instance"
> >   ^ UniqueInstance
> >   ifNil: [ UniqueInstance := self basicNew; initialize;
> yourself ]
> >
> > new
> >   ^ self error: 'I am a Singleton. Use current to get my instance or
> > reset my instance with a new project. Maybe explain why there is a
> > Singleton because we should avoid them if possible.'
> >
> >
> > Now for the observer pattern you have the Announcement framework in
> Pharo.
> >
> > I don't really have the time to explain but I think there is some doc on
> > internet and on the help browser of Pharo. I found this:
> > http://pharo.gemtalksystems.com/book/LanguageAndLibraries/announcements/
> > (I did not read it so I don't know what it's worth)
> >
> > --
> > Cyril Ferlicot
> >
> > http://www.synectique.eu
> >
> > 2 rue Jacques Prévert 01,
> > 59650 Villeneuve d'ascq France
> >
>
>
>


[Pharo-users] singleton trait

2017-01-19 Thread Siemen Baader
Is there a trait to quickly create singletons in Pharo, along the way of
the Ruby Singleton mixin?

https://ruby-doc.org/stdlib-1.9.3/libdoc/singleton/rdoc/Singleton.html

(and ideally also observer/observable, which I am going to need next..)

-- Siemen


Re: [Pharo-users] making scroll smooth

2017-01-13 Thread Siemen Baader
There must be a place that defines that scroll should happen by a line
height, rather than continuously... Does anyone know where to look?

-- Siemen


Re: [Pharo-users] Google visibility?

2017-01-13 Thread Siemen Baader
On Fri, Jan 13, 2017 at 11:14 AM, jtuc...@objektfabrik.de <
jtuc...@objektfabrik.de> wrote:

> To be honest, I think our answer doesn't really fit to the original post
> ;-)
>
> It's like "once you are in front of the store, you'll know how to find
> it!". ;-)
>
> So the topic of this thread is that maybe some SEO is needed rather than
> educating people in searching better ;-)
>

Yes, that was my point..

Thanks for the discussion though :)

Perhaps it would make sense to add that custom search to Pharo.org. I
looked into it, but it seemed that one has to pay for that.. Maybe am wrong.

-- Siemen


[Pharo-users] Google visibility?

2017-01-12 Thread Siemen Baader
Has anybody looked into SEO'ing any of the great documentation and archived
questions on the mailing list?

It strikes me that I often can't find the answer to questions I have on
Google, but they are often answered in material that I can find when I look
manually for some time or am pointed at it by an experienced member of the
community.

I also  miss Pharo - content on Stackoverflow, it is a very efficient way
to get past road blocks quickly.

Any thoughts or history to bring me up to speed with?

cheers,
Siemen


Re: [Pharo-users] making scroll smooth

2017-01-11 Thread Siemen Baader
Thanks - I did it and it seems (also from the docs) to affect the
framerate, not the discrete scroll-behaviour. Nautilus panels scroll by ca.
one line height, I want them to scroll continously, by one pixel only at a
time..

-- Siemen

On Tue, Jan 10, 2017 at 6:16 PM, p...@highoctane.be <p...@highoctane.be>
wrote:

> Try this:
>
> WorldState MinCycleLapse: 16.
>
> Should make things better.
>
> Phil
>
> On Tue, Jan 10, 2017 at 5:40 PM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I'm used to and like the smooth scrolling of modern browsers and OS'es
>> and miss it in Pharo. It as discrete scroll deltas; when I scroll it moves
>> the window content by several pixels or not at all if the movement is below
>> a certain threshold. How can I enable smooth scroll / set that threshold to
>> 1px? And how could I learn if I did not ask on the list?
>>
>> thanks,
>> Siemen
>>
>
>


[Pharo-users] making scroll smooth

2017-01-10 Thread Siemen Baader
Hi All,

I'm used to and like the smooth scrolling of modern browsers and OS'es and
miss it in Pharo. It as discrete scroll deltas; when I scroll it moves the
window content by several pixels or not at all if the movement is below a
certain threshold. How can I enable smooth scroll / set that threshold to
1px? And how could I learn if I did not ask on the list?

thanks,
Siemen


Re: [Pharo-users] understanding existing code

2017-01-07 Thread Siemen Baader
Thanks for all these tips and reflections. There are a number of things for
me to try now.

@Hilaire: I'll try try Calypso. There are indeed several things one could
experiment with in making the important connections more visible in the
development tools. I have also been thinking of a more OSX/GT like browser
design that just opens new panels to the right and opens inheritance view,
code view, class side methods in that way too... it would be more compact
and uniform and easier to put relevant pieces side-by-side.

@Ben: Clever to use the profiler to see what the code does most of, I
didn't think of it.

Also thanks for your tips on the general workflow of understanding the
code, everyone. I'm glad you have provided so much input and discussion, I
was following it eagerly.

thanks,
Siemen


Re: [Pharo-users] understanding existing code

2017-01-06 Thread Siemen Baader
On Thu, Jan 5, 2017 at 9:33 PM, Dimitris Chloupis 
wrote:

> After 5 years of using Pharo by far the best way to understand code is to
> ask questions here.
>
> I have read and still read a fair amount of code, but in 50% of the cases
> I have no clue what I am reading because following the chain of method
> calls can be confusing and frustrating even inside a cool IDE like that of
> Pharo.
>
> The good news is that pharoers here we have each our area of "expertise"
> even those like me that cannot be regarded as "pharo experts".
>

Yes, the mailing list is awesome!


Re: [Pharo-users] understanding existing code

2017-01-06 Thread Siemen Baader
On Thu, Jan 5, 2017 at 9:13 PM, p...@highoctane.be <p...@highoctane.be>
wrote:

> Another option:
>
> Use the Moose Image and explore code using Roassal.
> http://www.moosetechnology.org/#install
>
>
This is an interesting approach. Thanks!


> Check
>
> http://agilevisualization.com/
>
> Also RTUMLClassBuilder can be useful.
>
> http://forum.world.st/Addling-lines-to-RTUMLClassBuilder-td4876221.html
>
>
>
> Phil
>
> On Thu, Jan 5, 2017 at 8:24 PM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I may be missing the obvious, but what are good strategies to understand
>> the structure of existing code? Specifically, I'm trying to understand more
>> of PharoJS to solve my own problems and eventually also to contribute back
>> - but this is a general question.
>>
>> There is this one MOOC exercise: http://rmod-pharo-mo
>> oc.lille.inria.fr/MOOC/Exercises/Exercises-Pillar/Pillar-Questions.pdf
>> that helps, and reading tests and comments helps if they exist. But I often
>> get trapped in drilling down a long call stack and opening many, many
>> browser windows, a new one for every message send to a new class.
>>
>> While writing this it occured to me that I can use the debugger to follow
>> a call stack by putting a breakpoint in the top level method, then stepping
>> down using the debugger. There is also a MOOC lecture on that that I will
>> look at again,  http://rmod-pharo-mooc.lille.
>> inria.fr/MOOC/Videos/W5/C019-W2S-VideosDebugger1-UsingTheDeb
>> ugger-V2-HD_720p_4Mbs.m4v.
>>
>> Any tips? I think I don't see the forest for the trees here I'm afraid :)
>>
>> thanks,
>> Siemen
>>
>
>


Re: [Pharo-users] seaside javascript builders

2016-12-10 Thread Siemen Baader
Thanks, that was very helpful!

Siemen

Sent from my iPhone

On 09/12/2016, at 19.45, "p...@highoctane.be" <p...@highoctane.be> wrote:

> I guess that's where passengers: come handy.
> 
> Because what you pass can be the result of a jQuery.
> 
> TBH sometimes it is easier to do a JSStream on: 'some js code that does what 
> you want' instead of wondering for ages how to do the same with the 
> Javascript classes, subclasses and methods.
> 
> Look into the test packages for lots of examples. That helped me.
> 
> Phil
> 
> On Fri, Dec 9, 2016 at 2:20 PM, Siemen Baader <siemenbaa...@gmail.com> wrote:
>> Hi all,
>> 
>> I'm confused about the limitations and intended use of Seaside's javascript
>> builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or
>> "html javascript alert: 'hello'" within the "renderContentOn: html" methods,
>> but how do I deal with logic and variables? How do I eg. install an event
>> listener and provide a browser-side function that extracts data from the
>> event and then passes it to the server via "html jQuery ajax"?
>> 
>> Is this something to be done in pure JS returned from the #script method?
>> 
>> Thanks for any enlightenment!
>> 
>> Siemen
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://forum.world.st/seaside-javascript-builders-tp4926336.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 


Re: [Pharo-users] seaside javascript builders

2016-12-09 Thread Siemen Baader
Thanks, I was unaware of the seaside list!

cheers,
Siemen

On Fri, Dec 9, 2016 at 5:18 PM, Ben Coman <b...@openinworld.com> wrote:

>
>
> On Fri, Dec 9, 2016 at 9:20 PM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
>
>> Hi all,
>>
>> I'm confused about the limitations and intended use of Seaside's
>> javascript
>> builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or
>> "html javascript alert: 'hello'" within the "renderContentOn: html"
>> methods,
>> but how do I deal with logic and variables? How do I eg. install an event
>> listener and provide a browser-side function that extracts data from the
>> event and then passes it to the server via "html jQuery ajax"?
>>
>> Is this something to be done in pure JS returned from the #script method?
>>
>> Thanks for any enlightenment!
>>
>> Siemen
>>
>>
> Hi Siemen,
>
> Sorry I can't help, I'm not a seaside user - but depending on your
> response here you might also like to try
> http://www.seaside.st/community/mailinglist
>
> cheers -ben
>


[Pharo-users] seaside javascript builders

2016-12-09 Thread Siemen Baader
Hi all,

I'm confused about the limitations and intended use of Seaside's javascript
builders. I can follow that we can do eg: "(html jQuery: 'div') remove" or
"html javascript alert: 'hello'" within the "renderContentOn: html" methods,
but how do I deal with logic and variables? How do I eg. install an event
listener and provide a browser-side function that extracts data from the
event and then passes it to the server via "html jQuery ajax"? 

Is this something to be done in pure JS returned from the #script method?

Thanks for any enlightenment!

Siemen



--
View this message in context: 
http://forum.world.st/seaside-javascript-builders-tp4926336.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] MOOC TOC cleanup

2016-11-12 Thread Siemen Baader
Hi Stef,

On Fri, Nov 11, 2016 at 10:44 PM, stepharo [via Smalltalk] <
ml-node+s1294792n4922764...@n4.nabble.com> wrote:
>
> I have a question why the lecture do not have a video icon too? For
> example for the first week.
> Because now it gives the impression that we do not have videos for the
> lectures.
>

No, they should be there – I have just not included them yet because I
didn't know which strategy we should use to embed the subtitles. There will
be icons for both slides and video. And now that I have seen that there are
slide.js slides I will use them instead of PDF because this is snappier in
the browser.

>
> Normally they should be on canalU. I should check
> and in fact we could give them all your work + our data so that they
> publish everything in CanalU.
>

Sure.

> Would you prefer a 'full', downloadable solution with the videos and
> subtitles all on mooc.pharo.org?
>
> What do you mean?


See below:


>  I would like to be able to package it and put it on large USB stick
> and send it to all the teachers I know.
>

This is a cool use case. I just googled
https://www.customusb.com/spin-flash-drive/, but haven't checked throughly.
This means I will make individual HTML files for the videos with 
tags and subtitles in them, and we can download all the content, open it in
a web browser via the file:// protocol and use the MOOC offline.

I will make a small wget command line snippet that people can use to
download the whole site recursively and put that on the bottom of the page.
Like on get.pharo.org.

> I have a put up a preview on https://siemenbaader.
> github.io/PharoMooc-website/.
>
> What do you think?
>
> I love it :)
>

I'm glad to hear that ;)

-- Siemen




--
View this message in context: 
http://forum.world.st/MOOC-TOC-cleanup-tp4921304p4922802.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] MOOC TOC cleanup

2016-11-10 Thread Siemen Baader
Hi Offray,

I'm not sure if this answers your question, but: the French and English
subtitle files in .vtt and .srt format are already online in directories
like
http://rmod-pharo-mooc.lille.inria.fr/MOOC/Videos/W1/C019SD-W1-sous-titres-EN/
and similar. They are linked from the main page under 'videos'. I am
looking for a way to include them in the video, that would allow you to
switch among them while the video is playing. As I said, this is a preview
of work in progress.

What is it that you would like to help with using Amara? Integrating the
subtitles or creating new ones in other languages? I'm not sure I totally
understand Amara :)

cheers,
Siemen


Re: [Pharo-users] MOOC TOC cleanup

2016-11-09 Thread Siemen Baader
On 10/11/2016, at 07.32, "Sven Van Caekenberghe-2 [via Smalltalk]" 
<ml-node+s1294792n4922444...@n4.nabble.com> wrote:

> Wow, this is beautiful, well done ! 

Thanks, I'm glad you like it. I like your zinc docs ;)

Siemen
> 
> > On 10 Nov 2016, at 07:21, Siemen Baader <[hidden email]> wrote: 
> > 
> > Hi Stef, 
> > 
> > I have cloned the repository and linked the slides directly from the TOC. I 
> > also have styled it with Bootstrap labels and glyphicons, and added anchors 
> > to every item to make them easily linkable, eg for discussions on the 
> > mailing list / slack. 
> > 
> > The HTML files for the exercises refer to the directory 'support' ( 
> > http://rmod-pharo-mooc.lille.inria.fr/MOOC/support ) for css and js files. 
> > I think you have missed to put the directory on the server, the links are 
> > broken. Can you upload it? 
> > 
> > As for the videos, they require some sort of aggregation of subtitles and 
> > video, either in a separate HTML file with  tags, or eg. on youtube. 
> > At some point during or after the MOOC I remember the videos were in fact 
> > on youtube, with subtitles. Now they are back in the custom made player on 
> > fun-mooc.fr, which is a bit impractical because the subtitles are on the 
> > right side, slightly out of view when attending to the lecture. 
> > 
> > Are the videos still on youtube? I could not find them again. 
> > 
> > Would you prefer a 'full', downloadable solution with the videos and 
> > subtitles all on mooc.pharo.org? It would be relatively easy to script 
> > something that generates the html files, but it would take more time than 
> > linking to the youtube videos, and I think the playback experience on 
> > youtube would actually be better / more cross-platform. 
> > 
> > I have a put up a preview on 
> > https://siemenbaader.github.io/PharoMooc-website/. 
> > 
> > What do you think? 
> > 
> > best, 
> > Siemen 
> > 
> > 
> > On Thu, Nov 3, 2016 at 6:31 PM, stepharo <[hidden email]> wrote: 
> > 
> > 
> > Le 3/11/16 à 18:05, Siemen Baader a écrit : 
> >> Hi Stef, 
> >> 
> >> Sure. 
> >> Let me know how I can help. 
> >> I will forward your mail to christelle that manages the mooc for us 
> >> 
> >> Thanks. I'm looking forward to hear from her. 
> > She translated the page but she is busy I forwarded the email to you. 
> >> 
> >> 
> >> Siemen 
> >> did you see the web portal 
> >> http://rmod-pharo-mooc.lille.inria.fr/MOOC/WebPortal/co/pharo.html (we 
> >> should add a pointer from http://mooc.pharo.org to it) 
> >> and also the http://mooc.pharo.org page? because we have the full 
> >> control on this one. 
> >> And this is on my todo to make sure that people can get an archive with 
> >> the complete mooc nicely packaged. 
> >> Now if you want to help it would be great. 
> >> 
> >> Sure, we could either do it at fun-mooc.fr or mooc.pharo.org. The latter 
> >> is cleaner and open to all. How do you generate it, and where is the 
> >> source? I'd like to have a look. 
> > The source is on github. 
> > https://github.com/SquareBracketAssociates/PharoMooc-website
> > 
> >> What is the role of WebPortal? 
> > the idea was to propose a package to user and we were paid and forced to 
> > use this format. 
> > I would prefer plain HTML (or even pillar). 
> >> 
> >> best, 
> >> Siemen 
> >> 
> >> 
> >> View this message in context: Re: MOOC TOC cleanup 
> >> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. 
> > 
> >
> 
> 
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://forum.world.st/MOOC-TOC-cleanup-tp4921304p4922444.html
> To unsubscribe from MOOC TOC cleanup, click here.
> NAML




--
View this message in context: 
http://forum.world.st/MOOC-TOC-cleanup-tp4921304p4922446.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] MOOC TOC cleanup

2016-11-09 Thread Siemen Baader
Hi Stef,

I have cloned the repository and linked the slides directly from the TOC. I
also have styled it with Bootstrap labels and glyphicons, and added anchors
to every item to make them easily linkable, eg for discussions on the
mailing list / slack.

The HTML files for the exercises refer to the directory 'support' (
http://rmod-pharo-mooc.lille.inria.fr/MOOC/support ) for css and js files.
I think you have missed to put the directory on the server, the links are
broken. Can you upload it?

As for the videos, they require some sort of aggregation of subtitles and
video, either in a separate HTML file with  tags, or eg. on youtube.
At some point during or after the MOOC I remember the videos were in fact
on youtube, with subtitles. Now they are back in the custom made player on
fun-mooc.fr, which is a bit impractical because the subtitles are on the
right side, slightly out of view when attending to the lecture.

Are the videos still on youtube? I could not find them again.

Would you prefer a 'full', downloadable solution with the videos and
subtitles all on mooc.pharo.org? It would be relatively easy to script
something that generates the html files, but it would take more time than
linking to the youtube videos, and I think the playback experience on
youtube would actually be better / more cross-platform.

I have a put up a preview on
https://siemenbaader.github.io/PharoMooc-website/.

What do you think?

best,
Siemen


On Thu, Nov 3, 2016 at 6:31 PM, stepharo <steph...@free.fr> wrote:

>
>
> Le 3/11/16 à 18:05, Siemen Baader a écrit :
>
> Hi Stef,
>
> Sure.
>> Let me know how I can help.
>> I will forward your mail to christelle that manages the mooc for us
>>
>
> Thanks. I'm looking forward to hear from her.
>
> She translated the page but she is busy I forwarded the email to you.
>
>
>
>> Siemen
>> did you see the web portal
>> http://rmod-pharo-mooc.lille.inria.fr/MOOC/WebPortal/co/pharo.html (we
>> should add a pointer from http://mooc.pharo.org to it)
>> and also the http://mooc.pharo.org page? because we have the full
>> control on this one.
>> And this is on my todo to make sure that people can get an archive with
>> the complete mooc nicely packaged.
>> Now if you want to help it would be great.
>>
>
> Sure, we could either do it at fun-mooc.fr or mooc.pharo.org. The latter
> is cleaner and open to all. How do you generate it, and where is the
> source? I'd like to have a look.
>
> The source is on github.
> https://github.com/SquareBracketAssociates/PharoMooc-website
>
> What is the role of WebPortal?
>
> the idea was to propose a package to user and we were paid and forced to
> use this format.
> I would prefer plain HTML (or even pillar).
>
>
> best,
> Siemen
>
>
> --
> View this message in context: Re: MOOC TOC cleanup
> <http://forum.world.st/MOOC-TOC-cleanup-tp4921304p4921361.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.
>
>
>


Re: [Pharo-users] MOOC TOC cleanup

2016-11-03 Thread Siemen Baader
Hi Stef,

Sure.
> Let me know how I can help.
> I will forward your mail to christelle that manages the mooc for us
>

Thanks. I'm looking forward to hear from her.


> Siemen
> did you see the web portal
> http://rmod-pharo-mooc.lille.inria.fr/MOOC/WebPortal/co/pharo.html (we
> should add a pointer from http://mooc.pharo.org to it)
> and also the http://mooc.pharo.org page? because we have the full
> control on this one.
> And this is on my todo to make sure that people can get an archive with
> the complete mooc nicely packaged.
> Now if you want to help it would be great.
>

Sure, we could either do it at fun-mooc.fr or mooc.pharo.org. The latter is
cleaner and open to all. How do you generate it, and where is the source?
I'd like to have a look.

What is the role of WebPortal?

best,
Siemen




--
View this message in context: 
http://forum.world.st/MOOC-TOC-cleanup-tp4921304p4921361.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] MOOC TOC cleanup

2016-11-03 Thread Siemen Baader
Hi all, especially Luc, Stéphane and Damien,

the Pharo MOOC course was fantastic and I use the archived material for
reference quite a lot. It is here:

https://www.fun-mooc.fr/courses/inria/41010/session01/b116d12e24ec484c984831440227ac15/

But - the English table of contents is in French, and the attached ZIP files
need to be downloaded before they can be browsed. It gets quite messy. Would
anyone with the required permissions be OK to:

- translate the TOC to English
- split the ZIP files into separate elements under their respective
headlines that can be viewed in the browser

or

- grant me the permissions to do this work for the community?

best,
Siemen



--
View this message in context: 
http://forum.world.st/MOOC-TOC-cleanup-tp4921304.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Adopting someone else's image

2016-09-10 Thread Siemen Baader
Thanks. I found out that I had two unrelated problems. Spotter was one and
not critical, and the reason I had errors with Monticello was that I had
made the mistake to rename the .image file, so it didn't match the changes
file anymore.

Siemen 



--
View this message in context: 
http://forum.world.st/Adopting-someone-else-s-image-tp4914933p4915049.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Adopting someone else's image

2016-09-09 Thread Siemen Baader
Hi, 

I am having a problem using an image that was saved by a different user on a
different machine.

I'm trying to get started with PharoJS and have downloaded the Pharo 4.0
image from https://pharojs.github.io/faq.html#demoEsug2016. When I load the
image Spotter raises errors becasue it holds on to a FileSystem object that
holds a path within the previous user's local home directory. When I use
Montichello browser to export the packages I need to disk or online
repository, I get Error: RemoteString past end of file errors - I think this
is because Montichello tries to read the changes file and cannot.

What can I do? Is there a proper way to re-initialize the host dependent
state when taking over someone else's image? I know the preferred way to
share code without state is to use Montichello...

thanks



--
View this message in context: 
http://forum.world.st/Adopting-someone-else-s-image-tp4914933.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] restoring a deleted method

2016-04-29 Thread Siemen Baader
On Mon, Apr 25, 2016 at 4:50 PM, Nicolai Hess  wrote:

>
> This should work in Pharo 5.0
>

Thanks. I'll look forward to that then :)

-- Siemen


Re: [Pharo-users] restoring a deleted method

2016-04-24 Thread Siemen Baader
Thanks, I'll have a look!


On Sun, Apr 24, 2016 at 4:49 PM, Peter Uhnák <i.uh...@gmail.com> wrote:

> I don't know about Change Sorter because I've never used it, but you
> should still be able to find & recover the method through "Recover lost
> changes"/Changes Browser tool.
>
> Or grep the *.changes file.
>
> Peter
>
> On Sun, Apr 24, 2016 at 2:40 PM, Siemen Baader <siemenbaa...@gmail.com>
> wrote:
>
>> Hi,
>>
>> according to Pharo By Example [1], I should be able to retrieve a deleted
>> method in the Change Sorter by right-clicking it and browsing old versions.
>> However, I get the message 'Sorry, only actual methods have retrievable
>> versions'.
>>
>> Is this a bug, and is there a workaround?
>>
>> best,
>> Siemen
>>
>> 1: http://pharo.gforge.inria.fr/PBE1/PBE1ch7.html
>>
>
>


[Pharo-users] restoring a deleted method

2016-04-24 Thread Siemen Baader
Hi,

according to Pharo By Example [1], I should be able to retrieve a deleted
method in the Change Sorter by right-clicking it and browsing old versions.
However, I get the message 'Sorry, only actual methods have retrievable
versions'.

Is this a bug, and is there a workaround?

best,
Siemen

1: http://pharo.gforge.inria.fr/PBE1/PBE1ch7.html


Re: [Pharo-users] [ANN] Introspect web content (Soup with some GT extensions)

2016-04-16 Thread Siemen Baader
On Thu, Apr 14, 2016 at 1:01 PM, Torsten Bergmann  wrote:

> Hi,
>
> I added a few GT inspector extensions to Soup and cleaned up a little bit.
> Released as a new version 1.8 of Soup - you will find easily in Catalog
> for Pharo 5 or by opening Spotter and entering "Soup" to load.
>

That is very nice, thanks!

-- Siemen


Re: [Pharo-users] Dawn Theme on Pharo 4.0

2016-04-16 Thread Siemen Baader
Hi again,

I have cloned the Pharo3DawnTheme on github and updated the installation
instructions to work for Pharo 4.0. It is on
https://github.com/siemenbaader/Pharo3DawnTheme.

Would it be better for the community to use Smalltalkhub, or is Github the
new thing people prefer?

Have a nice weekend all,

Siemen


On Wed, Apr 13, 2016 at 11:56 AM, Siemen Baader <siemenbaa...@gmail.com>
wrote:

>
>
> On Tue, Apr 12, 2016 at 8:54 PM, stepharo [via Smalltalk] <
> ml-node+s1294792n4889618...@n4.nabble.com> wrote:
>
>> Super!
>> Could you publish it somewhere because for my vision I cannot use the
>> dark theme.
>>
>
>
> Sure - I'll do that. I'm new to Pharo and have to look a bit into how, but
> I can make a fork on github and update the installation instructions or
> publish a package for pharo4 on Smalltalkhub. Do you prefer either site?
>
> -- Siemen
>
>
>
>> I cannot see what is written in red :).
>>
>> Stef
>>
>> Le 12/4/16 20:47, Siemen Baader a écrit :
>>
>> On Tue, Apr 12, 2016 at 7:43 PM, stepharo <[hidden email]
>> <http:///user/SendEmail.jtp?type=node=4889618=0>> wrote:
>>
>>> Check the code because it should just be a subclass of the dark theme
>>> with different colors.
>>>
>>> Stef
>>>
>>
>> Thanks, that helped me to adapt the instructions and make it work!
>>
>> -- Siemen
>>
>>
>>
>>
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://forum.world.st/Dawn-Theme-on-Pharo-4-0-tp4889541p4889618.html
>> To unsubscribe from Dawn Theme on Pharo 4.0, click here
>> <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code=4889541=c2llbWVuYmFhZGVyQGdtYWlsLmNvbXw0ODg5NTQxfDIxMzM0OTg3Nw==>
>> .
>> NAML
>> <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>




--
View this message in context: 
http://forum.world.st/Dawn-Theme-on-Pharo-4-0-tp4889541p4890307.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Dawn Theme on Pharo 4.0

2016-04-13 Thread Siemen Baader
On Tue, Apr 12, 2016 at 8:54 PM, stepharo [via Smalltalk] <
ml-node+s1294792n4889618...@n4.nabble.com> wrote:

> Super!
> Could you publish it somewhere because for my vision I cannot use the dark
> theme.
>


Sure - I'll do that. I'm new to Pharo and have to look a bit into how, but
I can make a fork on github and update the installation instructions or
publish a package for pharo4 on Smalltalkhub. Do you prefer either site?

-- Siemen



> I cannot see what is written in red :).
>
> Stef
>
> Le 12/4/16 20:47, Siemen Baader a écrit :
>
> On Tue, Apr 12, 2016 at 7:43 PM, stepharo <[hidden email]
> <http:///user/SendEmail.jtp?type=node=4889618=0>> wrote:
>
>> Check the code because it should just be a subclass of the dark theme
>> with different colors.
>>
>> Stef
>>
>
> Thanks, that helped me to adapt the instructions and make it work!
>
> -- Siemen
>
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Dawn-Theme-on-Pharo-4-0-tp4889541p4889618.html
> To unsubscribe from Dawn Theme on Pharo 4.0, click here
> <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code=4889541=c2llbWVuYmFhZGVyQGdtYWlsLmNvbXw0ODg5NTQxfDIxMzM0OTg3Nw==>
> .
> NAML
> <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://forum.world.st/Dawn-Theme-on-Pharo-4-0-tp4889541p4889688.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Dawn Theme on Pharo 4.0

2016-04-12 Thread Siemen Baader
On Tue, Apr 12, 2016 at 7:43 PM, stepharo  wrote:

> Check the code because it should just be a subclass of the dark theme
> with different colors.
>
> Stef
>

Thanks, that helped me to adapt the instructions and make it work!

-- Siemen


[Pharo-users] Dawn Theme on Pharo 4.0

2016-04-12 Thread Siemen Baader
Hi all,

has anybody had luck using Sebastian's Dawn Theme [1] on Pharo 4.0? The
instructions on github are for Pharo 3.0 - what would I do to make it work
on my 4.0 image?

thanks,
Siemen

1: https://github.com/sebastianconcept/Pharo3DawnTheme



--
View this message in context: 
http://forum.world.st/Dawn-Theme-on-Pharo-4-0-tp4889541.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.