[Pharo-users] Windows headless and service

2016-01-29 Thread Robert Kuszinger
Hello Everyone!

I'd like to install a Seaside app in Pharo in Windows (Server 2008).

I live on linux but now I must put it on Windows.

Pharo --help pops up a window with only a fragment of options.

Pharo --headless TheFilenameOf.image

Won't do anything. I've checked the available books but they mostly talk
about mac osx/Linux which is welcome, anyway...

Does anyone have experience with pharo (service) on windows?

My version is (from readme):

*Pharo 4.0 This distribution was built December 07, 2015.*

thanks
Robert


Re: [Pharo-users] Windows headless and service

2016-01-31 Thread Robert Kuszinger
Torsten, thanks.

Ok, I'll test it. Idon't mind I need SRVANY or other solution on win to
start it. It is not necessary to provide a well formed service.
I'm stopped at the headless running at all. I'Ll check the headless CogVM.
Once it runs headless I'll be able to launch it at machine start.

I'll share my results here.

best regards
Robert


Torsten Bergmann  ezt írta (időpont: 2016. jan. 31., V,
1:31):

> Running as Windows Service was possible back in Squeak VM days where
> Andreas Raab implemented registration into SCM (Service Control Manager).
> Code should be in Pharo VM too.
>
> See also http://forum.world.st/headless-CogVM-on-Windows-td4648336.html
>
> Possibly the "-service" may be broken/may not be recognized in Pharo Win VM
> anymore, havent checked.
>
> Bye
> T.
>
>


Re: [Pharo-users] Windows headless and service

2016-02-01 Thread Robert Kuszinger
Hello!

No luck by far. Information on forums is not enopugh for me (this is
definitely my fault, my limited background in the squek/pharo VM world).

I've checked different setups. Even putting CogVM into operation with Pharo
is not evident for me.

My trivial test was the *-headless* option which is listed with windows
Pharo but it won't start at all. No process is created. The XULRunner
example mentioned is "out of my reach" (and the demo was on Linux, also
subsequent comments on the forums stated that Mac/Win versions are not
headless.).

Who could check if it works at all? Actually I've invested a week in this
small Seaside app, performs beautifully but now it seems that It simply
cannot be installed on Windows? *How do people use Seaside/Pharo on Windows*.
Is there someone using it at all? :)
No problem if I'm the first one, anyway.
My goal is to start it automatically in the background (service is not
necessary, again, it is enought to be started).
Is it possible that Pharo starts with a widnow (splash) but noone sees it?

Summarizing:
- I'm looking for a solution to start a headless Seaside app on Windows
possibly with Pharo image.

thanks for any recommendations.




Robert Kuszinger  ezt írta (időpont: 2016. jan. 31.,
V, 8:27):

> Torsten, thanks.
>
> Ok, I'll test it. Idon't mind I need SRVANY or other solution on win to
> start it. It is not necessary to provide a well formed service.
> I'm stopped at the headless running at all. I'Ll check the headless CogVM.
> Once it runs headless I'll be able to launch it at machine start.
>
> I'll share my results here.
>
> best regards
> Robert
>
>
> Torsten Bergmann  ezt írta (időpont: 2016. jan. 31., V,
> 1:31):
>
>> Running as Windows Service was possible back in Squeak VM days where
>> Andreas Raab implemented registration into SCM (Service Control Manager).
>> Code should be in Pharo VM too.
>>
>> See also http://forum.world.st/headless-CogVM-on-Windows-td4648336.html
>>
>> Possibly the "-service" may be broken/may not be recognized in Pharo Win
>> VM
>> anymore, havent checked.
>>
>> Bye
>> T.
>>
>>


Re: [Pharo-users] Windows headless and service

2016-02-01 Thread Robert Kuszinger
Esteban,


thanks, I'll try and keep informed...

regards
Robert



2016-02-01 11:14 GMT+01:00 Esteban Lorenzano :

> Hi  Robert,
>
> First, the option to execute pharo headless is “—headless” (two “-“, not
> just one). Maybe the help is bad :)
> But that will not solve your problem at all, since headless mode is fake
> and in case of windows it will open anyway a window (in the systray if you
> are lucky…).
>
> However, I managed (some years ago, so do not ask for details ;) to run a
> pharo app as a service using this program: http://rozanski.org.uk/services
> here is an article that explains how to use it:
> http://www.howtogeek.com/50786/using-srvstart-to-run-any-application-as-a-windows-service/
> (I do not remember how I did it and it would be nice if you can share your
> experience, so we can have documentation somewhere :P)
>
> Also I googled a bit and according to this:
> http://stackoverflow.com/questions/3582108/create-windows-service-from-executable,
> looks like the “microsoft” way of doing it is using a command “sc”. I
> suppose that command will not work if your program is not prepared for
> being a service, but you can give it a try (first approach *will* work,
> anyway :P)
>
> Hope this works… please keep us informed.
> Esteban
>
>
>


Re: [Pharo-users] Windows headless and service

2016-02-01 Thread Robert Kuszinger
Wow!

