Re: [Pharo-dev] Problem with FileSystem in WIndows

2017-04-30 Thread Alistair Grant
On Sat, Apr 29, 2017 at 10:15:15PM -0300, Casimiro de Almeida Barreto wrote:
> Good night all.
> 
> I?ve had trouble in windows concerning FileSystem.
> 
> ((FileSystem disk root) / ?C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt?)
> delete
> 
> Fails as if the file didn?t exist. Message:
> 
> FileDoesNotExist: Path / ?C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt?
> 
> And I wonder what?s wrong. Because it works in linux and MacOS.
> 
> Trasncript show: ((FileSYstem disk root) / ?C:\temp\
> e8720bb4-b90a-0d00-9b1f-008709e5552b.txt?)
> 
> Returns:
> 
> File @ C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt\
> 
> And I wonder where the last \ came from and if is it that is messing all and
> how to fix things.


This is partially related to the problem I reported in "FileReference /
and Parent" in that the filename isn't being parsed properly.  See:

http://forum.world.st/FileReference-and-parent-td4941066.html

Note that the patch I suggest in the email thread doesn't solve the
problem either.

The trailing slash in the example above is because the path isn't being
parsed, the windows file store thinks that there is only a single
segment, which means the drive, so must be a directory.

As a workaround, if you have a complete path string, try using
#asFileReference, e.g.:

'C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt' asFileReference exists


Cheers,
Alistair




Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread askoh
Yes. It is a novel way of remote desktop. Perhaps Craig can tell if it can do
the following.
I want to go to a web page, select a body of text and have Smalltalk code
analyze the text in some way and return the answer in the browser or in the
Smalltalk app or file output. There should be two-way communication between
app and browser. I would like to do live debugging too.

Aik-Siong Koh


Hi Askoh,

   are you also aware of Snowglobe
https://thiscontext.com/2016/10/31/app-streaming-with-snowglobe/ ?  This
allows one to use a standard Smalltalk image running on the native Cog VM to
render in a web browser.

_,,,^..^,,,_ (phone)




--
View this message in context: 
http://forum.world.st/Smalltalk-Internet-Browser-tp4944879p4944998.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



[Pharo-dev] RES: RES: RES: Problem with FileSystem in WIndows

2017-04-30 Thread Casimiro de Almeida Barreto
Thanks for the tip Sven.

-Mensagem original-
De: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] Em nome de Sven Van 
Caekenberghe
Enviada em: domingo, 30 de abril de 2017 17:14
Para: Pharo Development List 
Assunto: Re: [Pharo-dev] RES: RES: Problem with FileSystem in WIndows

I have a feeling that you are working on the wrong level, consider:

file := FileReference newTempFilePrefix: 'data' suffix: '.txt'.
file writeStreamDo: [ :out | out << 'Casimiro de Almeida Barreto' ].
file contents.
file ensureDelete.
file exists.

The #newTempFilePrefix:suffix: method uses 'FileLocator temp' as target 
directory, which will be different on different platforms.

The trick is to use these FileLocator locations, try 'FileLocator 
supportedOrigins', to have an abstract, cross platform starting point (except 
for the Windows drives, obviously). Then you construct directories using 
messages.

Remember, the whole image, file browser, file dialogs, they all work cross 
platform, so you can do so too.



---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus




Re: [Pharo-dev] RES: RES: Problem with FileSystem in WIndows

2017-04-30 Thread Sven Van Caekenberghe
I have a feeling that you are working on the wrong level, consider:

file := FileReference newTempFilePrefix: 'data' suffix: '.txt'.
file writeStreamDo: [ :out | out << 'Casimiro de Almeida Barreto' ].
file contents.
file ensureDelete.
file exists.

The #newTempFilePrefix:suffix: method uses 'FileLocator temp' as target 
directory, which will be different on different platforms.

The trick is to use these FileLocator locations, try 'FileLocator 
supportedOrigins', to have an abstract, cross platform starting point (except 
for the Windows drives, obviously). Then you construct directories using 
messages.

Remember, the whole image, file browser, file dialogs, they all work cross 
platform, so you can do so too. 

> On 30 Apr 2017, at 21:37, Casimiro de Almeida Barreto 
>  wrote:
> 
>> Clear example follows. By the way ‘/’ and ‘\’ are not interchangeable… in 
>> Windows FileSystem requires ‘\’ to work properly:
>> 
>>  
>> 
>> | fn l fileStream |
>> 
>> fn := 'temp\',UUIDGenerator next asString,'.txt'.
>> 
>> Transcript clear; show: fn; cr.
>> 
>> fileStream := ((FileSystem root) / fn) writeStream.
>> 
>> fileStream 
>> 
>> ifNil: [ Transcript show: 'Fail to create writeStream'; cr ]
>> 
>> ifNotNil: [ Transcript show: 'Opened' ].
>> 
>> fileStream nextPutAll: 'Casimiro de Almeida Barreto'.
>> 
>> fileStream close.
>> 
>> fileStream := ((FileSystem root) / fn) readStream.
>> 
>> l := fileStream upToEnd.
>> 
>> Transcript show: l; cr.
>> 
>> ((FileSystem root) / fn) delete.
>> 
>  
> This example creates a file named 
> c:\temp\380cafd3-c80a-0d00-b117-0a8a049bf78d.txt and I was able to write 
> ‘Casimiro de Almeida Barreto’ to it. And then open the file in the read mode 
> and read ‘Casimiro de Almeida Barreto’ from it. But… ((FileSystem root) / fn) 
> delete returns a: ‘FileDoesNotExist: Path 
> /’temp\380cafd3-c80a-0d00-b117-0a8a049bf78d.txt’. Apparently the problem is 
> at WindowsStore(DiskStore) delete:
>  
> 
> 
>   Livre de vírus. www.avast.com. 




Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread askoh
Thanks everyone for your input.

