Pharo .image loading issues.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo .image loading issues.

Mohammad Al Houssami (Alumni)

Hello All 

 

Im working on an HTML5 parser in smalltalk as part of my postgraduate project.

Im completely new to pharo and smalltalk and I've been working with it for around a week now. It was the first time I close pharo. I was trying to load the image file but I couldn’t and pahro was complaining with errors. This is what I get:

cid:image002.jpg@01CE1DC1.989EA330

If I keep on clicking proceed I get to this:

 

cid:image003.jpg@01CE1DC8.19CEEFE0

 

 

I have no idea at all why this is happening. This is the first time I load the image to pharo. What I did was I opened the image file with pharo. Im not sure if this might be causing the problem.

 

Any help would really be appreciated.
Thank You

 

Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Mohammad Al Houssami (Alumni)

Hey Hilaire,

 

What I was doing is going to the image file and opening it using pharo. That exactly Is by right click--> open with --> pharo.
Draging the image into pharo also it says the following : File 'HTML5.PARSER.image' is 20849204 bytes long.

You may use the 'get' command to read the entire file.

 

Get reads the first 5000 chars in the file which show as gibberish text. Below is the image

 

 

 

Many Thanks

Mohammad

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Hilaire Fernandes
Sent: Monday, March 11, 2013 11:15 AM
To: [hidden email]
Subject: Re: [Pharo-users] Pharo .image loading issues.

 

You mean the error occurs right after you drag and drop the pharo image over the VM application?

 

Hilaire

 

 

 

--

Dr. Geo http://drgeo.eu

 

 

 

 

-----

No virus found in this message.

Checked by AVG - www.avg.com

Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13

Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

philippeback
In reply to this post by Mohammad Al Houssami (Alumni)
That's weird.

The image oviously loads since you do have screenshots to show.
Also, given the shape of the icons in the second capture, it looks like an old Pharo to me (kind of like 1.3 or something).

Which version do you use?
Which VM?

Can you make your image available somewhere so that we can have a look?

Rgds,
Phil

2013/3/11 Mohammad Al Houssami (Alumni) <[hidden email]>

Hello All 

 

Im working on an HTML5 parser in smalltalk as part of my postgraduate project.

Im completely new to pharo and smalltalk and I've been working with it for around a week now. It was the first time I close pharo. I was trying to load the image file but I couldn’t and pahro was complaining with errors. This is what I get:

cid:image002.jpg@01CE1DC1.989EA330

If I keep on clicking proceed I get to this:

 

cid:image003.jpg@01CE1DC8.19CEEFE0

 

 

I have no idea at all why this is happening. This is the first time I load the image to pharo. What I did was I opened the image file with pharo. Im not sure if this might be causing the problem.

 

Any help would really be appreciated.
Thank You

 


Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Mohammad Al Houssami (Alumni)

Thanks for the reply Phil.
I downloaded the version on the pharo website 2 weeks ago.  The VM version is 4.0.2 and pharo 1.4

Here is a dropbox link for the image and changes files. https://www.dropbox.com/sh/jxp087wrt2lwcch/Ij0ji1DEFB

 

Thanks again

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: Monday, March 11, 2013 11:30 AM
To: A friendly place where any question about pharo is welcome
Subject: Re: [Pharo-users] Pharo .image loading issues.

 

That's weird.

 

The image oviously loads since you do have screenshots to show.

Also, given the shape of the icons in the second capture, it looks like an old Pharo to me (kind of like 1.3 or something).

 

Which version do you use?

Which VM?

 

Can you make your image available somewhere so that we can have a look?

 

Rgds,

Phil

2013/3/11 Mohammad Al Houssami (Alumni) <[hidden email]>

Hello All 

 

Im working on an HTML5 parser in smalltalk as part of my postgraduate project.

Im completely new to pharo and smalltalk and I've been working with it for around a week now. It was the first time I close pharo. I was trying to load the image file but I couldn’t and pahro was complaining with errors. This is what I get:

cid:image002.jpg@01CE1DC1.989EA330

