I tried it, the file reading and writing works fine here (trunk image). When the execution hits your #halt, the FileStream buffers are not yet filled with any data. That is why you see only placeholder box characters at this stage. During the first #nextLine, the buffers are filled, so after that you should be able to see your data in the stream variables.
2017-07-23 0:06 GMT+02:00 ReliableRobots.com reliablerobots@gmail.com:
If this code is used by thousands of people, it also fails for thousands of people. I have had two Smalltalk jobs plus ran a Smalltalk SIG so I'm not in need of humility on Smalltalk unless and until you can show me my mistake. I even tried copying the file access code used by the file list tool and that did not work either. So I suspect it is a bad version of the VM.
I will try to locate an older version to confirm. It is amazing how many commentators fail to even try out the code to confirm or refute my discovery BEFORE providing commentary. Is that true humility?
On Sat, Jul 22, 2017 at 8:22 AM, Frank Shearar frank.shearar@gmail.com wrote:
On Jul 20, 2017 21:14, "ReliableRobots.com" reliablerobots@gmail.com wrote:
I ran this program and nothing happened so I added self halts and learned it can't even read the input file! Yet the File List tool reads it. Such dichotomy in behavior might be covered by a preference? I know MS Notepad, the simplest editor now allows one to store a file in ones's choice of formats. Does Squeak have a simple choice for input treatments that works in Win10?
do "Read a Bible file, reformat for beter readability and html standards." | inPath ootPath inFIle outFile line words | inPath := 'C:\Users\Owner\Desktop\Website\Jesus Words\Matthew.html'. ootPath := 'C:\Users\Owner\Desktop\Website\Jesus Words\Matthew2.html'. inFIle := FileStream oldFileNamed: inPath. outFile := FileStream newFileNamed: ootPath. self halt. [(line := inFIle nextLine) notNil whileTrue:[ words := line substrings. self halt. words size >0 ifTrue:[ outFile nextPutAll: line, '<br>'; cr; lf]. ]]. inFIle close. outFile close.
It is my observation that Squeak is the last gasp uttered by a mouse when it fears death. It is not a normal sound they make unless they are being eaten by a Python! I hope the Python people don't release code that simply doesn't work.
I too am often frustrated by code that will just not work. When I wish to blame the libraries I use, I end up asking myself "how likely is it that the bug is in my code, written by a single frail, weak human, versus a big in code used every day, in anger, by thousands of people?" I am hardly humble, but this thought does help me at least try to practice humility. It is almost always the case that the error end up being mine.
frank
To Hal Eden and others who got it right:
Thank you. I got inspired with that idea after my email yesterday and it works. That means the original problem was all my fault, the misplaced bracket ] and looking in the wrong direction was also my fault. Thanks for your patience in walking me through the problem.
I find in my old age some of my insights are improving but my eyesight and typing are diminishing. Here is a reward for your effort. www.theManChild.org I believe it is the state of the art in Christianity for the next few years.
If interested, I'm hoping to write a Bible parser that can parse it like I do, which I think is the first step to real Artificial Intelligence. After all starting with the most intelligent book should go further than starting with an encyclopedia.
On Sat, Jul 22, 2017 at 3:57 PM, Jakob Reschke <jakob.reschke@student.hpi.de
wrote:
I tried it, the file reading and writing works fine here (trunk image). When the execution hits your #halt, the FileStream buffers are not yet filled with any data. That is why you see only placeholder box characters at this stage. During the first #nextLine, the buffers are filled, so after that you should be able to see your data in the stream variables.
2017-07-23 0:06 GMT+02:00 ReliableRobots.com reliablerobots@gmail.com:
If this code is used by thousands of people, it also fails for thousands
of
people. I have had two Smalltalk jobs plus ran a Smalltalk SIG so I'm
not
in need of humility on Smalltalk unless and until you can show me my mistake. I even tried copying the file access code used by the file list tool and that did not work either. So I suspect it is a bad version of
the
VM.
I will try to locate an older version to confirm. It is amazing how many commentators fail to even try out the code to confirm or refute my
discovery
BEFORE providing commentary. Is that true humility?
On Sat, Jul 22, 2017 at 8:22 AM, Frank Shearar frank.shearar@gmail.com wrote:
On Jul 20, 2017 21:14, "ReliableRobots.com" reliablerobots@gmail.com wrote:
I ran this program and nothing happened so I added self halts and
learned
it can't even read the input file! Yet the File List tool reads it.
Such
dichotomy in behavior might be covered by a preference? I know MS
Notepad,
the simplest editor now allows one to store a file in ones's choice of formats. Does Squeak have a simple choice for input treatments that
works
in Win10?
do "Read a Bible file, reformat for beter readability and html standards." | inPath ootPath inFIle outFile line words | inPath := 'C:\Users\Owner\Desktop\Website\Jesus Words\Matthew.html'. ootPath := 'C:\Users\Owner\Desktop\Website\Jesus Words\Matthew2.html'. inFIle := FileStream oldFileNamed: inPath. outFile := FileStream newFileNamed: ootPath. self halt. [(line := inFIle nextLine) notNil whileTrue:[ words := line substrings. self halt. words size >0 ifTrue:[ outFile nextPutAll: line, '<br>'; cr; lf]. ]]. inFIle close. outFile close.
It is my observation that Squeak is the last gasp uttered by a mouse
when
it fears death. It is not a normal sound they make unless they are
being
eaten by a Python! I hope the Python people don't release code that
simply
doesn't work.
I too am often frustrated by code that will just not work. When I wish
to
blame the libraries I use, I end up asking myself "how likely is it
that the
bug is in my code, written by a single frail, weak human, versus a big
in
code used every day, in anger, by thousands of people?" I am hardly
humble,
but this thought does help me at least try to practice humility. It is almost always the case that the error end up being mine.
frank
Well, I'm glad you worked through your problem.
I would however suggest that you'd find less friction if you were to just ask your question, instead of insulting the people you're asking for help.
frank
On 24 July 2017 at 11:09, ReliableRobots.com reliablerobots@gmail.com wrote:
To Hal Eden and others who got it right:
Thank you. I got inspired with that idea after my email yesterday and it works. That means the original problem was all my fault, the misplaced bracket ] and looking in the wrong direction was also my fault. Thanks for your patience in walking me through the problem.
I find in my old age some of my insights are improving but my eyesight and typing are diminishing. Here is a reward for your effort. www.theManChild.org I believe it is the state of the art in Christianity for the next few years.
If interested, I'm hoping to write a Bible parser that can parse it like I do, which I think is the first step to real Artificial Intelligence. After all starting with the most intelligent book should go further than starting with an encyclopedia.
On Sat, Jul 22, 2017 at 3:57 PM, Jakob Reschke < jakob.reschke@student.hpi.de> wrote:
I tried it, the file reading and writing works fine here (trunk image). When the execution hits your #halt, the FileStream buffers are not yet filled with any data. That is why you see only placeholder box characters at this stage. During the first #nextLine, the buffers are filled, so after that you should be able to see your data in the stream variables.
2017-07-23 0:06 GMT+02:00 ReliableRobots.com reliablerobots@gmail.com:
If this code is used by thousands of people, it also fails for
thousands of
people. I have had two Smalltalk jobs plus ran a Smalltalk SIG so I'm
not
in need of humility on Smalltalk unless and until you can show me my mistake. I even tried copying the file access code used by the file
list
tool and that did not work either. So I suspect it is a bad version of
the
VM.
I will try to locate an older version to confirm. It is amazing how
many
commentators fail to even try out the code to confirm or refute my
discovery
BEFORE providing commentary. Is that true humility?
On Sat, Jul 22, 2017 at 8:22 AM, Frank Shearar <frank.shearar@gmail.com
wrote:
On Jul 20, 2017 21:14, "ReliableRobots.com" reliablerobots@gmail.com wrote:
I ran this program and nothing happened so I added self halts and
learned
it can't even read the input file! Yet the File List tool reads it.
Such
dichotomy in behavior might be covered by a preference? I know MS
Notepad,
the simplest editor now allows one to store a file in ones's choice of formats. Does Squeak have a simple choice for input treatments that
works
in Win10?
do "Read a Bible file, reformat for beter readability and html standards." | inPath ootPath inFIle outFile line words | inPath := 'C:\Users\Owner\Desktop\Website\Jesus Words\Matthew.html'. ootPath := 'C:\Users\Owner\Desktop\Website\Jesus Words\Matthew2.html'. inFIle := FileStream oldFileNamed: inPath. outFile := FileStream newFileNamed: ootPath. self halt. [(line := inFIle nextLine) notNil whileTrue:[ words := line substrings. self halt. words size >0 ifTrue:[ outFile nextPutAll: line, '<br>'; cr; lf]. ]]. inFIle close. outFile close.
It is my observation that Squeak is the last gasp uttered by a mouse
when
it fears death. It is not a normal sound they make unless they are
being
eaten by a Python! I hope the Python people don't release code that
simply
doesn't work.
I too am often frustrated by code that will just not work. When I wish
to
blame the libraries I use, I end up asking myself "how likely is it
that the
bug is in my code, written by a single frail, weak human, versus a big
in
code used every day, in anger, by thousands of people?" I am hardly
humble,
but this thought does help me at least try to practice humility. It is almost always the case that the error end up being mine.
frank
squeak-dev@lists.squeakfoundation.org