I am aware of Amber - worthy effort. I am more interested in Smalltalk IDE
or app having a Browser. I am thinking more of Smalltalk calling Chromium
Embedded Framework (CEF) via APIs. The browser is in direct two-way
communication with the Smalltalk app. The complete API may be huge, but we
can start with 1, 10, 100 APIs and still do useful stuff. Smalltalk missed
out to Java because it did not embrace the internet. Let's not continue to
miss out.

Someone mentioned Pharo should be good with data analysis. Well, I think a
lot, if not all, that data is going to come from the internet. Hence an
embedded browser is a great helper.

Python rode on C/C++.
Ruby rode on Rails and on Web.
What can Smalltalk ride on? VisualWorks Appex seems to be an attempt to ride
on Javascript. VW Appex manages both Smalltalk and Javascript in the same
image. Javascript edits in Appex are reflected to the Internet Browser when
it is refreshed. Most interestingly, Javascript edits in the Internet
Browser Dev Tools are picked up by Appex and put into the image. What do you
think of this strategy?

Aik-Siong Koh



nacho wrote
> Did you tried Amber?
> Is Smalltalk on the browser.
> I believe that what you mean is embedding the V8 engine into Pharo. But
> man, thats a huge work. Really...
> my 2c.
> 
> 
> *Lic. Ignacio Sniechowski, MBA*
> *Prosavic SRL*
> ☎*  (5411) 4542-6712*
> * (54911) 6749-4721*
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Sat, Apr 29, 2017 at 7:53 PM, askoh [via Smalltalk] <

> ml+s1294792n4944919h82@.nabble

>> wrote:
> 
>> We means all communities of Smalltalk environments. Pharo is of course
>> the
>> biggest, hence my post here first. I am verifying the soundness of the
>> idea
>> of SIB and then do a student project on it. I am from the VisualWork
>> community. I look forward to porting freeCAD: 3D CAD with Motion
>> Simulation
>> to Pharo when it has 64bit version on Windows.
>>
>> Aik-Siong Koh
>>
>> Denis Kudriashov wrote
>> 2017-04-29 19:00 GMT+02:00 askoh <[hidden email]
>> http:///user/SendEmail.jtp?type=nodenode=4944919i=0;>:
>>
>> > We start out by embedding Chrome inside the IDE. Make them communicate
>> > well.
>> > We then port bit by bit to Smalltalk based on needs and priorities.
>> >
>>
>> I am wondering, when you said "we" what you mean? Did you found team to
>> work on such project?
>>
>>
>>
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://forum.world.st/Smalltalk-Internet-Browser-tp4944879p4944919.html
>> To start a new topic under Pharo Smalltalk Developers, email
>> 

> ml+s1294792n1294837h40@.nabble

>> To unsubscribe from Pharo Smalltalk Developers, click here
>> http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1294837code=MDgwMG5hY2hvQGdtYWlsLmNvbXwxMjk0ODM3fC0xOTAxMTExODEy;
>> .
>> NAML
>> http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=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/Smalltalk-Internet-Browser-tp4944879p4944991.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread Eliot Miranda
Hi Askoh,

   are you also aware of Snowglobe 
https://thiscontext.com/2016/10/31/app-streaming-with-snowglobe/ ?  This allows 
one to use a standard Smalltalk image running on the native Cog VM to render in 
a web browser.

_,,,^..^,,,_ (phone)

> On Apr 28, 2017, at 7:11 PM, askoh  wrote:
> 
> Being connected to the internet is going to be a necessity for any piece of
> software in the immediate future. So every Smalltalk development environment
> or application should have that capability as default. To push that envelop,
> every image should have a Smalltalk native Internet Browser. By developing
> that Internet Browser, we are demonstrating the power of Smalltalk. There is
> no reason why Smalltalk cannot be as intimate to the World Wide Web as
> Javascript. We can have the IDE in Smalltalk, Internet Browser in Smalltalk
> and a WWW language in Smalltalk. As is uniquely Smalltalk, every bit of code
> is visible, modifiable and debuggable. This supped up environment will grow
> and grow to be a full OS.
> 
> How can we gather the relevant Smalltalk code and necessary plugins to make
> an Internet Browser? I remember Croquet had internet browser and video
> player. What is missing?
> 
> All the best,
> Aik-Siong Koh
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/Smalltalk-Internet-Browser-tp4944879.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
> 


Re: [Pharo-dev] First commit

2017-04-30 Thread Juraj Kubelka
Hi,



