Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
November 2016
- 84 participants
- 556 messages
Re: [Pharo-users] csv utf8 etc problem
by 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."
>
>
>
>
>
>
Nov. 14, 2016
Re: [Pharo-users] csv utf8 etc problem
by Tudor Girba
Hi,
You could not load NeoCSV in a Moose 6.0 image? What was the error?
Cheers,
Doru
> On Nov 14, 2016, at 11:26 AM, Robert Kuszinger <kuszinger(a)giscom.hu> wrote:
>
> 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 <sven(a)stfx.eu>:
> 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 <kuszinger(a)giscom.hu> 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=shari…
> >
> > 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."
Nov. 14, 2016
Re: [Pharo-users] csv utf8 etc problem
by 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 <sven(a)stfx.eu>:
> 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 <kuszinger(a)giscom.hu> 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
>
>
>
>
>
>
Nov. 14, 2016
Re: [Pharo-users] csv utf8 etc problem
by Sven Van Caekenberghe
And if you want to have 100% control over decoding, you can do as follows:
(FileLocator desktop / 'test1utf8_cut2.csv') binaryReadStreamDo: [ :in |
(NeoCSVReader on: (ZnCharacterReadStream on: in)) separator: $; ; upToEnd ].
(FileLocator desktop / 'test1utf8_cut2.csv') binaryReadStreamDo: [ :in |
(NeoCSVReader on: (ZnCharacterReadStream on: in encoding: #utf8)) separator: $; ; upToEnd ].
See also,
https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessf…
Part of books.pharo.org (http://files.pharo.org/books/enterprise-pharo/)
> On 14 Nov 2016, at 09:55, Robert Kuszinger <kuszinger(a)giscom.hu> 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=shari…
>
> thanks
> Robert
>
>
>
>
Nov. 14, 2016
Re: [Pharo-users] csv utf8 etc problem
by 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 <kuszinger(a)giscom.hu> 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=shari…
>
> thanks
> Robert
>
>
>
>
--
Sven Van Caekenberghe
Proudly supporting Pharo
http://pharo.org
http://association.pharo.org
http://consortium.pharo.org
Nov. 14, 2016
csv utf8 etc problem
by 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=shari…
thanks
Robert
Nov. 14, 2016
Re: [Pharo-users] Pharo catalog
by Jeff Gray
It's back! Thanks server gods...
--
View this message in context: http://forum.world.st/Pharo-catalog-tp4922782p4922862.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Nov. 14, 2016
Re: [Pharo-users] [Teaser] Using Pharo to script Unreal
by Esteban Lorenzano
+42
> On 13 Nov 2016, at 20:33, stepharo <stepharo(a)free.fr> wrote:
>
> +1
>
>
> Le 13/11/16 à 14:28, Ben Coman a écrit :
>> Really cool! Great to hear your success. Looking forward to the next instalment.
>> cheers- ben
>>
>> On Sun, Nov 13, 2016 at 4:44 AM, Dimitris Chloupis
>> <kilon.alios(a)gmail.com> wrote:
>>> Annnddddd.... I DID IT !!!
>>>
>>> I accomplished connecting Pharo with Unreal so I can script it with Pharo.
>>> It works from inside the editor and for the game as standalone. True live
>>> coding :)
>>>
>>> I am amazed how fast it is, but then I guess it should be expected with
>>> shared memory. You can watch a short demo here
>>>
>>> https://www.youtube.com/watch?v=6fsUKW8-bBE&feature=youtu.be
>>>
>>> When I first created the loop, nothing happened.
>>>
>>> So naturally I expected that my CPPBridge was not working, my loop is
>>> basically going from 1 to 150 (z axis), 10 times. After inserting a delay of
>>> just 10 milliseconds I could see movement.
>>>
>>> So apparently without the delay Pharo , Unreal and CPPBridge are so fast
>>> that do 10 times movement of 1 to 150 in under one frame !!!!! So now I will
>>> have to slow down thing to make them work as I want !!! LOL!!!! I expected
>>> to be fast but nowhere that fast.
>>>
>>> Not that I am complaining.
>>>
>>> But this is just the first step, now I will slowly and steadily start to
>>> wrap Unreal Engine 4.13 API for Pharo.
>>>
>>> Its a dream to use Pharo professionally :)
>>
>
>
Nov. 13, 2016
Re: [Pharo-users] Little challenges for a Saturday evening :): Pangram
by stepharo
Thanks Michal
I'm getting a nice introduction chapter on iterators driven by little
exercises.
Le 12/11/16 à 13:30, Michal Balda a écrit :
>
> Hi,
>
> #isPangramIn: should probably use #asLowercase as well:
>
> 'The quick brown fox jumps over a lazy dog' isEnglishPangram "false --
> now the $t is missing, there is only $T"
>
>
> Kicking things off, here are my solutions:
>
> isPangramAllSatisfyIn: alphabet "Just a small change to the original."
> | lowercase | lowercase := self asLowercase. ^ alphabet
> allSatisfy: [ :aChar | lowercase includes: aChar ]
> isPangramCopyWithoutAllIn: alphabet ^ (alphabet copyWithoutAll:
> self asLowercase) isEmpty
> isPangramDifferenceIn: alphabet ^ (alphabet difference: self
> asLowercase) isEmpty
>
>
> The performance:
>
> [ 'The quick brown fox jumps over the lazy dog' isPangramIn:
> 'abcdefghijklmnopqrstuvwxyz' ] bench. "182,096 per second (I added
> #asLowercase here as well)" [ 'The quick brown fox jumps over the lazy
> dog' isPangramAllSatisfyIn: 'abcdefghijklmnopqrstuvwxyz' ] bench.
> "159,546 per second" [ 'The quick brown fox jumps over the lazy dog'
> isPangramCopyWithoutAllIn: 'abcdefghijklmnopqrstuvwxyz' ] bench.
> "159,850 per second" [ 'The quick brown fox jumps over the lazy dog'
> isPangramDifferenceIn: 'abcdefghijklmnopqrstuvwxyz' ] bench. "25,400
> per second"
>
>
> Michal
>
>
> On 12.11.2016 09:07, stepharo wrote:
>> Hi
>>
>> If you have some comments :)
>>
>> Stef and Thibaut
>>
>>
>>
>>
>> testIsEnglishPangram
>>
>> self assert: 'the quick brown fox jumps over the lazy dog'
>> isEnglishPangram.
>> self assert: 'the five boxing wizards jump quickly'
>> isEnglishPangram.
>> self deny: 'the quick brown fox jumps over the dog'
>> isEnglishPangram.
>>
>> testIsPangramIn
>>
>> self assert: ('The quick brown fox jumps over the lazy dog'
>> isPangramIn: 'abcdefghijklmnopqrstuvwxyz').
>> self assert: ('ma papa mama' isPangramIn: 'apm').
>>
>> [[[
>> 'portez ce vieux whisky au juge blond qui fume' isEnglishPangram
>> >>> true
>>
>> 'portons dix bons whiskys à l''avocat goujat qui fume au zoo.'
>> isEnglishPangram
>> >>> true
>> ]]]
>>
>>
>> isEnglishPangram
>> "Returns true is the receiver is a pangram i.e., that it uses all
>> the characters of a given alphabet."
>> "'The quick brown fox jumps over the lazy dog' isEnglishPangram
>> >>> true"
>> "'The quick brown fox jumps over the dog' isEnglishPangram
>> >>> false"
>>
>> ^ self isPangramIn: 'abcdefghijklmnopqrstuvwxyz'.
>>
>> isPangramIn: alphabet
>> "Returns true is the receiver is a pangram i.e., that it uses all
>> the characters of a given alphabet."
>> "'The quick brown fox jumps over the lazy dog' isPangramIn:
>> 'abcdefghijklmnopqrstuvwxyz'
>> >>> true"
>> "'tata' isPangramIn: 'at'
>> >>> true"
>>
>> alphabet do: [ :aChar |
>> (self includes: aChar)
>> ifFalse: [ ^ false ]
>> ].
>> ^ true
>>
>>
>
Nov. 13, 2016
Re: [Pharo-users] [Teaser] Using Pharo to script Unreal
by stepharo
+1
Le 13/11/16 à 14:28, Ben Coman a écrit :
> Really cool! Great to hear your success. Looking forward to the next instalment.
> cheers- ben
>
> On Sun, Nov 13, 2016 at 4:44 AM, Dimitris Chloupis
> <kilon.alios(a)gmail.com> wrote:
>> Annnddddd.... I DID IT !!!
>>
>> I accomplished connecting Pharo with Unreal so I can script it with Pharo.
>> It works from inside the editor and for the game as standalone. True live
>> coding :)
>>
>> I am amazed how fast it is, but then I guess it should be expected with
>> shared memory. You can watch a short demo here
>>
>> https://www.youtube.com/watch?v=6fsUKW8-bBE&feature=youtu.be
>>
>> When I first created the loop, nothing happened.
>>
>> So naturally I expected that my CPPBridge was not working, my loop is
>> basically going from 1 to 150 (z axis), 10 times. After inserting a delay of
>> just 10 milliseconds I could see movement.
>>
>> So apparently without the delay Pharo , Unreal and CPPBridge are so fast
>> that do 10 times movement of 1 to 150 in under one frame !!!!! So now I will
>> have to slow down thing to make them work as I want !!! LOL!!!! I expected
>> to be fast but nowhere that fast.
>>
>> Not that I am complaining.
>>
>> But this is just the first step, now I will slowly and steadily start to
>> wrap Unreal Engine 4.13 API for Pharo.
>>
>> Its a dream to use Pharo professionally :)
>
Nov. 13, 2016