If I keep on clicking proceed I get to this:

 

cid:image003.jpg@01CE1DC8.19CEEFE0

 

 

I have no idea at all why this is happening. This is the first time I load the image to pharo. What I did was I opened the image file with pharo. Im not sure if this might be causing the problem.

 

Any help would really be appreciated.
Thank You

 

 


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13

Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

hilaire
In reply to this post by Mohammad Al Houssami (Alumni)
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Mohammad Al Houssami (Alumni)

Isnt this the way to open the image file? I'm using the pharo virtual machine to open it…
Im not sure I understand how I can be loading it as a text file.

 

 

 

Thanks again

Mohammad

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Hilaire Fernandes
Sent: Monday, March 11, 2013 2:10 PM
To: [hidden email]
Subject: Re: [Pharo-users] Pharo .image loading issues.

 

Heu, it looks like you try to load the bytcode pharo .image as a text file in Pahro. It does not make sense.

Only the Pharo VM can interpret this image, so it should be open with the Pharo VM.

 

 

 

Hilaire

 

 

Le 11/03/2013 12:21, Mohammad Al Houssami (Alumni) a écrit :

> Hey Hilaire,

>

>

> What I was doing is going to the image file and opening it using pharo.

> That exactly Is by right click--> open with --> pharo.

> Draging the image into pharo also it says the following : File

> 'HTML5.PARSER.image' is 20849204 bytes long.

>

> You may use the 'get' command to read the entire file.

 

 

 

--

Dr. Geo http://drgeo.eu

 

 

 

 

-----

No virus found in this message.

Checked by AVG - www.avg.com

Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13

Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Yanni Chiu
In reply to this post by Mohammad Al Houssami (Alumni)


On 11/03/13 7:21 AM, Mohammad Al Houssami (Alumni) wrote:
>
> What I was doing is going to the image file and opening it using pharo.
> That exactly Is by right click--> open with --> pharo.
> Draging the image into pharo also it says the following : File
> 'HTML5.PARSER.image' is 20849204 bytes long.

You are already running the image. The PharaVM is not an IDE that you
use to open the 'HTML5.PARSER.image'. The PharoVM is already
interpreting the some .image file. I think you're trying to open the
HTML5.PARSER.image file, from within Pharo, which is treating it like a
text file.



Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

philippeback
In reply to this post by Mohammad Al Houssami (Alumni)
I am downloading from the dropbox. Will have a look.

Phil

2013/3/11 Mohammad Al Houssami (Alumni) <[hidden email]>

Thanks for the reply Phil.
I downloaded the version on the pharo website 2 weeks ago.  The VM version is 4.0.2 and pharo 1.4

Here is a dropbox link for the image and changes files. https://www.dropbox.com/sh/jxp087wrt2lwcch/Ij0ji1DEFB

 

Thanks again

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: Monday, March 11, 2013 11:30 AM
To: A friendly place where any question about pharo is welcome
Subject: Re: [Pharo-users] Pharo .image loading issues.

 

That's weird.

 

The image oviously loads since you do have screenshots to show.

Also, given the shape of the icons in the second capture, it looks like an old Pharo to me (kind of like 1.3 or something).

 

Which version do you use?

Which VM?

 

Can you make your image available somewhere so that we can have a look?

 

Rgds,

Phil

2013/3/11 Mohammad Al Houssami (Alumni) <[hidden email]>

Hello All 

 

Im working on an HTML5 parser in smalltalk as part of my postgraduate project.

Im completely new to pharo and smalltalk and I've been working with it for around a week now. It was the first time I close pharo. I was trying to load the image file but I couldn’t and pahro was complaining with errors. This is what I get:

cid:image002.jpg@01CE1DC1.989EA330

If I keep on clicking proceed I get to this:

 

cid:image003.jpg@01CE1DC8.19CEEFE0

 

 

I have no idea at all why this is happening. This is the first time I load the image to pharo. What I did was I opened the image file with pharo. Im not sure if this might be causing the problem.

 