--
Juraj Kubelka
> El 30-04-2017, a las 15:25, Evan Donahue  escribió:
> 
> Hello,
> 
> I have just tried to submit my first patch to the main Pharo inbox. I 
> submitted a patch  for issue
> 
> https://pharo.fogbugz.com/f/cases/17848
> 
> because it basically amounted to changing an error message and seemed like a 
> good place to start figuring out how the submission process works. 
> 
> I saved my slice to the Pharo60Inbox, but when I typed my commit message and 
> hit save, I did not see any confirmation. How can I tell if my slice was 
> submitted or not?

I am not in front of my computer, but you can open the repository and search 
for the SLICE. 

Than you should set resolve in FogBugz. 

Juraj


> 
> Thank you,
> Evan


[Pharo-dev] RES: RES: Problem with FileSystem in WIndows

2017-04-30 Thread Casimiro de Almeida Barreto
> Indeed.
>
> Also, you should never have to write the platform test, an important idea of 
> FileSystem is to prevent that.
>

Complete transparency is not possible because the concepts of file system in 
Windows and Unix are different. While in Unix you have a continuous tree, in 
Windows you have the concept of drive or 'disk unity' (C: D: E: ...) and 
disjunct trees. Also in Unix you can have complex file names that include 
almost all characters while in Unix some characters cannot be used (like : )... 
Not to mention that file properties in Unix and Windows are not exactly the 
same, links are not the same, so on and so forth.

> Have you read the chapter on FileSystem from the Deep Into Pharo book ?
>
> Maybe some Windows users can help you better, but I don't recall others 
> having trouble using FileSystem on Windows.

Best regards,

Casimiro Barreto


---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus




[Pharo-dev] First commit

2017-04-30 Thread Evan Donahue
Hello,

I have just tried to submit my first patch to the main Pharo inbox. I
submitted a patch  for issue

https://pharo.fogbugz.com/f/cases/17848

because it basically amounted to changing an error message and seemed like
a good place to start figuring out how the submission process works.

I saved my slice to the Pharo60Inbox, but when I typed my commit message
and hit save, I did not see any confirmation. How can I tell if my slice
was submitted or not?

Thank you,
Evan


Re: [Pharo-dev] RES: Problem with FileSystem in WIndows

2017-04-30 Thread Sven Van Caekenberghe

> On 30 Apr 2017, at 19:31, Stephane Ducasse  wrote:
> 
> Can you open a bug entry with clear examples?
> We should improve this part. 
> After having the interpretation of strings sucks. I do not like it I prefer
> 
> FileLocator C / 'temp' / 'e8720bb4-b90a-0d00-9b1f-008709e5552b.txt'

Indeed.

Also, you should never have to write the platform test, an important idea of 
FileSystem is to prevent that.

Have you read the chapter on FileSystem from the Deep Into Pharo book ?

Maybe some Windows users can help you better, but I don't recall others having 
trouble using FileSystem on Windows. 

> On Sun, Apr 30, 2017 at 6:54 PM, Casimiro de Almeida Barreto 
>  wrote:
> Hello,
> 
> -Mensagem original-
> De: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] Em nome de Sven Van 
> Caekenberghe
> Enviada em: domingo, 30 de abril de 2017 05:30
> Para: Pharo Development List 
> Assunto: Re: [Pharo-dev] Problem with FileSystem in WIndows
> 
> 
> > On 30 Apr 2017, at 09:48, Max Leske  wrote:
> >
> > Hi Casimiro,
> >
> > have you tried using normal slashes in the path name? FileSystem should 
> > convert those to system path delimiters automatically. So:
> 
> It seems that FileSystem does not convert / into \ .
> ((FileSystem root) / 'c:\temp\tempfile.txt')  writeStream won´t work but...
> FileStream fileNamed: 'C:\temp\tempfile.txt' works ok.
> 
> So... I could make it work for getting a stream both for Unix and Windows:
> 
> OSPlatform currentPlatformName = 'unix'
> ifTrue: [
> [ str := (fs / fn) writeStream ] on: Exception do: [ ^ nil ] ]
> ifFalse: [
> [ str := FileStream fileNamed: fn ] on: Exception do: [ ^ nil 
> ] ].
> 
> And to delete:
> 
> OSPlatform currentPlatformName = 'unix'
> ifTrue: [
> (FileSystem root / aFileName) delete ]
> ifFalse: [
> rgx := RxMatcher forString: '^[A-Z]\:'.
> drive := rgx matchesIn: aFileName.
> drive := (drive at: 1) copyWithRegex: '\:' 
> matchesReplacedWith: ''.
> ((FileLocator driveNamed: drive)  / (aFileName copyWithRegex: 
> '^[A-Z]\:' matchesReplacedWith: '')) delete ]
> 
> Not good, nor elegant nor anything close to good transparent code but... 
> works :'(
> 
> >
> > C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt
> >
> > And possibly you'll need a leading slash, as "C:" is a reference to the 
> > root of the file system:
> >
> > /C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt
> 
> There is also the following option:
> 
> FileLocator C / 'temp' / 'e8720bb4-b90a-0d00-9b1f-008709e5552b.txt'
> 
> > Cheers,
> > Max
> >
> >> On 30 Apr 2017, at 03:15, Casimiro de Almeida Barreto 
> >>  wrote:
> >>
> >> Good night all.
> >>
> >> I´ve had trouble in windows concerning FileSystem.
> >>
> >> ((FileSystem disk root) / 
> >> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’) delete
> >>
> >> Fails as if the file didn´t exist. Message:
> >>
> >> FileDoesNotExist: Path / ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’
> >>
> >> And I wonder what´s wrong. Because it works in linux and MacOS.
> >>
> >> Trasncript show: ((FileSYstem disk root) / 
> >> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’)
> >>
> >> Returns:
> >>
> >> File @ C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt\
> >>
> >> And I wonder where the last \ came from and if is it that is messing all 
> >> and how to fix things.
> >>
> >> Best regards,
> >>
> >> Casimiro Barreto
> >>
> >>  Livre de vírus. www.avast.com.
> >
> 
> 
> 
> 
> ---
> Este email foi escaneado pelo Avast antivírus.
> https://www.avast.com/antivirus
> 
> 
> 




Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread Stephane Ducasse
- data manipulation
- some math libraries
- handling large file (yes you will not load 128 Gb file even in Java :)

