[Pharo-users] Glorp + P3 + SQLite

2019-10-19 Thread Todd Blanchard via Pharo-users
--- Begin Message ---
I loaded GLORP+P3 without issue.

Trying to load SQLite3 - it also wants to load GLORP which complains of 
conflict.

For P3 I used:

Metacello new
   baseline: 'P3';
   repository: 'github://svenvc/P3';
   load: 'glorp'.


For SQLite:

Metacello new 
repository: 'github://PierceNg/glorp-sqlite3:pharo7';
baseline: 'GlorpSQLite';
load.

but this fails with a conflict.  I suspect the conflict is it wants to load in 
glorp again.

I would also like to have mysql driver at some point.

Any tips for getting these to play nice together would be great.--- End Message ---


Re: [Pharo-users] String concatenation vs. Stream

2019-10-19 Thread Norbert Hartl


> Am 18.10.2019 um 11:33 schrieb Kasper Østerbye :
> 
> On 18 October 2019 at 08.00.13, Richard O'Keefe (rao...@gmail.com 
> ) wrote:
>> When is it pointless to introduce a WriteStream and just use #, ? 
>> When #, would not be in a loop or recursion. 
>> Constructing error messages, class initialisation code, that sort of thing. 
>> 
>> If you find yourself doing a lot of concatenations, you are probably 
>> missing an abstraction. For example, building up XML by string 
>> concatenation would be very silly: you want to build a tree and have 
>> it write itself to a stream. 
> 
> Absolutely agree. Streams use logarithmic extension of buffer, concatenation 
> linear, but it is still amazing to see.
> 
> I am working on a pillar to `Text` generator. Here I found concatenation to 
> be simpler to handle as I can add bold, italics, indentation, etc. in a much 
> simpler way. To use a streaming method I would have to introduce both Canvas 
> and Aggregate brushes. Doable indeed, but much less concise.
> 
> 
I started to do exactly the same. Well I started to do a converter between 
pillar markup and text attributes, but I think you do the same. We probably 
should talk. Is you code anywhere public?

Norbert

> Best,
> 
> Kasper
> 



Re: [Pharo-users] Glorp + P3 + SQLite

2019-10-19 Thread Sven Van Caekenberghe
Hi Todd,

Both specify their dependency on Glorp almost the same way:

P3:

spec baseline: 'Glorp' with: [ spec repository: 
'github://pharo-rdbms/glorp:master/'].

Sqlite3:

spec baseline: 'Glorp' with: [ spec repository: 'github://pharo-rdbms/glorp' ].

What exactly is the conflict ?

Sven

> On 19 Oct 2019, at 10:26, Todd Blanchard via Pharo-users 
>  wrote:
> 
> 
> From: Todd Blanchard 
> Subject: Glorp + P3 + SQLite
> Date: 19 October 2019 at 10:26:10 GMT+2
> To: Any question about pharo is welcome 
> 
> 
> I loaded GLORP+P3 without issue.
> 
> Trying to load SQLite3 - it also wants to load GLORP which complains of 
> conflict.
> 
> For P3 I used:
> 
> Metacello new
> 
>
> baseline: 'P3'
> ;
>
> repository: 'github://svenvc/P3'
> ;
>
> load: 'glorp'.
> 
> 
> For SQLite:
> 
> Metacello new
>  
>   
> repository: 'github://PierceNg/glorp-sqlite3:pharo7'
> ;
>   
> baseline: 'GlorpSQLite'
> ;
>   load.
> 
> 
> but this fails with a conflict.  I suspect the conflict is it wants to load 
> in glorp again.
> 
> I would also like to have mysql driver at some point.
> 
> Any tips for getting these to play nice together would be great.
> 
> 




[Pharo-users] Pillar in-image rendering (was: String concatenation vs. Stream)

2019-10-19 Thread Kasper Østerbye
On 19 October 2019 at 10.51.53, Norbert Hartl (norb...@hartl.name) wrote:

Am 18.10.2019 um 11:33 schrieb Kasper Østerbye :

I am working on a pillar to `Text` generator. Here I found concatenation to
be simpler to handle as I can add bold, italics, indentation, etc. in a
much simpler way. To use a streaming method I would have to introduce both
Canvas and Aggregate brushes. Doable indeed, but much less concise.