Any help would really be appreciated.
Thank You

 

 


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13


Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Mohammad Al Houssami (Alumni)
In reply to this post by Yanni Chiu
If this is the case then I should see the new package I created right? But when I look for it doesn't show. It's basically in the same state as when I downloaded pharo and run it the first time.
Im opening the image file using pharo and not the other way around. Im not sure if I make sense.

Thank you

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Yanni Chiu
Sent: Monday, March 11, 2013 2:45 PM
To: A friendly place where any question about pharo is welcome
Subject: Re: [Pharo-users] Pharo .image loading issues.



On 11/03/13 7:21 AM, Mohammad Al Houssami (Alumni) wrote:
>
> What I was doing is going to the image file and opening it using pharo.
> That exactly Is by right click--> open with --> pharo.
> Draging the image into pharo also it says the following : File
> 'HTML5.PARSER.image' is 20849204 bytes long.

You are already running the image. The PharaVM is not an IDE that you use to open the 'HTML5.PARSER.image'. The PharoVM is already interpreting the some .image file. I think you're trying to open the HTML5.PARSER.image file, from within Pharo, which is treating it like a text file.





-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13


Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

philippeback
In reply to this post by Mohammad Al Houssami (Alumni)
Here is the thing:

First, I was able to open your image. With a StackVM. Not a CogVM or PharoVM.
So you can do that too.

Second, this image of yours (like I suspected given the look) is a Pharo1.0

So, I don't know how you ended up downloading a 1.4 and having a 1.0 image, it isn't possible.
See screenshot as proof.

So, your code is not lost.

You may want to reimport it into a new 1.4 image.
I've made a Monticello mcz for you to use if you want to do that (An export of the HTML5-Parser package).

I don't know if you have other code around in that image.

Enjoy.

Phil





2013/3/11 Mohammad Al Houssami (Alumni) <[hidden email]>

Isnt this the way to open the image file? I'm using the pharo virtual machine to open it…
Im not sure I understand how I can be loading it as a text file.

 

 

 

Thanks again

Mohammad

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Hilaire Fernandes
Sent: Monday, March 11, 2013 2:10 PM
To: [hidden email]
Subject: Re: [Pharo-users] Pharo .image loading issues.

 

Heu, it looks like you try to load the bytcode pharo .image as a text file in Pahro. It does not make sense.

Only the Pharo VM can interpret this image, so it should be open with the Pharo VM.

 

 

 

Hilaire

 

 

Le 11/03/2013 12:21, Mohammad Al Houssami (Alumni) a écrit :

> Hey Hilaire,

>

>

> What I was doing is going to the image file and opening it using pharo.

> That exactly Is by right click--> open with --> pharo.

> Draging the image into pharo also it says the following : File

> 'HTML5.PARSER.image' is 20849204 bytes long.

>

> You may use the 'get' command to read the entire file.

 

 

 

--

Dr. Geo http://drgeo.eu

 

 

 

 

-----

No virus found in this message.

Checked by AVG - www.avg.com

Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13



=?UTF-8?B?Q2FwdHVyZSBk4oCZZcyBY3JhbiAyMDEzLTAzLTExIGHMgCAxNS41My40My5wbmc=?= (169K) Download Attachment
HTML5-PARSER-PhilippeBack.1.mcz (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

philippeback
In reply to this post by Mohammad Al Houssami (Alumni)
For the record, here is the organization of those files:

1) the .image file > the object memory in binary form. You read it from disk and the VM continues executing the bytecode where it left off (basically picking up the instruction and stack pointers to do so). It is kind of like the hibernate file in Windows.

2) the .changes and .sources files > text files with sources and in the changes, what you typed got appended. It is always possible to take a fresh Pharo image and replay stuff from the .changes file to get back to the same state (useful if one image becomes corrupted).

Phil

2013/3/11 Mohammad Al Houssami (Alumni) <[hidden email]>

Isnt this the way to open the image file? I'm using the pharo virtual machine to open it…
Im not sure I understand how I can be loading it as a text file.

 

 

 