But so far I failed :)


On Sun, Apr 30, 2017 at 7:33 PM, Stephane Ducasse 
wrote:

> I tried to convince alex to focus on the missing pieces around roassal:
>
>
> On Sun, Apr 30, 2017 at 6:03 PM, volkert  wrote:
>
>> +1
>>
>> i think the development of pharo should more focus on an "easy to use and
>> adaptive live data analysis environment" which supports data science tasks
>> with easy to use data retrieving,  data preparation,  data exploration,
>> data modelling, scripting capabilities. We already have so many pieces and
>> knowledge for this kind of platform around. I think only the cool story is
>> missing .. And yes i know Moose, but i have the feeling this environment is
>> not Moose. For me Moose is to much associated with software analysis ...
>>
>> Volkert
>>
>>
>>
>> Am 30.04.2017 um 17:06 schrieb Stephan Eggermont:
>>
>>> On 29/04/17 04:11, askoh wrote:
>>>
 Being connected to the internet is going to be a necessity for any
 piece of
 software in the immediate future. So every Smalltalk development
 environment
 or application should have that capability as default. To push that
 envelop,
 every image should have a Smalltalk native Internet Browser.

>>>
>>> Web is a very bad platform from an engineering point of view. The amount
>>> of accidental complexity is astounding, as is the number of useless layers
>>> obfuscating this all. I don't think we are ready to waste the amount of
>>> engineering needed to do something useful at the browser implementation
>>> side of the web (except for things like amber, pharojs and squeakjs).
>>>
>>> Stephan
>>>
>>>
>>>
>>>
>>
>>
>


Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread Stephane Ducasse
I tried to convince alex to focus on the missing pieces around roassal:


On Sun, Apr 30, 2017 at 6:03 PM, volkert  wrote:

> +1
>
> i think the development of pharo should more focus on an "easy to use and
> adaptive live data analysis environment" which supports data science tasks
> with easy to use data retrieving,  data preparation,  data exploration,
> data modelling, scripting capabilities. We already have so many pieces and
> knowledge for this kind of platform around. I think only the cool story is
> missing .. And yes i know Moose, but i have the feeling this environment is
> not Moose. For me Moose is to much associated with software analysis ...
>
> Volkert
>
>
>
> Am 30.04.2017 um 17:06 schrieb Stephan Eggermont:
>
>> On 29/04/17 04:11, askoh wrote:
>>
>>> Being connected to the internet is going to be a necessity for any piece
>>> of
>>> software in the immediate future. So every Smalltalk development
>>> environment
>>> or application should have that capability as default. To push that
>>> envelop,
>>> every image should have a Smalltalk native Internet Browser.
>>>
>>
>> Web is a very bad platform from an engineering point of view. The amount
>> of accidental complexity is astounding, as is the number of useless layers
>> obfuscating this all. I don't think we are ready to waste the amount of
>> engineering needed to do something useful at the browser implementation
>> side of the web (except for things like amber, pharojs and squeakjs).
>>
>> Stephan
>>
>>
>>
>>
>
>


Re: [Pharo-dev] GarageGlorp

2017-04-30 Thread Stephane Ducasse
tx

On Sun, Apr 30, 2017 at 5:36 PM, Esteban A. Maringolo 
wrote:

> I will do so as soon as I sit in front of my computer.
>
> Regards!
>
> El abr. 29, 2017 3:35 PM, "Stephane Ducasse" 
> escribió:
>
>> Hi
>>
>> for a tutorial I wanted to load Glorp in Pharo 60 as described in the
>> Glorp doc.
>>
>> Metacello new
>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> configuration: 'GarageGlorp';
>> version: #stable;
>> load.
>>
>> I get an error stating that
>> The symbolic version stable is not defined in the configuration for the
>> ... for the platform.
>>
>> I changed the loading instruction to
>>
>> Metacello new
>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> configuration: 'GarageGlorp';
>> version: '0.2';
>> load.
>>
>> And it seems to work. May be we should publish a symbolic version for
>> pharo 60.
>> I do not think that I have commit right.
>>
>> Stef
>>
>