Nice workaround but cannot help this case.
If I'd have the power for such a thing I'd change the Win server to Linux.
There are too many dependencies in the background which are all Windows
related. I cannot add - or better, not allowed to add -  virtualbox nor
qemu or other layer to the system. And this small app also uses ODBC to
connect SQL server on the same Win machine. But the key issue is that I
cannot add any other component but maybe Smalltalk app. Smalltalk is my
choice and preference. And actually, the app is done.

Anyway, thanks for the idea :)

Best regards
Robert




Ben Coman  ezt írta (időpont: 2016. febr. 1., H,
10:29):

> On Mon, Feb 1, 2016 at 4:04 PM, Robert Kuszinger 
> wrote:
> > Who could check if it works at all? Actually I've invested a week in this
> > small Seaside app, performs beautifully but now it seems that It simply
> > cannot be installed on Windows? How do people use Seaside/Pharo on
> Windows.
> > Is there someone using it at all? :)
> > No problem if I'm the first one, anyway.
> > My goal is to start it automatically in the background (service is not
> > necessary, again, it is enought to be started).
> > Is it possible that Pharo starts with a widnow (splash) but noone sees
> it?
> >
> > Summarizing:
> > - I'm looking for a solution to start a headless Seaside app on Windows
> > possibly with Pharo image.
> >
> > thanks for any recommendations.
>
> Hi Robert,
>
> I haven't had anything to do with headless Pharo, so I'm no use to you
> there.  Hopefully someone else can help, but I have personal saying
> "If you can't solve the problem, change the problem" -- so just a wild
> suggestion for a kludge workaround until you get a better answer - run
> virtualbox headless [1] or as a service [2] with Linux inside to run
> headless Pharo.  Disclaimer, I've not tried these myself either - just
> found them through a search.
>
> [1]
> https://mkrmr.wordpress.com/2011/05/06/running-a-headless-virtualbox-in-windows/
> [2] https://code.google.com/archive/p/virtualboxservice/
>
> HTH, cheers -ben
>
>


Re: [Pharo-users] Windows headless and service

2016-02-07 Thread Robert Kuszinger
Hello Everyone!

I've tested NSSM successfully with manual service start and reboot/auto
start as well.

Details:

Windows Server 2008 R2 64 bit.


   - *For the log: Pharo.exe --headless  does nothing. Executed
   from windows command line in the directory where Pharo is installed
   (actually, extracted)*
   - NSSM
  - full path to pharo exe
  - working directory is the path where Pharo.exe is put
  - parameter: name of production image pu in the same working dir
  - enable interaction with desktop (haven't tested without itt
  - all other options are default
   - Service appears on service list. Started well manually.
   - Seaside web server with installed app is alive and runs well
   - Service manual stop function works (actually, kills it, no problem,
   this is a stateless server holding only volatile session data thus no
   shutdown callback is necessary)

That's all by far.

This seems to be a 100% solution to run Pharo WWW server on Windows as a
service. Thanks for the many ideas and support.


Later on I may inform you on the results of real life situations (load,
stability, etc).


Best regards
Robert

Esteban Lorenzano  ezt írta (időpont: 2016. febr. 1.,
H, 13:46):

>
> > On 01 Feb 2016, at 13:19, jan.struz  wrote:
> >
> > Hi,
> > try NSSM - https://nssm.cc/usage
> >
> > I personally haven't found anything better.
>
>


[Pharo-users] Pharo.ini access

2016-02-08 Thread Robert Kuszinger
Hello Everyone!

I wonder if there is a chance to access pharo.ini contents from inside the
image

I'm lazy and I'd like to add my own settings (new keys) to pharo.ini. It
would be nice to have these once the image is started so I don't have to
create my own .ini and parse it.

So, is Pharo.ini key values are in the image in a class or somewhere?

I'd like to add:

gcDowloadDir = dirname
gcODBCsource = DSN


and so on :)

thanks
Robert


Re: [Pharo-users] Pharo.ini access

2016-02-08 Thread Robert Kuszinger
Actually, I wanted to be lazier... But all right, I create my onw ini :)

Thanks!



Hernán Morales Durand  ezt írta (időpont: 2016.
febr. 8., H, 15:57):

> Hi Robert,
>
> You have a nice INI parser in
> http://www.smalltalkhub.com/#!/~TorstenBergmann/INIFile
> Cheers,
>
> Hernán
>
>
> 2016-02-08 11:30 GMT-03:00 Robert Kuszinger :
>
>> Hello Everyone!
>>
>> I wonder if there is a chance to access pharo.ini contents from inside
>> the image
>>
>> I'm lazy and I'd like to add my own settings (new keys) to pharo.ini. It
>> would be nice to have these once the image is started so I don't have to
>> create my own .ini and parse it.
>>
>> So, is Pharo.ini key values are in the image in a class or somewhere?
>>
>> I'd like to add:
>>
>> gcDowloadDir = dirname
>> gcODBCsource = DSN
>> 
>>
>> and so on :)
>>
>> thanks
>> Robert
>>
>>
>


Re: [Pharo-users] How to generate "Content-Type: application/octet-stream" with Zinc client

2016-02-10 Thread Robert Kuszinger
OK. I'm an idiot. This is server code, so, another business....


Robert Kuszinger  ezt írta (időpont: 2016. febr. 10.,
Sze, 14:15):