Thanks again

Mohammad

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Hilaire Fernandes
Sent: Monday, March 11, 2013 2:10 PM
To: [hidden email]
Subject: Re: [Pharo-users] Pharo .image loading issues.

 

Heu, it looks like you try to load the bytcode pharo .image as a text file in Pahro. It does not make sense.

Only the Pharo VM can interpret this image, so it should be open with the Pharo VM.

 

 

 

Hilaire

 

 

Le 11/03/2013 12:21, Mohammad Al Houssami (Alumni) a écrit :

> Hey Hilaire,

>

>

> What I was doing is going to the image file and opening it using pharo.

> That exactly Is by right click--> open with --> pharo.

> Draging the image into pharo also it says the following : File

> 'HTML5.PARSER.image' is 20849204 bytes long.

>

> You may use the 'get' command to read the entire file.

 

 

 

--

Dr. Geo http://drgeo.eu

 

 

 

 

-----

No virus found in this message.

Checked by AVG - www.avg.com

Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13


Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Yanni Chiu
In reply to this post by Mohammad Al Houssami (Alumni)
On 11/03/13 10:57 AM, Mohammad Al Houssami (Alumni) wrote:

Since you've just started using Pharo, I think you need to step back and
put aside some preconceived ideas about code development you may have.

> If this is the case then I should see the new package I created
> right? But when I look for it doesn't show. It's basically in the
> same state as when I downloaded pharo and run it the first time.

A PharoVM interprets a .image file. I suspect you already have another
Pharo installation on your system, and that's what you've been running,
not the one you downloaded.

You're now trying to "open" the .image file you want to work on, from
within that old Pharo installation that is somehow already installed on
your system.

> Im opening the image file using pharo and not the other way around.
> Im not sure if I make sense.

"Im opening the image file using pharo". A Pharo VM (VM = virtual
machine) "opens" the image file. If your thinking is that "pharo" is
"opening the image file", then I think that's what is blocking you from
seeing what's going wrong. What you're calling "pharo" is already a
PharoVM running some image (probably a Pharo-1.0 image, based on Phil's
posting). You might be thinking that "pharo" is some IDE that you use to
"open" the pharo image. That's not what's going on.


Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

stephane ducasse
In reply to this post by Mohammad Al Houssami (Alumni)
Did you watch the PharoCast where laurent explain how to get started?

Stef

On Mar 11, 2013, at 3:57 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote:

> If this is the case then I should see the new package I created right? But when I look for it doesn't show. It's basically in the same state as when I downloaded pharo and run it the first time.
> Im opening the image file using pharo and not the other way around. Im not sure if I make sense.
>
> Thank you
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Yanni Chiu
> Sent: Monday, March 11, 2013 2:45 PM
> To: A friendly place where any question about pharo is welcome
> Subject: Re: [Pharo-users] Pharo .image loading issues.
>
>
>
> On 11/03/13 7:21 AM, Mohammad Al Houssami (Alumni) wrote:
>>
>> What I was doing is going to the image file and opening it using pharo.
>> That exactly Is by right click--> open with --> pharo.
>> Draging the image into pharo also it says the following : File
>> 'HTML5.PARSER.image' is 20849204 bytes long.
>
> You are already running the image. The PharaVM is not an IDE that you use to open the 'HTML5.PARSER.image'. The PharoVM is already interpreting the some .image file. I think you're trying to open the HTML5.PARSER.image file, from within Pharo, which is treating it like a text file.
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13
>
>


Reply | Threaded
Open this post in threaded view
|

About parsing HTML5

stephane ducasse
In reply to this post by Mohammad Al Houssami (Alumni)
Hi Mohammad

We are interested in getting a nice HTML parser.

Now I suggest that you have a look at the pharo by example book.
It will help you to get started.
In particular do you know Sunit? There is a chapter on it in the book.
We urge you to write tests for your parser. 

There were several projects around HTML parsing

