Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-07-27 Thread tbrunz
So I decided to write an application to solve the Zebra Puzzle, by solving
this type of problem in general.  In Pharo, of course.  

I worked out a few basic algorithms for making deductions and inferences,
and coded them, along with tests, in Pharo 8.  Now I've reached the point of
having a working "proof of concept" or prototype.  It can't (yet) solve the
Zebra Puzzle without some "human assistance", but it does keep track of the
solution state as it progresses, it handles the bookkeeping, makes the basic
deductions/inferences, and produces reports.

And I've used it to quickly solve the Zebra Puzzle.  I coded the solution as
a separate class/method, with extra rules inserted that I was able to infer
by iterating to partial solutions, so that it solves the entire thing.  It
will interesting to develop the remaining algorithms, and it would be nice
to eventually create a nice, interactive user interface for it as well.

Since I want to fashion this into an intermediate-level tutorial, I need
feedback on what I have so far.  I don't want my inexperience to lead to me
teaching the wrong techniques, etc. to other developers who are learning
Pharo.  What I have can no doubt be improved, but I need to hear from the
master craftsman in this community what parts are compromised and how (and
why) it can be made a better example of "how to program in Pharo" properly.

If anyone has the time and is willing to help, the code (complete with class
& method comments, test classes/methods, and the Zebra Puzzle example) is
here:
https://github.com/tbrunz/logic-puzzle and I'm available to answer questions
about it, of course.



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-07-27 Thread tbrunz
Having solved a number of these problems in my youth, I tried to solve this
one "by hand".  But with 6 attributes of 5 properties each, the
"bookkeeping" task was too difficult to deal with while trying to find a
consistent solution.

It turns out that it's very easy to make an inconsistent conclusion, and
it's also difficult to 'unwind' a mistake (if you can figure out where you
made your mistake.)  After I failed and restarted the puzzle several times
in a row, I thought about one of my mantras: "Let humans do the things that
humans are good at, and computers do the things that computers are good at."

After all, computers are designed to good at processing large amounts of
data without confusion or mistakes (assuming the software developers are
competent -- and use good tools).  So why not a computer program that can
solve this puzzle?



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Re: [Pharo-users] Intermediate-Level Tutorials for Pharo

2020-07-27 Thread tbrunz
Recently, I came up with one such project that might work here, and I spent
some time prototyping it.  The project is to create an application in Pharo
that can solve the "Zebra Puzzle".

What's the Zebra Puzzle?  It's an example of a "constraint satisfaction
problem", which are also known as "logic puzzles".  This particular puzzle
was published in Life International Magazine in 1962 and consists of a set
of constraints for allocating a set of values (properties) of attributes in
a mutually-exclusive way:

 1. There are five houses.
 2. The Englishman lives in the red house.
 3. The Spaniard owns the dog.
 4. Coffee is drunk in the green house.
 5. The Ukrainian drinks tea.
 6. The green house is immediately to the right of the ivory house.
 7. The Old Gold smoker owns snails.
 8. Kools are smoked in the yellow house.
 9. Milk is drunk in the middle house.
10. The Norwegian lives in the first house.
11. The man who smokes Chesterfields lives in the house next to the man with
the fox.
12. Kools are smoked in the house next to the house where the horse is kept.
13. The Lucky Strike smoker drinks orange juice.
14. The Japanese smokes Parliaments.
15. The Norwegian lives next to the blue house.

Now, who drinks the water? Who owns the zebra?



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



[Pharo-users] Intermediate-Level Tutorials for Pharo

2020-07-27 Thread tbrunz
tl;dr:  I have some ideas about more advanced Pharo tutorials, and I have an
example that I would like to have reviewed/critiqued before I develop it any
further.

I've been thinking lately that it would be nice to expand the number of
Pharo tutorials we have available.  But rather than (or along with) creating
more "beginner" level tutorials, I'd like to see some good "intermediate"
level Pharo tutorials.  I think that programmers who already know the Pharo
syntax and messaging semantics could benefit from more advanced tutorials
that demonstrate how to develop "real world" Pharo code for "real world"
processing needs.

What I'm talking about is something that assumes you know the language, the
basics of the IDE (but not necessarily how to leverage its capabilities to
aid development), and the basics of the foundation classes (but not its
details).  I'd like a tutorial for intermediate Pharo programmers who want
to become experts with Pharo.  Something that can show you how to apply the
tools of the IDE and the features of the language and base classes to create
solutions that solve complex problems.

What does the community think of this idea?

-Ted



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



[Pharo-users] Fuel - FLSerializer tests are not working (pharo 8)

2020-07-27 Thread Davide Varvello via Pharo-users
--- Begin Message ---
Hi Guys,

There is something wrong with Fuel.
I got the version for Pharo 8

Metacello new
repository: 'github://theseion/Fuel:3.0.2/repository';
baseline: 'Fuel';
load.


But tests are red, all tests of FLBinaryFileStreamBasicSerializationTest and
others

Cheers
Davide



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

--- End Message ---


Re: [Pharo-users] UFFI asynchronous callbacks

2020-07-27 Thread teso...@gmail.com
Hello,
   for executing it you will need the headless VM. If you are using
Pharo Launcher you can change the VM for that image in the
configuration combo box (The click on "Edit Configurations..."). If
you are using the zero-conf you can use "wget -O -
get.pharo.org/64/vmHeadlessLatest90 | bash"

Cheers,
Pablo

On Sat, Jul 25, 2020 at 10:17 AM ASAM  wrote:
>
> Hi Pablo,
> today I have a little bit of time to try out the "threaded FFI".
> But immediately with the load I get the following error message
> "PrimitiveFailed: primitive #primitiveInitializeQueueWith: in
> TFCallbackQueue failed".
>
> see pic:  
>
> When I load it again it looks good. But then I get the error message with
> every Pharo start.
>
> To rule out possible errors, I tested with a fresh Pharo8 64bit image, of
> course.
>
> Could you tell me what i'm doing wrong?
>
> Thanks
> ASAM
>
>
>
>
>
>
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>


-- 
Pablo Tesone.
teso...@gmail.com