> Hello!
>
> Here is a code snippet:
>
>
> At the trivial pülace you can set whatever mime type yout think will work
> for you.
> I hope this helps.
>
> Robert
> --
>
>
> sendFile
>
> |contents stream |
>
> stream :=  FileStream readOnlyFileNamed: self file.
> stream binary.
> contents := stream contents.
> stream close.
>
>  self requestContext respond: [ :response |
>response
>*contentType: 'application/x-msdownload';*
>document: contents;
>attachmentWithFileName: self fileName
> ].
>
>
>
>
> chicoary  ezt írta (időpont: 2016. febr. 10., Sze,
> 14:08):
>
>> Thanks Sven for your reply.
>>
>> The curl I want reproduce with Zinc is:
>>
>> curl 'http://localhost:5001/api/v0/add?stream-channels=true' \
>> -H 'content-type: multipart/form-data;
>> boundary=a831rwxi1a3gzaorw1w2z49dlsor' \
>> -H 'Connection: keep-alive' \
>> --data-binary $'--a831rwxi1a3gzaorw1w2z49dlsor\r\nContent-Type:
>> application/octet-stream\r\nContent-Disposition: file; name="file";
>> filename="file.txt"\r\n\r\nfile.txt
>> contents--a831rwxi1a3gzaorw1w2z49dlsor--' --compressed
>>
>> It is like an example in https://github.com/ipfs/js-ipfs-api#tooling.
>>
>> I want to implement the ipfs add command in my project
>> http://smalltalkhub.com/#!/~chicoary/SmallIPFS/.
>>
>>
>>
>>
>>
>> -
>> http://chico...@gmail.com
>> --
>> View this message in context:
>> http://forum.world.st/How-to-generate-Content-Type-application-octet-stream-with-Zinc-client-tp4876671p4876782.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>


Re: [Pharo-users] How to generate "Content-Type: application/octet-stream" with Zinc client

2016-02-10 Thread Robert Kuszinger
Hello!

Here is a code snippet:


At the trivial pülace you can set whatever mime type yout think will work
for you.
I hope this helps.

Robert
--


sendFile

|contents stream |

stream :=  FileStream readOnlyFileNamed: self file.
stream binary.
contents := stream contents.
stream close.

 self requestContext respond: [ :response |
   response
   *contentType: 'application/x-msdownload';*
   document: contents;
   attachmentWithFileName: self fileName
].




chicoary  ezt írta (időpont: 2016. febr. 10., Sze,
14:08):

> Thanks Sven for your reply.
>
> The curl I want reproduce with Zinc is:
>
> curl 'http://localhost:5001/api/v0/add?stream-channels=true' \
> -H 'content-type: multipart/form-data;
> boundary=a831rwxi1a3gzaorw1w2z49dlsor' \
> -H 'Connection: keep-alive' \
> --data-binary $'--a831rwxi1a3gzaorw1w2z49dlsor\r\nContent-Type:
> application/octet-stream\r\nContent-Disposition: file; name="file";
> filename="file.txt"\r\n\r\nfile.txt
> contents--a831rwxi1a3gzaorw1w2z49dlsor--' --compressed
>
> It is like an example in https://github.com/ipfs/js-ipfs-api#tooling.
>
> I want to implement the ipfs add command in my project
> http://smalltalkhub.com/#!/~chicoary/SmallIPFS/.
>
>
>
>
>
> -
> http://chico...@gmail.com
> --
> View this message in context:
> http://forum.world.st/How-to-generate-Content-Type-application-octet-stream-with-Zinc-client-tp4876671p4876782.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


[Pharo-users] minimal image load config question

2016-02-28 Thread Robert Kuszinger
Hello!

I'm trying to load my app (config) into the minimal image from the command
line.

pharo min.image config
http://smalltalkhub.com/mc/RobertKuszinger/GcUploader/main
ConfigurationOfGiscomKkt --install=stable --username=
--password=

After a few seconds of working it stops like this (longer version at the
end if this email):

[]

OrderedCollection(Collection)>>do:displayingProgress:every:

OrderedCollection(Collection)>>do:displayingProgress:

*Got startup errors: *

* MessageNotUnderstood: Unicode class>>isUnifiedKanji:*


Does anyone have any idea *what to check*? Is there something missing?
Minimal image is from the Pharo website.
I've tested my config on a brand new Pharo4 image and it loads well...
Should I preload another config into the image?


Thanks


[kuszi@kuszidell pharo-minimal]$ pharo --version
3.9-7 #1 Thu Jan 7 00:37:02 CET 2016 gcc 4.6.3 [Production ITHB VM]
NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.21 uuid:
4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Jan 7 2016
NBCogit NativeBoost-CogPlugin-EstebanLorenzano.21 uuid:
4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Jan 7 2016
https://github.com/pharo-project/pharo-vm.git Commit:
bad6fa2684afcf1d7cdb485f11049a4a4290fbc8 Date: 2015-12-14 12:47:06 +0100
By: Esteban Lorenzano  Jenkins build #15027
Linux pharo-linux 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45
UTC 2012 i686 i686 i386 GNU/Linux
plugin path: /usr/share/pharo-vm/ [default: /usr/share/pharo-vm/]

-

MethodAddition>>writeSourceToLog

MethodAddition>>createCompiledMethod