HTML & CSS Validating Parser
MCHttpRepository
location: 'http://www.squeaksource.com/htmlcssparser'
user: 'sd'
password: ''
If you have a good BNF you should have a look at Smacc which is a compiler compiler
else you can have a look at petitParser


There was long time ago an HTML parser

Probably here
MCHttpRepository
location: 'http://www.squeaksource.com/Scamper'
user: ''
password: ''
But this is old so it may blow on your face.

Let us know if you need help.

Stef


On Mar 11, 2013, at 3:57 PM, Mohammad Al Houssami (Alumni) <[hidden email]> wrote:

If this is the case then I should see the new package I created right? But when I look for it doesn't show. It's basically in the same state as when I downloaded pharo and run it the first time.
Im opening the image file using pharo and not the other way around. Im not sure if I make sense.

Thank you

-----Original Message-----
From: [hidden email] [mailto:pharo-[hidden email]] On Behalf Of Yanni Chiu
Sent: Monday, March 11, 2013 2:45 PM
To: A friendly place where any question about pharo is welcome
Subject: Re: [Pharo-users] Pharo .image loading issues.



On 11/03/13 7:21 AM, Mohammad Al Houssami (Alumni) wrote:

What I was doing is going to the image file and opening it using pharo.
That exactly Is by right click--> open with --> pharo.
Draging the image into pharo also it says the following : File
'HTML5.PARSER.image' is 20849204 bytes long.

You are already running the image. The PharaVM is not an IDE that you use to open the 'HTML5.PARSER.image'. The PharoVM is already interpreting the some .image file. I think you're trying to open the HTML5.PARSER.image file, from within Pharo, which is treating it like a text file.





-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13



Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Ben Coman
In reply to this post by Mohammad Al Houssami (Alumni)
Mohammad Al Houssami (Alumni) wrote:

> Hello All
>
> Im working on an HTML5 parser in smalltalk as part of my postgraduate project.
>
> Im completely new to pharo and smalltalk and I've been working with it for around a week now. It was the first time I close pharo. I was trying to load the image file but I couldn't and pahro was complaining with errors. This is what I get:
> [cid:image002.jpg@01CE1DC1.989EA330]
>
> If I keep on clicking proceed I get to this:
>
> [cid:image003.jpg@01CE1DC8.19CEEFE0]
>
>
> I have no idea at all why this is happening. This is the first time I load the image to pharo. What I did was I opened the image file with pharo. Im not sure if this might be causing the problem.
>
> Any help would really be appreciated.
> Thank You
>
>
>  
Welcome Mohammad.  Pharo By Example is a good place to start.

Download and unzip this, which contains a Pharo image and the virtual
machine that runs image.
http://gforge.inria.fr/frs/download.php/31048/PBE-OneClick-1.1.app.zip

then use it while reading this...
http://gforge.inria.fr/frs/download.php/25599/PBE1-2009-10-28.pdf

good luck,
-ben




Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

Mohammad Al Houssami (Alumni)
Thanks for the reply and kindness Ben.
This was the pharo I was using actually. Its pharo 1.1 and it was the reason behind the problem. I downloaded version 1.4 and using Phil's help I was able to solve the issue.

Thanks again
Mohammad


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ben Coman
Sent: Monday, March 11, 2013 5:29 PM
To: A friendly place where any question about pharo is welcome
Subject: Re: [Pharo-users] Pharo .image loading issues.

Welcome Mohammad.  Pharo By Example is a good place to start.

Download and unzip this, which contains a Pharo image and the virtual machine that runs image.
http://gforge.inria.fr/frs/download.php/31048/PBE-OneClick-1.1.app.zip

then use it while reading this...
http://gforge.inria.fr/frs/download.php/25599/PBE1-2009-10-28.pdf

good luck,
-ben






-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 2641/6163 - Release Date: 03/10/13


Reply | Threaded
Open this post in threaded view
|

Re: Pharo .image loading issues.

lilycan
In reply to this post by Mohammad Al Houssami (Alumni)
thanks i am going to download version 1.4 as well, cause i am having the same issue while load image.  appreciate the help up here.