Re: [Pharo-dev] RES: Problem with FileSystem in WIndows

2017-04-30 Thread Stephane Ducasse
Can you open a bug entry with clear examples?
We should improve this part.
After having the interpretation of strings sucks. I do not like it I prefer

FileLocator C / 'temp' / 'e8720bb4-b90a-0d00-9b1f-008709e5552b.txt'

On Sun, Apr 30, 2017 at 6:54 PM, Casimiro de Almeida Barreto <
casimiro.barr...@gmail.com> wrote:

> Hello,
>
> -Mensagem original-
> De: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] Em nome de Sven
> Van Caekenberghe
> Enviada em: domingo, 30 de abril de 2017 05:30
> Para: Pharo Development List 
> Assunto: Re: [Pharo-dev] Problem with FileSystem in WIndows
>
>
> > On 30 Apr 2017, at 09:48, Max Leske  wrote:
> >
> > Hi Casimiro,
> >
> > have you tried using normal slashes in the path name? FileSystem should
> convert those to system path delimiters automatically. So:
>
> It seems that FileSystem does not convert / into \ .
> ((FileSystem root) / 'c:\temp\tempfile.txt')  writeStream won´t work but...
> FileStream fileNamed: 'C:\temp\tempfile.txt' works ok.
>
> So... I could make it work for getting a stream both for Unix and Windows:
>
> OSPlatform currentPlatformName = 'unix'
> ifTrue: [
> [ str := (fs / fn) writeStream ] on: Exception do: [ ^ nil
> ] ]
> ifFalse: [
> [ str := FileStream fileNamed: fn ] on: Exception do: [ ^
> nil ] ].
>
> And to delete:
>
> OSPlatform currentPlatformName = 'unix'
> ifTrue: [
> (FileSystem root / aFileName) delete ]
> ifFalse: [
> rgx := RxMatcher forString: '^[A-Z]\:'.
> drive := rgx matchesIn: aFileName.
> drive := (drive at: 1) copyWithRegex: '\:'
> matchesReplacedWith: ''.
> ((FileLocator driveNamed: drive)  / (aFileName
> copyWithRegex: '^[A-Z]\:' matchesReplacedWith: '')) delete ]
>
> Not good, nor elegant nor anything close to good transparent code but...
> works :'(
>
> >
> > C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt
> >
> > And possibly you'll need a leading slash, as "C:" is a reference to the
> root of the file system:
> >
> > /C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt
>
> There is also the following option:
>
> FileLocator C / 'temp' / 'e8720bb4-b90a-0d00-9b1f-
> 008709e5552b.txt'
>
> > Cheers,
> > Max
> >
> >> On 30 Apr 2017, at 03:15, Casimiro de Almeida Barreto <
> casimiro.barr...@gmail.com> wrote:
> >>
> >> Good night all.
> >>
> >> I´ve had trouble in windows concerning FileSystem.
> >>
> >> ((FileSystem disk root) / 
> >> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’)
> delete
> >>
> >> Fails as if the file didn´t exist. Message:
> >>
> >> FileDoesNotExist: Path / ‘C:\temp\e8720bb4-b90a-0d00-
> 9b1f-008709e5552b.txt’
> >>
> >> And I wonder what´s wrong. Because it works in linux and MacOS.
> >>
> >> Trasncript show: ((FileSYstem disk root) / ‘C:\temp\e8720bb4-b90a-0d00-
> 9b1f-008709e5552b.txt’)
> >>
> >> Returns:
> >>
> >> File @ C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt\
> >>
> >> And I wonder where the last \ came from and if is it that is messing
> all and how to fix things.
> >>
> >> Best regards,
> >>
> >> Casimiro Barreto
> >>
> >>  Livre de vírus. www.avast.com.
> >
>
>
>
>
> ---
> Este email foi escaneado pelo Avast antivírus.
> https://www.avast.com/antivirus
>
>
>


[Pharo-dev] RES: Problem with FileSystem in WIndows

2017-04-30 Thread Casimiro de Almeida Barreto
Hello,

-Mensagem original-
De: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] Em nome de Sven Van 
Caekenberghe
Enviada em: domingo, 30 de abril de 2017 05:30
Para: Pharo Development List 
Assunto: Re: [Pharo-dev] Problem with FileSystem in WIndows


> On 30 Apr 2017, at 09:48, Max Leske  wrote:
>
> Hi Casimiro,
>
> have you tried using normal slashes in the path name? FileSystem should 
> convert those to system path delimiters automatically. So:

It seems that FileSystem does not convert / into \ .
((FileSystem root) / 'c:\temp\tempfile.txt')  writeStream won´t work but...
FileStream fileNamed: 'C:\temp\tempfile.txt' works ok.

So... I could make it work for getting a stream both for Unix and Windows:

OSPlatform currentPlatformName = 'unix'
ifTrue: [
[ str := (fs / fn) writeStream ] on: Exception do: [ ^ nil ] ]
ifFalse: [
[ str := FileStream fileNamed: fn ] on: Exception do: [ ^ nil ] 
].

And to delete:

OSPlatform currentPlatformName = 'unix'
ifTrue: [
(FileSystem root / aFileName) delete ]
ifFalse: [
rgx := RxMatcher forString: '^[A-Z]\:'.
drive := rgx matchesIn: aFileName.
drive := (drive at: 1) copyWithRegex: '\:' matchesReplacedWith: 
''.
((FileLocator driveNamed: drive)  / (aFileName copyWithRegex: 
'^[A-Z]\:' matchesReplacedWith: '')) delete ]

Not good, nor elegant nor anything close to good transparent code but... works 
:'(

>
> C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt
>
> And possibly you'll need a leading slash, as "C:" is a reference to the root 
> of the file system:
>
> /C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt

There is also the following option:

FileLocator C / 'temp' / 'e8720bb4-b90a-0d00-9b1f-008709e5552b.txt'

> Cheers,
> Max
>
>> On 30 Apr 2017, at 03:15, Casimiro de Almeida Barreto 
>>  wrote:
>>
>> Good night all.
>>
>> I´ve had trouble in windows concerning FileSystem.
>>
>> ((FileSystem disk root) / 
>> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’) delete
>>
>> Fails as if the file didn´t exist. Message:
>>
>> FileDoesNotExist: Path / ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’
>>
>> And I wonder what´s wrong. Because it works in linux and MacOS.
>>
>> Trasncript show: ((FileSYstem disk root) / 
>> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’)
>>
>> Returns:
>>
>> File @ C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt\
>>
>> And I wonder where the last \ came from and if is it that is messing all and 
>> how to fix things.
>>
>> Best regards,
>>
>> Casimiro Barreto
>>
>>  Livre de vírus. www.avast.com.
>




---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus




Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread Dimitris Chloupis
> And  IMHO, electron should be killed!! It's really a bad bad idea. You have
> like 10 single apps that run a full V8/node stack. Atom, Discord,
> LightTable, Chrome itself...it's so RAM & CPU consuming. For me it is like
> saying that a desktop application is pure front-end development.
> best
>

The appeal of electron is not that it will be very good performance wise
but that its much easier for a web dev to move his/her web app to desktop
with minimum amount of effort. Of course minimum effort has the side effect
of lousy performance but in the case of apps like Discord which they do not
do much its ok. So electron makes sense. Whether we should support such a
framework is something that is up to the Pharo devs themselves.

Take a look at Ruby on Rails, it was started from a single person for his
own needs. Like many of our own Pharo libraries. You make something you
need, you release it and if people find it useful they will contribute , if
not its still useful to you ;)

Such libs/tools like Electron have zero appeal to us desktop developers
mainly because even web devs do not like web development for the known
problem it has.

Also web devs tend to over exaggerate about the appeal of individual web
frameworks , I read an article making the bold claims of massive success
for Node.js as a server API , I did some research and I came in front page
evidence of massive failure, servers remain firmly committed to Apache
which yes its written in C. Not that I doubt for a second that an API for a
dynamic language would be able to compete with the behemoth of performance
that C really is on its own field, obviously servers needs top performance
because of the big load they have to manage.

I enjoy ninja attacking such web posts and expose them for what they really
are, fake.

The other day another web dev made the bold claim that web games are on the
rise, took me a second to do my research and find one of the most highly
regarded research surveys in game industry that clearly show not only that
web games are no more than 4% but they going straight to the hell of 0%.
Apparently the one ones excited to play games inside the web browser are
web devs that want to make blog post with ridiculous claims.

Web remains and will remain strictly inside the web browser, outside it,
very few people like it and actually choose it as they are preferred way of
development.  The same way none would pick C/C++ for a non performance
orientated app well at least most logical people, unless of course there is
a very good reason for such a choice.

Of course C devs do not feel the need , at least AFAIK , to exaggerate the
usefulness of their own language in blog posts with zero reference to
actual reliable sources. But they are no angels either.

Personally I think the future of the Web which will only grow in popularity
will be outside the browser and already desktop apps have taken advantage
of this. We see this a lot with mobile apps that steal away the users of
web browsers. How many people use the web browser to like and chat on
facebook compared to the ones using the native mobile clients ? Not many.


Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread volkert

+1

i think the development of pharo should more focus on an "easy to use 
and adaptive live data analysis environment" which supports data science 
tasks with easy to use data retrieving,  data preparation,  data 
exploration,  data modelling, scripting capabilities. We already have so 
many pieces and knowledge for this kind of platform around. I think only 
the cool story is missing .. And yes i know Moose, but i have the 
feeling this environment is not Moose. For me Moose is to much 
associated with software analysis ...


Volkert


Am 30.04.2017 um 17:06 schrieb Stephan Eggermont:

On 29/04/17 04:11, askoh wrote:
Being connected to the internet is going to be a necessity for any 
piece of
software in the immediate future. So every Smalltalk development 
environment
or application should have that capability as default. To push that 
envelop,

every image should have a Smalltalk native Internet Browser.


Web is a very bad platform from an engineering point of view. The 
amount of accidental complexity is astounding, as is the number of 
useless layers obfuscating this all. I don't think we are ready to 
waste the amount of engineering needed to do something useful at the 
browser implementation side of the web (except for things like amber, 
pharojs and squeakjs).