MCMethodDefinition>>addMethodAdditionTo:

[ :each | each addMethodAdditionTo: methodAdditions ] in
MCPackageLoader>>basicLoadDefinitions in Block: [ :each | each
addMethodAdditionTo: methodAddition...etc...

[ :each |

| newLabel |

"Special handling for first and last element"

(count = 0 or: [ count + 1 = size or: [ (Time millisecondsSince:
lastUpdate) >= msecs ] ])

ifTrue: [

bar current: count.

oldLabel = (newLabel := (labelBlock cull: each) ifNil: [ oldLabel ])

ifFalse: [

bar label: newLabel.

ProgressNotification signal: '' extra: (oldLabel := newLabel) ].

lastUpdate := Time millisecondClockValue ].

aBlock value: each.

count := count + 1 ] in [ :bar |

labelBlock := aStringOrBlock isString

ifTrue: [

bar label: aStringOrBlock.

[ :dummyItem | aStringOrBlock ] ]

ifFalse: [ aStringOrBlock ].

self

do: [ :each |

| newLabel |

"Special handling for first and last element"

(count = 0 or: [ count + 1 = size or: [ (Time millisecondsSince:
lastUpdate) >= msecs ] ])

ifTrue: [

bar current: count.

oldLabel = (newLabel := (labelBlock cull: each) ifNil: [ oldLabel ])

ifFalse: [

bar label: newLabel.

ProgressNotification signal: '' extra: (oldLabel := newLabel) ].

lastUpdate := Time millisecondClockValue ].

aBlock value: each.

count := count + 1 ] ] in
OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [
:each | ...

OrderedCollection>>do:

[ :bar |

labelBlock := aStringOrBlock isString

ifTrue: [

bar label: aStringOrBlock.

[ :dummyItem | aStringOrBlock ] ]

ifFalse: [ aStringOrBlock ].

self

do: [ :each |

| newLabel |

"Special handling for first and last element"

(count = 0 or: [ count + 1 = size or: [ (Time millisecondsSince:
lastUpdate) >= msecs ] ])

ifTrue: [

bar current: count.

oldLabel = (newLabel := (labelBlock cull: each) ifNil: [ oldLabel ])

ifFalse: [

bar label: newLabel.

ProgressNotification signal: '' extra: (oldLabel := newLabel) ].

lastUpdate := Time millisecondClockValue ].

aBlock value: each.

count := count + 1 ] ] in
OrderedCollection(Collection)>>do:displayingProgress:every: in Block: [
:bar | ...

BlockClosure>>cull:

[ result := block cull: self ] in [

self prepareForRunning.

[ result := block cull: self ]

on: JobNotification

do: [ :notification | notification handle: self ] ] in Job>>run in Block: [
result := block cull: self ]

BlockClosure>>on:do:

[

self prepareForRunning.

[ result := block cull: self ]

on: JobNotification

do: [ :notification | notification handle: self ] ] in Job>>run in Block: [
...

BlockClosure>>ensure:

Job>>run

DummyUIManager(UIManager)>>displayProgress:from:to:during:

ByteString(String)>>displayProgressFrom:to:during:

OrderedCollection(Collection)>>do:displayingProgress:every:

OrderedCollection(Collection)>>do:displayingProgress:

Got startup errors:

MessageNotUnderstood: Unicode class>>isUnifiedKanji:


[Pharo-users] SMTPCLient vs Exchange smtp - always timeout

2016-04-01 Thread Robert Kuszinger
Hello!

I'm trying to send an email with SMTPClient.

It always stop with timeout here (Data receive timed out):










*waitForDataFor: timeout"Wait for the given nr of seconds for data to
arrive.Signal a time out or connection close exception if either
happens before data becomes available."^selfwaitForDataFor:
timeoutifClosed: [ConnectionClosed signal: 'Connection closed while
waiting for data.']ifTimedOut: [ConnectionTimedOut signal: 'Data
receive timed out.']*

Test code from the Playground is at the end.

The server is Exchange. I've tested with bare hand telnet connection, it
works well. I was able to create email through telnet and send it.
But the SMTPClient in pharo always runs to timeout.

Others:

last message in SMTPClient ( firstLine := self stream nextLine.I saw in
debugger)

fetchNextResponse
"The FTP and similar protocols allow multi-line responses.
If the response is multi-line, the fourth character of the first line
is a
$- and the last line repeats the numeric code but the code is followed
by
a space."

| response result firstLine |
result := '' writeStream.

*firstLine := self stream nextLine.* [
*]*



Last response from server:  (lastResponse instance variable):
*354 Start mail input; end with .*   (copied from debugger)

This is why I forced CRLF... at the end of the message
It seems to wait a response after sending the data

Is there any idea what else to check?


Thanks: Robert


 Playground code (yes, port 26)

*SMTPClient* deliverMailFrom: 'i...@sender.hu' to: #('
laszlo.gom...@recipient.hu') text:
'
To: 
From: 
Subject: this is a test

Hello!

ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP
',Character cr asString,Character lf asString,'.'
,Character cr asString,Character lf asString
usingServer: '10.0.0.31:26'.


[Pharo-users] IIS and Pharo web service solutions

2016-04-01 Thread Robert Kuszinger
Hello!

1)-
I've successfully worked out how to operate Pharo / Seaside web services
behind IIS on Windows Server 2008 (R2) but maybe works on later editions as
well. I could summarize it in a "HOWTO" if there is interest or even post
it to include in a documentation. (Pharo as a service on Windows, IIS
modules to install, how to make it and how to configure proxy / url rewrite)

2)-
Since failed finding an usable binary for nginx uploader module on windows
I worked out a method (not really a piece of software) how to use
NeatUpload (.NET solution) together with Pharo/Seaside to receive hundreds
of megabytes of uploads on Windows servers. If there is interest I'm also
ready to document and post it here or somewhere.

Please sign any interest here or in private email and then I'll create the
docs.

Thanks for the many help from many of you during the last two months :)

Robert


[Pharo-users] SMTPClient further - kind of answer

2016-04-03 Thread Robert Kuszinger
Hello,

A few days ago I've posted an SMTP related question about timeouts.
(SMTPClient sending). I was able the repeat the situation on Linux as well
with Postfix SMTP server on the other side (The original question was
Windows / Exchange Server)

Now smtp works and there are two consequences, at least for Pharo/Seaside
beginners like I am :)

   - Using Halt for debugging in such a Seaside project when sending
   SMTPClient emails could make this timeout. It waits for signal not coming
   and it maybe related to timeout handling inside what I don't understand. If
   you face SMTPClient timeout in the DATA phase of sending an email check if
   you are debugging (in debugger window, using halts, etc) and try without
   that (eg. Transcript show: logs or something else to check what is going
   on).
   - Pay extra attention to email mime type and content encoding including
   subject string of the message. Since I'm sending hungarian language emails
   it was essential. Server answers and sensitivity on exotic email messages
   depends on the SMTP server implementation in question, but staying minimal
   on smtp fields is always a good idea. Specify To: and From: fields in the
   DATA part also.

When I created correct email DATA part with correct encoding and removed
debugging from the Seaside application code (so debugger was not active
when run into SMTP sending) emails started to go out with no problem.

good night
R


[Pharo-users] ODBC question - could not coerce arguments

2016-04-10 Thread Robert Kuszinger
Hello Everyone!

I'm facing a problem with ODBC which may be related with character encoding.

>From the debugger, it is:

*'Could not coerce arguments'* , error message is caught here:

externalCallFailed
"Raise an error after a failed call to an external function"
| errCode |
errCode := ExternalFunction getLastError. "this allows us to look at
the actual error code"
^self error: (ExternalFunction errorMessageFor: errCode).


The SQL command is (runs well in SQL Server manager):

update gcp_users SET
user_name='VERGA Veszprémi Erdőgazdaság Zrt.',
user_name2='',
user_city='8200 Veszprém',
user_custom_1='88-591-545*',
user_profession='Jutasi u. 10.'
WHERE
user_email='mol...@drfrohlich.hu' AND
user_custom_2='0524'

The sql statement above is copied from the debugger as well, caught here:

sqlExecDirect: queryString
connection checkSQLReturn: (ODBCLibrary default
sqlExecDirect: handle statement: queryString length: queryString
size
) statement: handle.

being as the querystring, class *WideString* (!?).


I'm trying also to convert it to CP1250 (which has all the characters I
need, actually data comes from a CP1250 txt file and converts well into
pharo system) but it also results in a WideString object.. Example:

(CP1250TextConverter new convertFromSystemString: 'űáőí')--> shows
WideString in debugger.

I think CP1250 should result in a ByteString...


Is this the problem (could not coerce arguments).

thanks
Robert


[Pharo-users] Solution: ODBC - could not coerce arguments

2016-04-10 Thread Robert Kuszinger
Hi All,


Just for the records, I've found the answer finally on my previous question.

YES it was an encoding problem.

It is your responsibility to know how your ODBC link (in ODBC
administrator) is configured and what encoding it is waiting for.

All strings must be passed for the ODBC classes correctly encoded.

In my example it was CP1250.


*encodedquery := yourquery* *encodeWith: (ZnByteEncoder newForEncoding:
'cp1250').*

(Yes, Zn... classes are present as I'm making it for web)

It results in a ByteArray but don't worry, ODBC system accepts it in
*execute:* and maybe its other messages as well.

Best regards
Robert


[Pharo-users] Roassal 2 disable browser and vis. animations

2016-08-27 Thread Robert Kuszinger
Hello Group,


since yesterday I'm investigating the Roassal examples.

Udderlying system is:


   - Pharo-50761.image


   - pharo-spur --version
   5.0 #1 Wed May  4 11:54:28 CEST 2016 gcc 4.6.3 [Production Spur ITHB VM]
   CoInterpreter VMMaker.oscog-eem.1855 uuid:
   d8e4a3c2-a3bf-4adc-b224-8012903a1ef4 May  4 2016
   StackToRegisterMappingCogit VMMaker.oscog-eem.1855 uuid:
   d8e4a3c2-a3bf-4adc-b224-8012903a1ef4 May  4 2016
   https://github.com/pharo-project/pharo-vm.git Commit:
   b8ec25a570d7539653e1d793e97609adb509aaed Date: 2016-05-04 11:14:22 +0200
   By: Esteban Lorenzano  Jenkins build #589
   Linux pharo-linux 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45
   UTC 2012 i686 i686 i386 GNU/Linux
   plugin path: /usr/share/pharo/spur/ [default: /usr/share/pharo/spur/]


Roassal is loaded like this:

   - Gofer it
   smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
   configurationOf: 'Roassal2';
   loadStable.



In the office (yes, in worktime :)  ) I also tested on Windows 7.