I started to do exactly the same. Well I started to do a converter between
pillar markup and text attributes, but I think you do the same. We probably
should talk. Is you code anywhere public?

Norbert

I have the basic pillar rendering done: headers, lists, bold, emphasis,
images, links (including a “open browser on method” link).

My main *remaining issue is to do tables* somehow. Any hints on how to
render tables inside a text?

It is not on github atm - I need a pull request to come through
 there before I can be a
modular extension.

I’ll try to get it up on my own github sometime Monday.

I am currently working on a github markdown -> pillar tree (the internal
rep of pillar). I estimate I am a few days out from that one.

Best,

Kasper


Re: [Pharo-users] Glorp + P3 + SQLite

2019-10-19 Thread Pavel Krivanek
Btw. there exists an updated version of Glorp:
github://pavel-krivanek/glorp:8.3.1-23-baseline
But the compatibility of it with SQLite was never tested

-- Pavel

so 19. 10. 2019 v 10:27 odesílatel Todd Blanchard via Pharo-users <
pharo-users@lists.pharo.org> napsal:

> I loaded GLORP+P3 without issue.
>
> Trying to load SQLite3 - it also wants to load GLORP which complains of
> conflict.
>
> For P3 I used:
>
> Metacello new
>baseline: 'P3';
>repository: 'github://svenvc/P3';
>load: 'glorp'.
>
>
>
> For SQLite:
>
> Metacello new
>   repository: 'github://PierceNg/glorp-sqlite3:pharo7';
>   baseline: 'GlorpSQLite';
>   load.
>
>
> but this fails with a conflict.  I suspect the conflict is it wants to
> load in glorp again.
>
> I would also like to have mysql driver at some point.
>
> Any tips for getting these to play nice together would be great.
>


Re: [Pharo-users] Glorp + P3 + SQLite

2019-10-19 Thread Todd Blanchard via Pharo-users
--- Begin Message ---
I should probably mention that I do not really have a great handle on how 
package configurations work these days.

Coming back to Smalltalk after a long time away.

Pointer to an explanation of how package configurations work would be great.




--- End Message ---


[Pharo-users] [ANN] HeySql v1.1

2019-10-19 Thread Petter
Hi, I have just released HeySql, version 1.1 - a database orm for Postgresql.

- Support for migrations
- Generation of migration templates based on classes
- Models can now be subclassed
- Updated license to MIT
- Updated docs
- Some minor stuff

https://github.com/pegesund/heysql

Petter



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



Re: [Pharo-users] New to Pharo. "Could not coerce arguments" (Problem with character encoding?) + Learning resources?

2019-10-19 Thread Christopher Fuhrman
Hello,

On Sat, 19 Oct 2019 at 09:45, M O  wrote:

> I’m new to Pharo, and generally, in programming. I decided that my first
> programming language is going to be Pharo. However I have encountered some
> issues when I was exploring some examples. I don’t want them to bother me
> later, so I’d like them to be resolved as soon as possible.
>
> Some info:
>
> OS: Windows 8.1, language Polish, Pharo version: 7 stable 64, Pharo
> Launcher installed in C:\PharoLauncher, images and VMs located in
> C:\users\\Documents\...
>
> My Windows account (admin user) username contains non-ASCII character
> (“Ł”). I tested all cases below on account with only ASCII characters
> (“Administrator”) and they all work just fine. Therefore I strongly suspect
> the main source of issues is character encoding but I have no idea how to
> solve it or if it’s actual problem.
>

I think you found two things that will make it harder to use the Pharo
environment:

   - Windows 8.1 is not a recent version of an OS, and therefore much of
   the community who develop Pharo won't be able to guarantee support for it.
   I suspect it's the cause of the problems #1 and #2 (FFI), but it's hard to
   know as I don't have Windows 8.1. But as you have seen, some things are
   working, so some learning might be possible. A possible solution for you
   could be to run Linux in a VM on your Windows 8 machine and use Pharo for
   Linux. The Pharo Launcher and other things work in a similar way under
   Linux, although installing linux is a big distraction from your goal to
   learn Pharo and programming (which often happens in information
   technology).
   - The use of non-ascii characters in the path (in Windows) has been a
   source of bugs (e.g.,
   https://github.com/pharo-project/pharo-launcher/issues/333 but it's not
   only in Pharo). As you have already found out, you can use another account
   (maybe you can call it Pharo) without special characters.