Stephan








Re: [Pharo-dev] GarageGlorp

2017-04-30 Thread Esteban A. Maringolo
I will do so as soon as I sit in front of my computer.

Regards!

El abr. 29, 2017 3:35 PM, "Stephane Ducasse" 
escribió:

> Hi
>
> for a tutorial I wanted to load Glorp in Pharo 60 as described in the
> Glorp doc.
>
> Metacello new
> smalltalkhubUser: 'DBXTalk' project: 'Garage';
> configuration: 'GarageGlorp';
> version: #stable;
> load.
>
> I get an error stating that
> The symbolic version stable is not defined in the configuration for the
> ... for the platform.
>
> I changed the loading instruction to
>
> Metacello new
> smalltalkhubUser: 'DBXTalk' project: 'Garage';
> configuration: 'GarageGlorp';
> version: '0.2';
> load.
>
> And it seems to work. May be we should publish a symbolic version for
> pharo 60.
> I do not think that I have commit right.
>
> Stef
>


Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread Stephan Eggermont

On 29/04/17 04:11, askoh wrote:

Being connected to the internet is going to be a necessity for any piece of
software in the immediate future. So every Smalltalk development environment
or application should have that capability as default. To push that envelop,
every image should have a Smalltalk native Internet Browser.


Web is a very bad platform from an engineering point of view. The amount 
of accidental complexity is astounding, as is the number of useless 
layers obfuscating this all. I don't think we are ready to waste the 
amount of engineering needed to do something useful at the browser 
implementation side of the web (except for things like amber, pharojs 
and squeakjs).


Stephan





Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread nacho
A thoughtful description Mr. Kilon, couldn't agree more.
Even if the solution is based in node/v8 or derivate technologies like
electron it will be a nightmare to integrate that.
And  IMHO, electron should be killed!! It's really a bad bad idea. You have
like 10 single apps that run a full V8/node stack. Atom, Discord,
LightTable, Chrome itself...it's so RAM & CPU consuming. For me it is like
saying that a desktop application is pure front-end development.
best




-
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context: 
http://forum.world.st/Smalltalk-Internet-Browser-tp4944879p4944954.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread Dimitris Chloupis
Beyond the barrier of this being a huge vaporware effort, bare in mind that
a large percentage of Browsers are implemented in C/C++ for performance
reasons.

In the cases of Firefox and Chrome its 50% in both cases that is made in
C/C++.

https://www.openhub.net/p/firefox

https://www.openhub.net/p/chrome

So immediately that means you have 3 options

1) Code it yourself/ your team in C/C++ that 50%
2) Use the existing code bases of either Firefox or Chrome
3) Code it all in pure Pharo

(3) is the most attracting for Pharo devs and it will really prove that
Pharo can make a Internet browser but you can forget about it. Pharo is
around 10-50 times slower than C/C++ and if we take into account that
Firefox alone can easily eat alive a quad core cpu and 1GB of memory ,
numbers that are unheard of to Pharo developer in large , it make the use
of Pharo a non choice. So he erase (3) from the list.

(1) Code it yourself C/C++ is again not doable since we are talking about
milions and millions of lines of code , that means your browser will end up
being 3-10 times larger to Pharo itself. Good luck with that.

(2) is your realistic options that 50% that is coded in C/C++ will save you
quite a lot of developing time and give you the performance you need but
even this option comes with huge drawbacks of having to wrap millions and
millions of lines of code so Pharo can have access to it, you could
automate it to an extend but still A TON of work.

Also do not be misled by that 50% if you think it covers 50% of the
features, it does not. I would not be surprised if it covers 80-90% of the
features so its not the 50% you can ignore or not focus on.

Simply put Pharo is not a language designed for high performance coding.
Bare in mind that we only recently got  64 bit support , something that
would make C/C++ developers laugh. Not to exclude the sheer number of tools
that C/C++ have that can debug and optimise code especially when it comes
to memory management. We talking here not about 5-10 tools/libraries but an
entire universe of options.  I am not saying that Pharo is a bad language
by any means. We would laugh at C/C++ coders with the way they try to
implement OOP or dynamic coding. Pharo is amazing for low performance
coding and if you want to quickly put together applications on the fly.

If you want to do something realistic then your best bet will be to assist
the PharoJS folks because the number one thing you need to even got the
attention of web devs is excellent JS , HTML and CSS support out of the
box.

An area that I have worked with Pharo is IPC (Inter Process Communication)
that makes it possible for Pharo to communicate with any software and
language and use any tool, any library of any language etc.

Embedding a browser inside Pharo could be beneficial for the community
under a single scenario.

Abandoning Morphic and Bloc and moving to QT.

I know this is enough to start people throwing tomatoes at me but I do
believe it would be of immense value to Pharo.

QT is de facto THE KING of GUIs , not only QT can embed a browser , OpenGL
contexts it can also embed itself inside mobile apps and web apps. Its an
extremely powerful API that will open the doors for us to all enviroments
and OSes, web dev, iOS, Android, Macos, Windows, Linux etc.

But realistically this will never happen because it will require for Pharo
devs to start coding in C++ to wrap QT for Pharo (its a C++ lib) and then
they will stop throwing tomatoes at me and start throwing knifes and I
would not even blame them.