I only click through all the built in Roassal examples. I AM IMPRESSED!
Very powerful system, even the GIS (map) part with OSM integration (VOW!)

Anyway, on windows it crashed many times (On WIndows I downloaded this:
http://moosetechnology.org/res/download/moose_suite_6_0-win.zip)


I observed that windows crash moment was always some kind of animation
(window transition animation of the Roassal exmaples browser or
visualization animation like pan or zoom).


Question:


   - Is there a way to disable Roassal visualization animations?
   - is there a way to disable window component animation in the Roassal
   Example Browser? (When clicking on the dots and moving between examples
   list and the visualization example itself, for example)

I wonder if it would make the windows run more stable.

On Linux it is OK but also painfully slow (ok, old machines).

I prefer animationless repaint of the visualization canvas and window
transitions.


thanks

Robert


Re: [Pharo-users] Roassal 2 disable browser and vis. animations

2016-08-27 Thread Robert Kuszinger
Peter,

thanks for the fast reply. I'll take it into consideration.

I have some server solutions in mind for dashboard functionality especially
with maps. Since it is not interactive it is not touched by animations, but
it could affect development/testing phase of the visualization compositions.

However, your comment on general Cairo/Typeset issues is more interesting.
I'll take care before offering end-user solutions using these frameworks.

Best regards
Robert



2016-08-27 12:36 GMT+02:00 Peter Uhnak :

> On Sat, Aug 27, 2016 at 12:04:00PM +0200, Robert Kuszinger wrote:
> >
> > Anyway, on windows it crashed many times (On WIndows I downloaded this:
> > http://moosetechnology.org/res/download/moose_suite_6_0-win.zip)
>
> The VM is not particularly stable even on linux when it comes to FreeType
> and Cairo.
> Considering crashes on Windows do not even produce crash dumps, I don't
> see the problems being fixed anytime soon (unless the fix for linux will
> also magically fix windows too).
>

[...]


[Pharo-users] csv utf8 etc problem

2016-11-14 Thread Robert Kuszinger
Hello,

I've trying to play around with Roassal so I load a csv.

Code by far is here:


|csv mbfs cont|


mbfs := FileStream fileNamed:
'C:\Users\kusr\Documents\vis\test1utf8_cut2.csv'.
mbfs
lineEndConvention: #crlf;
converter: UTF8TextConverter new.
cont := mbfs contents.


In the contents message the following happens:

Array(Object)>>primitiveFailed:
Array(Object)>>primitiveFailed
Array>>elementsForwardIdentityTo:
ByteString(Object)>>becomeForward:
ByteString>>at:put:
MultiByteFileStream>>next:
MultiByteFileStream(FileStream)>>contents
UndefinedObject>>DoIt
OpalCompiler>>evaluate
RubSmalltalkEditor>>evaluate:andDo:
RubSmalltalkEditor>>highlightEvaluateAndDo:
[ textMorph textArea editor highlightEvaluateAndDo: ann action.
textMorph shoutStyler style: textMorph text ] in [ textMorph textArea
handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann
action.
textMorph shoutStyler style: textMorph text ] ] in
GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate:
in Block: [ textMorph textArea editor highlightEvaluateAndDo...etc...
RubEditingArea(RubAbstractTextArea)>>handleEdit:
[ textMorph textArea
handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann
action.
textMorph shoutStyler style: textMorph text ] ] in
GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate:
in Block: [ textMorph textArea...
WorldState>>runStepMethodsIn:
WorldMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
WorldState>>doOneSubCycleFor:
WorldMorph>>doOneSubCycle
MenuMorph>>invokeModalAt:in:allowKeyboard:
MenuMorph>>invokeModal:
MenuMorph>>invokeModal
[ :menu |
menu setInvokingView: self editor.
menu invokeModal.
self changed.
^ true ] in RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity: in
Block: [ :menu | ...
MenuMorph(Object)>>ifNotNilDo:
RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity:
RubEditingArea(RubAbstractTextArea)>>mouseDown:
RubEditingArea(Morph)>>handleMouseDown:
MouseButtonEvent>>sentTo:
RubEditingArea(Morph)>>handleEvent:



HERE:  (ByteString at:put:)

...
aCharacter isOctetCharacter ifFalse:[
"Convert to WideString"
self becomeForward: (WideString from: self).
^self at: index put: aCharacter.
...

Image is

moose_suite_6_0 on windows.

What should I do? What is frightening that I linked file and SOMETIMES
it raises the error above and sometimes not... ???

(zip file with sample csv...)

https://drive.google.com/file/d/0B0JASZM9_9QqX19JZElwMVVXWjA/view?usp=sharing

thanks
Robert


Re: [Pharo-users] csv utf8 etc problem

2016-11-14 Thread Robert Kuszinger
Sven,

thanks for the fast reply. It worked for sure, but only in a fresh Pharo 5
donwload, NeoCSV load and so on.
It failed in Moose 6 windows one click distribution so it may signal a
Moose 6 image/config/class problem or incompatibility.

Your recommendation is more elegant so I walk this way :)

thanks
Robert


2016-11-14 10:05 GMT+01:00 Sven Van Caekenberghe :

> Hi Robert,
>
> You should use more modern stuff ;-)
>
> This works for me (Pharo 4, macOS), using your file:
>
> ((FileLocator desktop / 'test1utf8_cut2.csv') readStreamDo: [ :in |
>(NeoCSVReader on: in) separator: $; ; upToEnd ]) first: 4.
>
> ==>>
>
> #(
> #('rend.szam' 'cikkszam' 'cikk.megnev' 'dop_id' 'dop.cikszam' 'dop.megnev'
> 'termekgazda' 'kesz.menny' 'igeny.menny' 'muvelet.sz' '2' 'munkahely'
> 'muv.start' 'muv.befejez' 'naptar' 'munkanap' 'mnap.start' 'mnap.befejez'
> 'TOL' 'IG' 'PERIOD' 'óra')
> #('100509' 'KK00160' 'Szépművészeti Múzeum Baráti kör FEHÉR' '27240'
> 'KK00160' 'Szépműv.Múzeum Baráti Kör FEHÉR /11900099/' 'CSOMBOKZ' '0' '4'
> '10' '10' 'FMKM2' '2016.10.28 21:57' '2016.10.28 21:58' 'K52' '2016.10.28
> 0:00' '2016.10.28 6:00' '2016.10.28 14:00' nil nil 'M1' nil)
> #('100509' 'KK00160' 'Szépművészeti Múzeum Baráti kör FEHÉR' '27240'
> 'KK00160' 'Szépműv.Múzeum Baráti Kör FEHÉR /11900099/' 'CSOMBOKZ' '0' '4'
> '10' '10' 'FMKM2' '2016.10.28 21:57' '2016.10.28 21:58' 'K52' '2016.10.28
> 0:00' '2016.10.28 14:00' '2016.10.28 22:00' '2016.10.28 21:57' '2016.10.28
> 21:58' 'M2' '0,01')
> #('100509' 'KK00160' 'Szépművészeti Múzeum Baráti kör FEHÉR' '27240'
> 'KK00160' 'Szépműv.Múzeum Baráti Kör FEHÉR /11900099/' 'CSOMBOKZ' '0' '4'
> '20' '20' 'FMKM2' '2016.10.28 21:58' '2016.10.28 22:00' 'K52' '2016.10.28
> 0:00' '2016.10.28 6:00' '2016.10.28 14:00' nil nil 'M1' nil)
> )
>
> HTH
>
> Sven
>
> > On 14 Nov 2016, at 09:55, Robert Kuszinger  wrote:
> >
> > Hello,
> >
> > I've trying to play around with Roassal so I load a csv.
> >
> > Code by far is here:
> >
> >
> > |csv mbfs cont|
> >
> >
> > mbfs := FileStream fileNamed: 'C:\Users\kusr\Documents\vis\
> test1utf8_cut2.csv'.
> > mbfs
> > lineEndConvention: #crlf;
> > converter: UTF8TextConverter new.
> > cont := mbfs contents.
> >
> >
> > In the contents message the following happens:
> >
> > Array(Object)>>primitiveFailed:
> > Array(Object)>>primitiveFailed
> > Array>>elementsForwardIdentityTo:
> > ByteString(Object)>>becomeForward:
> > ByteString>>at:put:
> > MultiByteFileStream>>next:
> > MultiByteFileStream(FileStream)>>contents
> > UndefinedObject>>DoIt
> > OpalCompiler>>evaluate
> > RubSmalltalkEditor>>evaluate:andDo:
> > RubSmalltalkEditor>>highlightEvaluateAndDo:
> > [ textMorph textArea editor highlightEvaluateAndDo: ann action.
> > textMorph shoutStyler style: textMorph text ] in [ textMorph textArea
> > handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann
> action.
> > textMorph shoutStyler style: textMorph text ] ] in
> GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate:
> in Block: [ textMorph textArea editor highlightEvaluateAndDo...etc...
> > RubEditingArea(RubAbstractTextArea)>>handleEdit:
> > [ textMorph textArea
> > handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann
> action.
> > textMorph shoutStyler style: textMorph text ] ] in
> GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate:
> in Block: [ textMorph textArea...
> > WorldState>>runStepMethodsIn:
> > WorldMorph>>runStepMethods
> > WorldState>>doOneCycleNowFor:
> > WorldState>>doOneCycleFor:
> > WorldState>>doOneSubCycleFor:
> > WorldMorph>>doOneSubCycle
> > MenuMorph>>invokeModalAt:in:allowKeyboard:
> > MenuMorph>>invokeModal:
> > MenuMorph>>invokeModal
> > [ :menu |
> > menu setInvokingView: self editor.
> > menu invokeModal.
> > self changed.
> > ^ true ] in RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity:
> in Block: [ :menu | ...
> > MenuMorph(Object)>>ifNotNilDo:
> > RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity:
> > RubEditingArea(RubAbstractTextArea)>>mouseDown:
> > RubEditingArea(Morph)>>handleMouseDown:
> > MouseButtonEvent>>sentTo:
> > RubEditingArea(Morph)>>handleEvent:
> >
> >
> >
> > HERE:  (ByteString at:put:)
> >
> > ...
> > aCharacter isOctetCharacter ifFalse:[
> > "Convert to WideString"
> > self becomeForward: (WideString from: self).
> > ^self at: index put: aCharacter.
> > ...
> >
> > Image is
> >
> > moose_suite_6_0 on windows.
> >
> > What should I do? What is frightening that I linked file and SOMETIMES
> > it raises the error above and sometimes not... ???
> >
> > (zip file with sample csv...)
> >
> > https://drive.google.com/file/d/0B0JASZM9_9QqX19JZElwMVVXWjA/view?usp=
> sharing
> >
> > thanks
> > Robert
> >
> >
> >
> >
>
>
>
> --
> Sven Van Caekenberghe
> Proudly supporting Pharo
> http://pharo.org
> http://association.pharo.org
> http://consortium.pharo.org
>
>
>
>
>
>


Re: [Pharo-users] csv utf8 etc problem

2016-11-14 Thread Robert Kuszinger
Hello!

Steps:


   1. Download moose_suite_6_0-win  (today from official web)
   2. Load NeoCSV  (loaded well)
   3. Run this whith the earlier mentioned csv file:


 |csv mbfs cont|
 mbfs := FileStream fileNamed: 'C:\Users\kusr\Documents\vis\
test1utf8_cut2.csv'.
 mbfs
  lineEndConvention: #crlf;
 converter: UTF8TextConverter new.
   cont := mbfs contents.


Error as follows. The same happened with the alternative code from Sven.

This is a 64bit Windows 7.

Should I do any more test for you?

regards
Robert


> >
> > > Array(Object)>>primitiveFailed:
> > > Array(Object)>>primitiveFailed
> > > Array>>elementsForwardIdentityTo:
> > > ByteString(Object)>>becomeForward:
> > > ByteString>>at:put:
> > > MultiByteFileStream>>next:
> > > MultiByteFileStream(FileStream)>>contents
> > > UndefinedObject>>DoIt
> > > OpalCompiler>>evaluate
> > > RubSmalltalkEditor>>evaluate:andDo:
> > > RubSmalltalkEditor>>highlightEvaluateAndDo:
> > > [ textMorph textArea editor highlightEvaluateAndDo: ann action.
> > > textMorph shoutStyler style: textMorph text ] in [ textMorph textArea
> > > handleEdit: [ textMorph textArea editor highlightEvaluateAndDo:
> ann action.
> > > textMorph shoutStyler style: textMorph text ] ] in
> GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate:
> in Block: [ textMorph textArea editor highlightEvaluateAndDo...etc...
> > > RubEditingArea(RubAbstractTextArea)>>handleEdit:
> > > [ textMorph textArea
> > > handleEdit: [ textMorph textArea editor highlightEvaluateAndDo:
> ann action.
> > > textMorph shoutStyler style: textMorph text ] ] in
> GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate:
> in Block: [ textMorph textArea...
> > > WorldState>>runStepMethodsIn:
> > > WorldMorph>>runStepMethods
> > > WorldState>>doOneCycleNowFor:
> > > WorldState>>doOneCycleFor:
> > > WorldState>>doOneSubCycleFor:
> > > WorldMorph>>doOneSubCycle
> > > MenuMorph>>invokeModalAt:in:allowKeyboard:
> > > MenuMorph>>invokeModal:
> > > MenuMorph>>invokeModal
> > > [ :menu |
> > > menu setInvokingView: self editor.
> > > menu invokeModal.
> > > self changed.
> > > ^ true ] in RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity:
> in Block: [ :menu | ...
> > > MenuMorph(Object)>>ifNotNilDo:
> > > RubEditingArea(RubAbstractTextArea)>>yellowButtonActivity:
> > > RubEditingArea(RubAbstractTextArea)>>mouseDown:
> > > RubEditingArea(Morph)>>handleMouseDown:
> > > MouseButtonEvent>>sentTo:
> > > RubEditingArea(Morph)>>handleEvent:
> > >
> > >
> > >
> > > HERE:  (ByteString at:put:)
> > >
> > > ...
> > > aCharacter isOctetCharacter ifFalse:[
> > > "Convert to WideString"
> > > self becomeForward: (WideString from: self).
> > > ^self at: index put: aCharacter.
> > > ...
> > >
> > > Image is
> > >
> > > moose_suite_6_0 on windows.
> > >
> > > What should I do? What is frightening that I linked file and SOMETIMES
> > > it raises the error above and sometimes not... ???
> > >
> > > (zip file with sample csv...)
> > >
> > > https://drive.google.com/file/d/0B0JASZM9_9QqX19JZElwMVVXWjA/view?usp=
> sharing
> > >
> > > thanks
> > > Robert
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > Sven Van Caekenberghe
> > Proudly supporting Pharo
> > http://pharo.org
> > http://association.pharo.org
> > http://consortium.pharo.org
> >
> >
> >
> >
> >
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "We cannot reach the flow of things unless we let go."
>
>
>
>
>
>