*Second thing I’d like to ask is, what are best up to date learning
> resources for Pharo? I’m mainly concerned about tools. I know a bit about
> idea of  “real” OOP (from Alan Kay’s talks). Is Mooc
> (http://mooc.pharo.org/ ) and Pharo by Example 5
> enough for start? For Mooc, do I need to use Mooc image (It uses a bit
> outdated Pharo version) or can I use simply Pharo 7?*
>
>
The MOOC is a great place to start for the content (the videos and the PDFs
are helpful). Pharo By Example 5 is also good. There are small differences
in the GUI that sometimes trip up new students.

Do you know of exercism.io? There is a Pharo track there, and you can
always ask for help with those challenges using the #exercism channel of
the Pharo Discord server  https://discordapp.com/invite/QewZMZa


Re: [Pharo-users] Import a pharo 6 image in pharo 7

2019-10-19 Thread Oswall Verny Arguedas C.
Thanks Sean and Sven

I'm going to investigate Ston and Fuel to do it.
I also thought about passing the data to CouchDB (document database) and
then accessing from a clean Pharo 7 with Seaside and Bootstrap.
How do you think the status of the drivers for Pharo for CouchDB is
currently. I used it for an application for production. Also Mongo but he
changed his license.
Thanks in advance
Oswall

El vie., 18 de oct. de 2019 a la(s) 12:07, Sean P. DeNigris (
s...@clipperadams.com) escribió:

> Sven Van Caekenberghe-2 wrote
> > You could try to serialise/deserialise your data with... FUEL (binary).
>
> If you use Fuel, this may help:
> https://github.com/seandenigris/pharo/wiki/Cookbook#fuel-migration
>
>
>
> -
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>


Re: [Pharo-users] Import a pharo 6 image in pharo 7

2019-10-19 Thread Alejandro Infante
I wouldn’t recommend Mongo for this use because it doesn’t automagically 
resolve cycles, so you would have to do a lot of work in order to serialize the 
data. I agree with the previous suggestions and use Fuel or STON.

Cheers,
Alejandro

> On Oct 19, 2019, at 4:16 PM, Oswall Verny Arguedas C.  
> wrote:
> 
> Thanks Sean and Sven
> 
> I'm going to investigate Ston and Fuel to do it.
> I also thought about passing the data to CouchDB (document database) and then 
> accessing from a clean Pharo 7 with Seaside and Bootstrap.
> How do you think the status of the drivers for Pharo for CouchDB is 
> currently. I used it for an application for production. Also Mongo but he 
> changed his license.
> Thanks in advance
> Oswall
> 
> El vie., 18 de oct. de 2019 a la(s) 12:07, Sean P. DeNigris 
> (s...@clipperadams.com ) escribió:
> Sven Van Caekenberghe-2 wrote
> > You could try to serialise/deserialise your data with... FUEL (binary).
> 
> If you use Fuel, this may help:
> https://github.com/seandenigris/pharo/wiki/Cookbook#fuel-migration 
> 
> 
> 
> 
> -
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html 
> 
> 



Re: [Pharo-users] Import a pharo 6 image in pharo 7

2019-10-19 Thread Sean P. DeNigris
Alejandro Infante wrote
> I agree with the previous suggestions and use Fuel or STON.

+1. Either of these methods is pretty much a one-liner. The main hiccup with
Fuel is installing the same Fuel version in both the source and target
images.



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



Re: [Pharo-users] Glorp + P3 + SQLite

2019-10-19 Thread Pierce Ng
On Sat, Oct 19, 2019 at 01:26:10AM -0700, Todd Blanchard via Pharo-users wrote:
> I loaded GLORP+P3 without issue.
> Trying to load SQLite3 - it also wants to load GLORP which complains of 
> conflict.

Todd, to load SQLite3 only:

  Metacello new
repository: 'github://astares/Pharo-UDBC/src';
baseline: 'UDBC';
load: 'SQLite'

Pierce