Good luck with anything you decide doing you are going needs tons of it and
tons of patience.


Re: [Pharo-dev] Problem with FileSystem in WIndows

2017-04-30 Thread Sven Van Caekenberghe

> On 30 Apr 2017, at 09:48, Max Leske  wrote:
> 
> Hi Casimiro,
> 
> have you tried using normal slashes in the path name? FileSystem should 
> convert those to system path delimiters automatically. So:
> 
> C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt
> 
> And possibly you'll need a leading slash, as "C:" is a reference to the root 
> of the file system:
> 
> /C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt

There is also the following option:

FileLocator C / 'temp' / 'e8720bb4-b90a-0d00-9b1f-008709e5552b.txt'

> Cheers,
> Max
> 
>> On 30 Apr 2017, at 03:15, Casimiro de Almeida Barreto 
>>  wrote:
>> 
>> Good night all.
>>  
>> I´ve had trouble in windows concerning FileSystem.
>>  
>> ((FileSystem disk root) / 
>> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’) delete
>>  
>> Fails as if the file didn´t exist. Message:
>>  
>> FileDoesNotExist: Path / ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’
>>  
>> And I wonder what´s wrong. Because it works in linux and MacOS.
>>  
>> Trasncript show: ((FileSYstem disk root) / 
>> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’)
>>  
>> Returns:
>>  
>> File @ C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt\
>>  
>> And I wonder where the last \ came from and if is it that is messing all and 
>> how to fix things.
>>  
>> Best regards,
>>  
>> Casimiro Barreto
>> 
>>  Livre de vírus. www.avast.com. 
> 




Re: [Pharo-dev] Smalltalk Internet Browser

2017-04-30 Thread p...@highoctane.be
An interesting way would rather do something like electron.

https://electron.atom.io/

In fact, I would even go so far as to add Pharo to electron.

Phil



On Sun, Apr 30, 2017 at 1:34 AM, nacho <0800na...@gmail.com> wrote:

> Did you tried Amber?
> Is Smalltalk on the browser.
> I believe that what you mean is embedding the V8 engine into Pharo. But
> man, thats a huge work. Really...
> my 2c.
>
>
> *Lic. Ignacio Sniechowski, MBA*
> *Prosavic SRL*
> ☎*  (5411) 4542-6712*
> * (54911) 6749-4721*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Sat, Apr 29, 2017 at 7:53 PM, askoh [via Smalltalk] <[hidden email]
> > wrote:
>
>> We means all communities of Smalltalk environments. Pharo is of course
>> the biggest, hence my post here first. I am verifying the soundness of the
>> idea of SIB and then do a student project on it. I am from the VisualWork
>> community. I look forward to porting freeCAD: 3D CAD with Motion Simulation
>> to Pharo when it has 64bit version on Windows.
>>
>> Aik-Siong Koh
>>
>> Denis Kudriashov wrote
>> 2017-04-29 19:00 GMT+02:00 askoh <[hidden email]
>> >:
>>
>> > We start out by embedding Chrome inside the IDE. Make them communicate
>> > well.
>> > We then port bit by bit to Smalltalk based on needs and priorities.
>> >
>>
>> I am wondering, when you said "we" what you mean? Did you found team to
>> work on such project?
>>
>>
>>
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://forum.world.st/Smalltalk-Internet-Browser-tp4944879p4944919.html
>> To start a new topic under Pharo Smalltalk Developers, email [hidden
>> email] 
>> To unsubscribe from Pharo Smalltalk Developers, click here.
>> NAML
>> 
>>
>
> Nacho Smalltalker apprentice. Buenos Aires, Argentina.
>
> --
> View this message in context: Re: Smalltalk Internet Browser
> 
> Sent from the Pharo Smalltalk Developers mailing list archive
>  at
> Nabble.com.
>


Re: [Pharo-dev] Problem with FileSystem in WIndows

2017-04-30 Thread Max Leske
Hi Casimiro,

have you tried using normal slashes in the path name? FileSystem should convert 
those to system path delimiters automatically. So:

C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt

And possibly you'll need a leading slash, as "C:" is a reference to the root of 
the file system:

/C:/temp/e8720bb4-b90a-0d00-9b1f-008709e5552b.txt

Cheers,
Max

> On 30 Apr 2017, at 03:15, Casimiro de Almeida Barreto 
>  wrote:
> 
> Good night all.
>  
> I´ve had trouble in windows concerning FileSystem.
>  
> ((FileSystem disk root) / ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’) 
> delete
>  
> Fails as if the file didn´t exist. Message:
>  
> FileDoesNotExist: Path / ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’
>  
> And I wonder what´s wrong. Because it works in linux and MacOS.
>  
> Trasncript show: ((FileSYstem disk root) / 
> ‘C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt’)
>  
> Returns:
>  
> File @ C:\temp\e8720bb4-b90a-0d00-9b1f-008709e5552b.txt\
>  
> And I wonder where the last \ came from and if is it that is messing all and 
> how to fix things.
>  
> Best regards,
>  
> Casimiro Barreto
> 
>  
> 
> Livre de vírus. www.avast.com 
> .
>