Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-06 Thread Esteban Lorenzano
Hi,

> On 07 Jul 2016, at 01:54, Ben Coman  wrote:
> 
> On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane  
> wrote:
>> PS: for the first example, the alignment is not respected, the vec3
>> structure is starting at 9 but uffi is fetching it at 5
> 
> Hi Esteban,
> 
> Is it possible to get a feature or a recipe to output the sizeof or
> offset of fields in types as understood by the Image, and the same
> from a C side - that could be used as the standard first step in
> troubleshooting these kinds of issues ?

FFIExternalType class>>sizeOf: ?

but that does not works for complex type sizes (like FFIExternalArray).

I don’t know what the problem is here, because in my test (attached) it seems 
to be working fine. 
maybe problem is on how the Vec3 array is created, it should be something like 
this: 

Vec3 class>>iinitialize
self 
type: (FFIExternalType resolveType: 'double')   
size: 3
 
(is like that because FFITypeArray is more designed to be used creating 
anonymous types than concretes, but well… )

in any case, it seems to be working for me. 

Now, about the use… 

doing this: 

p := Position new. 
p v1 at: 1 put: 42.0.
p v1 at: 1. “will print 0.0"

why? because it works making a copy (maybe it should work passing a segment, as 
nested structs work, but this is how it works now).

What should work (at doesn’t) in this case is this: 

v := Vector3 new.
p := Position new. 
v at: 1 put: 42.0.
p v1: v.
p v1 at: 1. “will print 42.0"

it does not work because I made a mistake in field generation that I already 
fixed… so you will need to update UFFI (and regenerate field accessors) ;)

also… I will provide a fix to make first case work… just later because now I’m 
going to my french lessons :)

Esteban

ps: for future reference, a description of: install this, run that, is a lot 
easier to understand the problem (is a case of “show me the code!”) :P




Position.st
Description: Binary data

> 
> cheers -ben
> 
>> 
>> 
>> On 06/07/2016 17:55, Merwan Ouddane wrote:
>> 
>> Another test:
>> I replaced double by integer, for visibility...
>> typedef struct vec3 {
>> int data[3];
>> } vec3;
>> 
>> add a second vec3 to position:
>> 
>> typedef struct position {
>> int i;
>> vec3 vec;
>> vec3 vec2;
>> } position;
>> 
>> Now in pharo:
>> Position >> fieldsDesc
>> "self rebuildFieldAccessors"
>>^ #(
>>int i;
>>Vec3 vec;
>>Vec3 vec2;
>> )
>> 
>> The size returned for each stucture is 16 instead of 12 that because of the
>> "8 byte alignment"
>> 
>> Meaning that the "position" structure is corrupted.
>> 
>> With this function:
>> 
>> 
>> extern "C" void DLL_EXPORT fillStruct(position *position)
>> {
>>position -> i = 19;
>>(position -> vec).data[0] = 1;
>>(position -> vec).data[1] = 2;
>>(position -> vec).data[2] = 3;
>>(position -> vec2).data[0] = 1;
>>(position -> vec2).data[1] = 2;
>>(position -> vec2).data[2] = 3;
>> }
>> 
>> We will get:
>> position i == 19
>> position vec at: 1 == 1
>> position vec2 at: 1 == 2
>> 
>> 
>> On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado  wrote:
>>> 
>>> I compiled the DLL using Visual Studio 2015 Community Edition. Later I
>>> will check with mingw.
>>> 
>>> 2016-07-05 14:58 GMT+02:00 Merwan Ouddane :
 
 Using codeblocks, mine are:
 
 mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
 mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTest.def
 -Wl,--out-implib=bin\Release\libTest.a -Wl,--dll  obj\Release\main.o  -o
 bin\Release\Test.dll -s -m32
 
 
 On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane 
 wrote:
> 
> I am not moving from another plateform :/
> 
> I tried it in pharo 6 and I it didn't work either.
> 
> It could be my dll. What is your compilation line for the dll ?
> 
> Thanks you,
> Merwan
> 
> On Tue, Jul 5, 2016 at 2:14 PM, Ronie Salgado 
> wrote:
>> 
>> Hi Merwan,
>> 
>> I tested this on Pharo 6 and it is working in Windows. However, in 32
>> bits Window doubles have an 8 byte alignment, unlike Linux where they 
>> have a
>> 4 byte alignment.
>> 
>> Can you try doing the following before performing the ffi call in
>> Windows, if you are moving an image from Linux or OS X:
>> 
>> Vec3 rebuildFieldAccessors.
>> Position rebuildFieldAccessors.
>> 
>> Best regards,
>> Ronie
>> 
>> 2016-07-05 11:11 GMT+02:00 Merwan Ouddane :
>>> 
>>> Hi,
>>> 
>>> I have an issue whith nested structures.
>>> 
>>> I made some "dummy" structures in c:
>>> 
>>> 
>>> typedef struct vec3 {
>>> double data[3];
>>> } vec3;
>>> 
>>> typedef struct position {
>>> int i;
>>> vec3 vec;
>>> } position;
>>> 
>>> And a "dummy" function to fill it:
>>> void fillStruct(position *position)
>>> {
>>>position -> i = 19;
>>>(posi

Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Ben Coman
On Thu, Jul 7, 2016 at 7:45 AM, Stephan Eggermont  wrote:
> You are aware of SpecGenerator?
>
> Stephan
>

First time I've heard of it.  Could you describe it?
cheers -ben



Re: [Pharo-users] How do I debug: "There was an error while trying to install GitFileTree. Installation was cancelled." from Catalog Browser

2016-07-06 Thread Ben Coman
On Thu, Jul 7, 2016 at 2:33 AM, Dale Henrichs
 wrote:
>
>
> On 07/06/2016 06:37 AM, Cyril Ferlicot Delbecque wrote:
>>
>>
>> On 06/07/2016 15:28, Dale Henrichs wrote:
>>>
>>> Alistair,
>>>
>>> Well thank you very much ... Those two menu items are very well hidden:)
>>> Until you prompted me to look closely I

>>> never even noticed that little icon...

Sometimes I think similar to how shortcut keys are notified the
first few times a tool is opened, you could get a red outline quickly
cycle through all the buttons when a tool is first opened to avoid
this sort of domestic blindness - but I'm not sure if it would be too
distracting/annoying.

cheers -ben


>>>
>>> Is there a reason that those two menu items are not on the stack pane
>>> menu?
>>
>> Hi,
>>
>> I already opened an issue some month ago about it. As you, I think it
>> should be in the stack pane context menu.
>>
>> https://pharo.fogbugz.com/f/cases/17387/Missing-copy-stack-in-GTDebugger
>>
> Very Good ... at least now I know how to tell my users how to copy a stack
> trace, because they don't have a clue how to do it either :)
>
> Dale
>



Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-06 Thread Ben Coman
On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane  wrote:
> PS: for the first example, the alignment is not respected, the vec3
> structure is starting at 9 but uffi is fetching it at 5

Hi Esteban,

Is it possible to get a feature or a recipe to output the sizeof or
offset of fields in types as understood by the Image, and the same
from a C side - that could be used as the standard first step in
troubleshooting these kinds of issues ?

cheers -ben

>
>
> On 06/07/2016 17:55, Merwan Ouddane wrote:
>
> Another test:
> I replaced double by integer, for visibility...
> typedef struct vec3 {
>  int data[3];
> } vec3;
>
> add a second vec3 to position:
>
> typedef struct position {
>  int i;
>  vec3 vec;
>  vec3 vec2;
> } position;
>
> Now in pharo:
> Position >> fieldsDesc
> "self rebuildFieldAccessors"
> ^ #(
> int i;
> Vec3 vec;
> Vec3 vec2;
> )
>
> The size returned for each stucture is 16 instead of 12 that because of the
> "8 byte alignment"
>
> Meaning that the "position" structure is corrupted.
>
> With this function:
>
>
> extern "C" void DLL_EXPORT fillStruct(position *position)
> {
> position -> i = 19;
> (position -> vec).data[0] = 1;
> (position -> vec).data[1] = 2;
> (position -> vec).data[2] = 3;
> (position -> vec2).data[0] = 1;
> (position -> vec2).data[1] = 2;
> (position -> vec2).data[2] = 3;
> }
>
> We will get:
> position i == 19
> position vec at: 1 == 1
> position vec2 at: 1 == 2
>
>
> On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado  wrote:
>>
>> I compiled the DLL using Visual Studio 2015 Community Edition. Later I
>> will check with mingw.
>>
>> 2016-07-05 14:58 GMT+02:00 Merwan Ouddane :
>>>
>>> Using codeblocks, mine are:
>>>
>>> mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
>>> mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTest.def
>>> -Wl,--out-implib=bin\Release\libTest.a -Wl,--dll  obj\Release\main.o  -o
>>> bin\Release\Test.dll -s -m32
>>>
>>>
>>> On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane 
>>> wrote:

 I am not moving from another plateform :/

 I tried it in pharo 6 and I it didn't work either.

 It could be my dll. What is your compilation line for the dll ?

 Thanks you,
 Merwan

 On Tue, Jul 5, 2016 at 2:14 PM, Ronie Salgado 
 wrote:
>
> Hi Merwan,
>
> I tested this on Pharo 6 and it is working in Windows. However, in 32
> bits Window doubles have an 8 byte alignment, unlike Linux where they 
> have a
> 4 byte alignment.
>
> Can you try doing the following before performing the ffi call in
> Windows, if you are moving an image from Linux or OS X:
>
> Vec3 rebuildFieldAccessors.
> Position rebuildFieldAccessors.
>
> Best regards,
> Ronie
>
> 2016-07-05 11:11 GMT+02:00 Merwan Ouddane :
>>
>> Hi,
>>
>> I have an issue whith nested structures.
>>
>> I made some "dummy" structures in c:
>>
>>
>> typedef struct vec3 {
>>  double data[3];
>> } vec3;
>>
>> typedef struct position {
>>  int i;
>>  vec3 vec;
>> } position;
>>
>> And a "dummy" function to fill it:
>> void fillStruct(position *position)
>> {
>> position -> i = 19;
>> (position -> vec).data[0] = 1;
>> (position -> vec).data[1] = 2;
>> (position -> vec).data[2] = 3;
>> }
>>
>> But I can't make the nested structure work.
>> The "i" is correctly set to 19 but I have values that doesn't make any
>> sense in the vec3 structure.
>>
>> In Pharo
>> I declared the Double3 type for the array inside Vec3:
>> Double3 := FFITypeArray ofType: 'double' size: 3
>>
>> Vec3>>fieldsDesc
>> ^ #(
>> Double3 v;
>> )
>>
>> And the position:
>> Position>>fieldsDesc
>> ^ #(
>> int i;
>> Vec3 vec;
>> )
>>
>> The ffi call:
>> ^ self ffiCall: #(void fillStruct(Position *position)) module:
>> 'Test.dll'
>>
>> Sorry for the long / messy mail :p
>>
>> Any clues ?
>>
>> Cheers,
>> Merwan
>
>

>>>
>>
>
>



Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Stephan Eggermont
You are aware of SpecGenerator?

Stephan



Re: [Pharo-users] Recovering PNG/JPG images that were automatically serialized as FUEL when storing into external database

2016-07-06 Thread Offray Vladimir Luna Cárdenas

Bernardo,

To serialize objects in a SQLite data base you do:



| db |
db := UDBCSQLite3Connection on: self database
db open.
db execute:
'CREATE TABLE IF NOT EXISTS interaction_profiles (
screenName text PRIMARY KEY,
avatar blob,
tweets integer,
retweets integer
);'.
self interactionProfiles do: [ :ip |
db
execute: 'INSERT INTO interaction_profiles values (?, ?, ?, 
?);'

with: { ip screenName . ip avatar . ip tweets . ip retweets}
].
db close.



To materialize data you can do:



| query answer |
query := 'SELECT * FROM interaction_profiles;'.
answer := (self database open execute: query) rows collect: [ :each 
| each data ].

self database isOpen ifTrue: [ self database close ].
answer do: [ :each |
self interactionProfiles add:
(TwitterInteractionProfile new
screenName: (each at: 'screenName');
avatar: (FLMaterializer materializeFromByteArray: (each 
at: 'avatar'));

tweets: (each at: 'tweets');
retweets: (each at: 'retweets')
)
]



where "self database" gives your sqlite database location. You can find 
especific details on how I'm using this in the Dataviz package:


http://smalltalkhub.com/#!/~Offray/Dataviz

Cheers,

Offray
On 06/07/16 14:18, Bernardo Ezequiel Contreras wrote:

Offray,
   could you post a snippet of the code to serialize and materialize 
an object and insert it into the sqlite database, please?

  just what's needed in order to get the idea

thanks;



On Wed, Jul 6, 2016 at 3:00 PM, Offray Vladimir Luna Cárdenas 
mailto:offray.l...@mutabit.com>> wrote:


Hi Pierce,

I was my fault. I was not understanding properly the way of
materialize back the png/jpeg images. With Max's help in the Slack
chat channel it was clearer. Now is working properly and I have
updated the database query messages accordingly.

This combination of Fuel + SQLite seems very promising. For the
moment I'm using mostly Fuel with the same efficiency of SQLite
for external storage: 27 Mb both, the sqlite file and the fuel
one, and almost the same reading time and without the impedance of
object object-relational mapping. I imagine that the more we start
to query the data, the more we're going to rely on SQLite bindings.

Cheers,

Offray


On 04/07/16 22:51, Pierce Ng wrote:

On Sat, Jul 02, 2016 at 10:01:14PM -0500, Offray Vladimir Luna Cárdenas 
wrote:

I can read the blobs from SQLite. The problem is that they're stored
as FUEL inside SQLite and I don't know how to read them back to
recover the png/jpeg image that was serialized that way.

UDBCSQLite uses Fuel to serialize/materialize objects that aren't integers,
real numbers and strings. Sounds like you've hit a bug, whereby your png/jpg
files are serialized but aren't being materialized when read back, so you're
getting back raw byte arrays.

Can you provide simple schema and code fragment to reproduce the problem
please.

Pierce







--
Bernardo E.C.

Sent from a cheap desktop computer in South America.




Re: [Pharo-users] Recovering PNG/JPG images that were automatically serialized as FUEL when storing into external database

2016-07-06 Thread Bernardo Ezequiel Contreras
Offray,
   could you post a snippet of the code to serialize and materialize an
object and insert it into the sqlite database, please?
  just what's needed in order to get the idea

thanks;



On Wed, Jul 6, 2016 at 3:00 PM, Offray Vladimir Luna Cárdenas <
offray.l...@mutabit.com> wrote:

> Hi Pierce,
>
> I was my fault. I was not understanding properly the way of materialize
> back the png/jpeg images. With Max's help in the Slack chat channel it was
> clearer. Now is working properly and I have updated the database query
> messages accordingly.
>
> This combination of Fuel + SQLite seems very promising. For the moment I'm
> using mostly Fuel with the same efficiency of SQLite for external storage:
> 27 Mb both, the sqlite file and the fuel one, and almost the same reading
> time and without the impedance of object object-relational mapping. I
> imagine that the more we start to query the data, the more we're going to
> rely on SQLite bindings.
>
> Cheers,
>
> Offray
>
> On 04/07/16 22:51, Pierce Ng wrote:
>
> On Sat, Jul 02, 2016 at 10:01:14PM -0500, Offray Vladimir Luna Cárdenas wrote:
>
> I can read the blobs from SQLite. The problem is that they're stored
> as FUEL inside SQLite and I don't know how to read them back to
> recover the png/jpeg image that was serialized that way.
>
> UDBCSQLite uses Fuel to serialize/materialize objects that aren't integers,
> real numbers and strings. Sounds like you've hit a bug, whereby your png/jpg
> files are serialized but aren't being materialized when read back, so you're
> getting back raw byte arrays.
>
> Can you provide simple schema and code fragment to reproduce the problem
> please.
>
> Pierce
>
>
>
>
>


-- 
Bernardo E.C.

Sent from a cheap desktop computer in South America.


Re: [Pharo-users] How do I debug: "There was an error while trying to install GitFileTree. Installation was cancelled." from Catalog Browser

2016-07-06 Thread Dale Henrichs



On 07/06/2016 06:37 AM, Cyril Ferlicot Delbecque wrote:


On 06/07/2016 15:28, Dale Henrichs wrote:

Alistair,

Well thank you very much ... Those two menu items are very well hidden:)
Until you prompted me to look closely I never even noticed that little
icon...

Is there a reason that those two menu items are not on the stack pane menu?

Hi,

I already opened an issue some month ago about it. As you, I think it
should be in the stack pane context menu.

https://pharo.fogbugz.com/f/cases/17387/Missing-copy-stack-in-GTDebugger

Very Good ... at least now I know how to tell my users how to copy a 
stack trace, because they don't have a clue how to do it either :)


Dale



Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Brad Selfridge
Thank you all for your responses. I have to admit that I was really confused. 

I will start the process with Spec. 



-
Brad Selfridge
--
View this message in context: 
http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178p4905239.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Dimitris Chloupis
The only GUI API inside the standard Pharo image is Morphic.

Everything else are just Helper APIs , aka APIs that make easier to use
Morphic.

They basically sit on top of Morphic making use of its functionality and
abilities.

Actually there are more than the ones you mentioned. Bloc will be the
future replacement for Morphic but even when Bloc replaces Morphic will not
radical change things because it is compatible with Morphic.

In short Morphic currently is unavoidable.

However there are APIs to make creating GUIs easier with Morphic without
necessarily requiring from you to know how to use Morphic. Spec is such
example as is Brick as well.

Glamour falls under the category of a specialised helpers because it mostly
meant to be used for the creation of browsers not for general purpose APIs.

However that does not mean Morphic is not "high level" , it actually comes
with a lot of ready made widgets to make your life easier. It does however
have a lot of nasty parts too and this is why you see so many APIs around
you that confuse you.

In reality each one of them solves a slightly diffirent problem and each
one of them have a different style. So see it as more alternative solutions
to choose from which is good.

If you want to do something demanding GUI wise, you will be learning
Morphic anyway because its the engine that drives all this APIs currently,
in the future those APIs may work on top of Bloc , but since Bloc wants to
be compatible with Morphic this is good news for you because you can carry
your knowledge about Morphic to Bloc.

Spec is good if you want to quickly make GUIs without heavy customization.

You could also use multiple of them at the same time depending on the
widgets you plan to design and do the difficult parts in pure Morphic, any
API you use you always have access to the Morphic widgets it uses called
"Morphs" anyway.

Because Spec is the one with the best documentation, I advise to start with
Spec and depending on your needs you can start to worry about Morphic later
on.

Generally speaking you dont need to panic, people around here are very
happy to answer any question you may have, so even without documentation
its very unlikely that you will be left alone to figure things out by
yourself.

So start experimenting and ask a ton of questions.

On Wed, Jul 6, 2016 at 5:26 PM Brad Selfridge  wrote:

> Ok! I'm really confused. I'm wanting to write new GUI and I have no idea
> which framework to use. There is very little documentation on any of these
> and I don't see a clear cut statement of direction as to where the Pharo
> community is heading.
>
> Can someone please advise?
>
> Thanks.
>
>
>
> -
> Brad Selfridge
> --
> View this message in context:
> http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Recovering PNG/JPG images that were automatically serialized as FUEL when storing into external database

2016-07-06 Thread Offray Vladimir Luna Cárdenas

Hi Pierce,

I was my fault. I was not understanding properly the way of materialize 
back the png/jpeg images. With Max's help in the Slack chat channel it 
was clearer. Now is working properly and I have updated the database 
query messages accordingly.


This combination of Fuel + SQLite seems very promising. For the moment 
I'm using mostly Fuel with the same efficiency of SQLite for external 
storage: 27 Mb both, the sqlite file and the fuel one, and almost the 
same reading time and without the impedance of object object-relational 
mapping. I imagine that the more we start to query the data, the more 
we're going to rely on SQLite bindings.


Cheers,

Offray


On 04/07/16 22:51, Pierce Ng wrote:

On Sat, Jul 02, 2016 at 10:01:14PM -0500, Offray Vladimir Luna Cárdenas wrote:

I can read the blobs from SQLite. The problem is that they're stored
as FUEL inside SQLite and I don't know how to read them back to
recover the png/jpeg image that was serialized that way.

UDBCSQLite uses Fuel to serialize/materialize objects that aren't integers,
real numbers and strings. Sounds like you've hit a bug, whereby your png/jpg
files are serialized but aren't being materialized when read back, so you're
getting back raw byte arrays.

Can you provide simple schema and code fragment to reproduce the problem
please.

Pierce






Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-06 Thread Merwan Ouddane
PS: for the first example, the alignment is not respected, the vec3 
structure is starting at 9 but uffi is fetching it at 5


On 06/07/2016 17:55, Merwan Ouddane wrote:

Another test:
I replaced double by integer, for visibility...
typedef struct vec3 {
 int data[3];
} vec3;

add a second vec3 to position:

typedef struct position {
 int i;
 vec3 vec;
 vec3 vec2;
} position;

Now in pharo:
Position >> fieldsDesc
"self rebuildFieldAccessors"
^ #(
int i;
Vec3 vec;
Vec3 vec2;
)

The size returned for each stucture is 16 instead of 12 that because 
of the "8 byte alignment"


Meaning that the "position" structure is corrupted.

With this function:


extern "C" void DLL_EXPORT fillStruct(position *position)
{
position -> i = 19;
(position -> vec).data[0] = 1;
(position -> vec).data[1] = 2;
(position -> vec).data[2] = 3;
(position -> vec2).data[0] = 1;
(position -> vec2).data[1] = 2;
(position -> vec2).data[2] = 3;
}

We will get:
position i == 19
position vec at: 1 == 1
position vec2 at: 1 == 2


On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado > wrote:


I compiled the DLL using Visual Studio 2015 Community Edition.
Later I will check with mingw.

2016-07-05 14:58 GMT+02:00 Merwan Ouddane mailto:merwanoudd...@gmail.com>>:

Using codeblocks, mine are:

mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
mingw32-g++.exe -shared
-Wl,--output-def=bin\Release\libTest.def
-Wl,--out-implib=bin\Release\libTest.a -Wl,--dll 
obj\Release\main.o  -o bin\Release\Test.dll -s -m32



On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane
mailto:merwanoudd...@gmail.com>> wrote:

I am not moving from another plateform :/

I tried it in pharo 6 and I it didn't work either.

It could be my dll. What is your compilation line for the
dll ?

Thanks you,
Merwan

On Tue, Jul 5, 2016 at 2:14 PM, Ronie Salgado
mailto:ronies...@gmail.com>> wrote:

Hi Merwan,

I tested this on Pharo 6 and it is working in Windows.
However, in 32 bits Window doubles have an 8 byte
alignment, unlike Linux where they have a 4 byte
alignment.

Can you try doing the following before performing the
ffi call in Windows, if you are moving an image from
Linux or OS X:

Vec3 rebuildFieldAccessors.
Position rebuildFieldAccessors.

Best regards,
Ronie

2016-07-05 11:11 GMT+02:00 Merwan Ouddane
mailto:merwanoudd...@gmail.com>>:

Hi,

I have an issue whith nested structures.

I made some "dummy" structures in c:


typedef struct vec3 {
 double data[3];
} vec3;

typedef struct position {
 int i;
 vec3 vec;
} position;

And a "dummy" function to fill it:
void fillStruct(position *position)
{
position -> i = 19;
(position -> vec).data[0] = 1;
(position -> vec).data[1] = 2;
(position -> vec).data[2] = 3;
}

But I can't make the nested structure work.
The "i" is correctly set to 19 but I have values
that doesn't make any sense in the vec3 structure.

In Pharo
I declared the Double3 type for the array inside Vec3:
Double3 := FFITypeArray ofType: 'double' size: 3

Vec3>>fieldsDesc
^ #(
Double3 v;
)

And the position:
Position>>fieldsDesc
^ #(
int i;
Vec3 vec;
)

The ffi call:
^ self ffiCall: #(void fillStruct(Position
*position)) module: 'Test.dll'

Sorry for the long / messy mail :p

Any clues ?

Cheers,
Merwan










Re: [Pharo-users] Pharo Mooc

2016-07-06 Thread Offray Vladimir Luna Cárdenas

Hi,

Nice! I suggest to link the resources of the second link into the first one.

We're going to make our usual Data Week at the end of July and we're 
going to start a Data Roda this week (think in a coding dojo, but with 
data visualization and capoeira :-P) and we' going to link these MOOOC 
resources with our usual practices. I'm now just finishing my MOOC's 
third week and the ReDo exercise for the DSL on D&D dice has been really 
clarifying. Having this MOOC resources linked to permanent community 
practices and places (local and global, like this list itself) will be 
one of the most important results of it.


Cheers,

Offray

On 06/07/16 09:16, stepharo wrote:


http://mooc.pharo.org :)


soon the videos will be available

http://rmod-pharo-mooc.lille.inria.fr



Le 6/7/16 à 14:00, Arie van Wingerden a écrit :

​Hi,

on the main Pharo page I see Pharo Mooc mentioned. Obviously I am too 
late to join.


Will there be a similar course in the (near) future?

Are there other (video) courses available? I checked Udemy and 
O'Reilly, but alas, Smalltalk isn't that popular anymore nowadays...


Thx,
   Arie






Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Offray Vladimir Luna Cárdenas

Hi,

Just to share my experience as a newbie with Pharo/Smalltalk and how I 
deal with the diversity of graphical toolkits, which in my case was 
pretty problem related.


I want to create some kind of "app"[1][2] that used trees as structuring 
metaphor for interactive documents. The easiest way to program it was 
using Glamour and this gave me a quick functional prototype, but when I 
started to stretch the functionality even more Glamour, showed it 
limitations and in that case, spec and particularly Johan's spec-glamour 
bridge, has been really empowering for more general interfaces, without 
loosing the interactivity part given by GT playgrounds. Still there is a 
lot of work to be done and after finishing the Pharo MOOC I will be 
retaking my project again, but I would tell that spec is a solid toolkit 
and your choice doesn't need to be binary. You can start with one 
toolkit, like in my case and combine with other or refactor the code to 
migrate functionality. If you have enough time (for example don't have 
any rush for a quick & dirty prototype), I would advice to start with 
spec with the tranquility that it will be there in the time to come, and 
that the bindings with Glamour, Bloc, Brick and Morphic, will let you 
extent the interface when the need arises.



[1] http://smalltalkhub.com/#!/~Offray/Grafoscopio
[2] http://mutabit.com/grafoscopio/index.en.html

Cheers,

Offray

On 06/07/16 11:11, Johan Fabry wrote:

Hi Brad,

to clarify the situation: Spec is the standard UI framework for Pharo, and the 
plan is that it will stay this way. Morphic/Brick/Block/… are (or will be) a 
layer underneath that, which ideally you would not need care about.

The documentation of Spec is not up to date right now, and hard to find. But 
the good news is that I am working on it this very week (and next week). Please 
hang tight for a few more days, I will publicly release a work-in-progress 
documentation soon. For now, you can have a look at the youtube video of my 
presentation at the Pharo days 2 years ago: 
https://www.youtube.com/watch?v=OL23s9ZUIR0 it should already point you in the 
right direction.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
Chile


On Jul 6, 2016, at 11:14, Brad Selfridge  wrote:

So, once Brick/Bloc become public, will it become the default UI framework?
What happens to Spec and Glamour when/if that happens?



-
Brad Selfridge
--
View this message in context: 
http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178p4905207.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.










Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Johan Fabry
Hi Brad,

to clarify the situation: Spec is the standard UI framework for Pharo, and the 
plan is that it will stay this way. Morphic/Brick/Block/… are (or will be) a 
layer underneath that, which ideally you would not need care about. 

The documentation of Spec is not up to date right now, and hard to find. But 
the good news is that I am working on it this very week (and next week). Please 
hang tight for a few more days, I will publicly release a work-in-progress 
documentation soon. For now, you can have a look at the youtube video of my 
presentation at the Pharo days 2 years ago: 
https://www.youtube.com/watch?v=OL23s9ZUIR0 it should already point you in the 
right direction.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
Chile

> On Jul 6, 2016, at 11:14, Brad Selfridge  wrote:
> 
> So, once Brick/Bloc become public, will it become the default UI framework?
> What happens to Spec and Glamour when/if that happens? 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178p4905207.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] a bug in Spec that I wont fix

2016-07-06 Thread Ben Coman
On Wed, Jul 6, 2016 at 11:42 PM, Hartmut Krasemann
 wrote:
> Hi to whom it concerns.
>
> Working with Spec (Pharo 4.0) I needed to dynamically update the ButtonModel
> BalloonHelp.
> Since it did not work, I searched and found that ButtonModel initializes
> helpHolder again thus removing the changeBlock set in AbstractWidgetModel.
>
> The statement <  helpHolder := nil asValueHolder.  > in
> ButtonModel>>initialize has to be removed.
>
> Since I do not yet work with Pharo 5 I propose that somebody working with
> Pharo 5 would fix this.

Hi Hartmut,
Thanks for your report.  Could you add this to our issue tracker
https://pharo.fogbugz.com/default.asp?W41

and hopefully could you include some code in the form of a test that
fails before your change and succeeds afterwards (like checking
whether the value of helpHolder is nil or not)

cheers -ben



Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Brad Selfridge
So, once Brick/Bloc become public, will it become the default UI framework?
What happens to Spec and Glamour when/if that happens? 



-
Brad Selfridge
--
View this message in context: 
http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178p4905207.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-06 Thread Merwan Ouddane
Another test:
I replaced double by integer, for visibility...
typedef struct vec3 {
 int data[3];
} vec3;

add a second vec3 to position:

typedef struct position {
 int i;
 vec3 vec;
 vec3 vec2;
} position;

Now in pharo:
Position >> fieldsDesc
"self rebuildFieldAccessors"
^ #(
int i;
Vec3 vec;
Vec3 vec2;
)

The size returned for each stucture is 16 instead of 12 that because of the
"8 byte alignment"

Meaning that the "position" structure is corrupted.

With this function:


extern "C" void DLL_EXPORT fillStruct(position *position)
{
position -> i = 19;
(position -> vec).data[0] = 1;
(position -> vec).data[1] = 2;
(position -> vec).data[2] = 3;
(position -> vec2).data[0] = 1;
(position -> vec2).data[1] = 2;
(position -> vec2).data[2] = 3;
}

We will get:
position i == 19
position vec at: 1 == 1
position vec2 at: 1 == 2


On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado  wrote:

> I compiled the DLL using Visual Studio 2015 Community Edition. Later I
> will check with mingw.
>
> 2016-07-05 14:58 GMT+02:00 Merwan Ouddane :
>
>> Using codeblocks, mine are:
>>
>> mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
>> mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTest.def
>> -Wl,--out-implib=bin\Release\libTest.a -Wl,--dll  obj\Release\main.o  -o
>> bin\Release\Test.dll -s -m32
>>
>>
>> On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane 
>> wrote:
>>
>>> I am not moving from another plateform :/
>>>
>>> I tried it in pharo 6 and I it didn't work either.
>>>
>>> It could be my dll. What is your compilation line for the dll ?
>>>
>>> Thanks you,
>>> Merwan
>>>
>>> On Tue, Jul 5, 2016 at 2:14 PM, Ronie Salgado 
>>> wrote:
>>>
 Hi Merwan,

 I tested this on Pharo 6 and it is working in Windows. However, in 32
 bits Window doubles have an 8 byte alignment, unlike Linux where they have
 a 4 byte alignment.

 Can you try doing the following before performing the ffi call in
 Windows, if you are moving an image from Linux or OS X:

 Vec3 rebuildFieldAccessors.
 Position rebuildFieldAccessors.

 Best regards,
 Ronie

 2016-07-05 11:11 GMT+02:00 Merwan Ouddane :

> Hi,
>
> I have an issue whith nested structures.
>
> I made some "dummy" structures in c:
>
>
> typedef struct vec3 {
>  double data[3];
> } vec3;
>
> typedef struct position {
>  int i;
>  vec3 vec;
> } position;
> And a "dummy" function to fill it:
> void fillStruct(position *position)
> {
> position -> i = 19;
> (position -> vec).data[0] = 1;
> (position -> vec).data[1] = 2;
> (position -> vec).data[2] = 3;
> }
>
> But I can't make the nested structure work.
> The "i" is correctly set to 19 but I have values that doesn't make any
> sense in the vec3 structure.
>
> In Pharo
> I declared the Double3 type for the array inside Vec3:
> Double3 := FFITypeArray ofType: 'double' size: 3
>
> Vec3>>fieldsDesc
> ^ #(
> Double3 v;
> )
>
> And the position:
> Position>>fieldsDesc
> ^ #(
> int i;
> Vec3 vec;
> )
>
> The ffi call:
> ^ self ffiCall: #(void fillStruct(Position *position)) module:
> 'Test.dll'
>
> Sorry for the long / messy mail :p
>
> Any clues ?
>
> Cheers,
> Merwan
>


>>>
>>
>


[Pharo-users] a bug in Spec that I wont fix

2016-07-06 Thread Hartmut Krasemann

Hi to whom it concerns.

Working with Spec (Pharo 4.0) I needed to dynamically update the 
ButtonModel BalloonHelp.
Since it did not work, I searched and found that ButtonModel initializes 
helpHolder again thus removing the changeBlock set in AbstractWidgetModel.


The statement <  helpHolder := nil asValueHolder.  > in 
ButtonModel>>initialize has to be removed.


Since I do not yet work with Pharo 5 I propose that somebody working 
with Pharo 5 would fix this.


Thanks
--
signatur

Hartmut Krasemann
Königsberger Str. 41 c
D 22869 Schenefeld
Tel. 040.8307097
Mobil 0171.6451283
krasem...@acm.org



Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Cyril Ferlicot Delbecque


On 06/07/2016 15:43, Brad Selfridge wrote:
> Ok! I'm really confused. I'm wanting to write new GUI and I have no idea
> which framework to use. There is very little documentation on any of these
> and I don't see a clear cut statement of direction as to where the Pharo
> community is heading. 
> 
> Can someone please advise? 
> 
> Thanks. 
> 
> 

Hi,

From what I know:

Morphic is the low level layer behind GUI in Pharo. Since this is low
level there is usually some framework on top for users to use.

Spec is a framework to build GUI.

Brick is a work in progress. There is a project call Bloc that will
replace Morphic in the future. Brick is a layer on top of Bloc to build
widgets on top of Bloc.

Glamour is good to use if you work a lot with some flux of data. Each
elements of a Glamour panel will be feed by data from another element.
It is good to use when you have, for example, elements to update on a
list selection or thing like that.

I hope this will help you to make your choice.

So Morphic will vanish in few years. Bloc and brick will replace it. I
think there is a Moose book with a Glamour chapter. And the community is
writing a book on spec I think.

> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 

-- 
Cyril Ferlicot

http://www.synectique.eu

165 Avenue Bretagne
Lille 59000 France



signature.asc
Description: OpenPGP digital signature


[Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Brad Selfridge
Ok! I'm really confused. I'm wanting to write new GUI and I have no idea
which framework to use. There is very little documentation on any of these
and I don't see a clear cut statement of direction as to where the Pharo
community is heading. 

Can someone please advise? 

Thanks. 



-
Brad Selfridge
--
View this message in context: 
http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Pharo Mooc

2016-07-06 Thread stepharo

http://mooc.pharo.org :)


soon the videos will be available

http://rmod-pharo-mooc.lille.inria.fr



Le 6/7/16 à 14:00, Arie van Wingerden a écrit :

​Hi,

on the main Pharo page I see Pharo Mooc mentioned. Obviously I am too 
late to join.


Will there be a similar course in the (near) future?

Are there other (video) courses available? I checked Udemy and 
O'Reilly, but alas, Smalltalk isn't that popular anymore nowadays...


Thx,
   Arie




Re: [Pharo-users] How do I debug: "There was an error while trying to install GitFileTree. Installation was cancelled." from Catalog Browser

2016-07-06 Thread Cyril Ferlicot Delbecque


On 06/07/2016 15:28, Dale Henrichs wrote:
> Alistair,
> 
> Well thank you very much ... Those two menu items are very well hidden:)
> Until you prompted me to look closely I never even noticed that little
> icon...
> 
> Is there a reason that those two menu items are not on the stack pane menu?

Hi,

I already opened an issue some month ago about it. As you, I think it
should be in the stack pane context menu.

https://pharo.fogbugz.com/f/cases/17387/Missing-copy-stack-in-GTDebugger

> 
> Now that I used the copystack menu item, I see what makes the stacks
> unreadable ... the printString used for this stack frame does a very
> good job of hiding the actual selector:
> 
> [ 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...
> 
> especially for very large stacks ... I expect the "copy to stack" menu
> to provide the style of output that I see in the debugger stack pane and
> in this case:
> 
> GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate:
> in Block: [ textMorph textArea editor highlightEvaluateAndDo...etc...
> 
> is much more readable.
> 
> Dale
> 
> 
> 

-- 
Cyril Ferlicot

http://www.synectique.eu

165 Avenue Bretagne
Lille 59000 France



signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] How do I debug: "There was an error while trying to install GitFileTree. Installation was cancelled." from Catalog Browser

2016-07-06 Thread Dale Henrichs

Alistair,

Well thank you very much ... Those two menu items are very well hidden:) 
Until you prompted me to look closely I never even noticed that little 
icon...


Is there a reason that those two menu items are not on the stack pane menu?

Now that I used the copystack menu item, I see what makes the stacks 
unreadable ... the printString used for this stack frame does a very 
good job of hiding the actual selector:


[ 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...


especially for very large stacks ... I expect the "copy to stack" menu 
to provide the style of output that I see in the debugger stack pane and 
in this case:


GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate: 
in Block: [ textMorph textArea editor highlightEvaluateAndDo...etc...


is much more readable.

Dale

On 7/6/16 1:16 AM, Alistair Grant wrote:

Hi Dale,

On Tue, Jul 05, 2016 at 11:53:19AM -0700, Dale Henrichs wrote:

While we're on the subject, when one does get a debugger How is a beginner
supposed to share the error information with the folks on this list?

I have a debugger open on the stack after executing:

   Metacello new
 configuration: 'GitFileTree';
 version: #stable;
 repository: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo50/main';
 load

which was my guess for the load expression and I'm getting a walkback that I
assume is the same as that produced by the Catalog Browser, but there is
apparently no way of really knowing ...

Anyway, I've got a very nice debugger with a nice stack and nice error
message in the title bar, but I don't see any way of actually being able to
share a simple stack trace and error message with the mailing list other
than to produce a screenshot which will not show the whole stack ..

I happen to know that the PharoDebug.log contains a stack trace (and I've
attached it to this email), but I don't know how a beginner would know to do
this, either.

Of course, I think that the stack dump in the PharoDebug.log is unreadable,
but at least it is a sharable stack.

Finally to summarize, the actual message error is:  'invalid version number:
normal version component must be integer v0' and this error is very likely
consequence of a proposed bugfix for a Metacello bug that was reported a
month or so ago [1], as I'm using a version of Metacello with the proposed
bugfix present ... so at the end of the day, this is a problem with my code
...

But I do think the two questions that came from this exercise are still
relevant:

   How does a beginner report/debug a Catalog Browser error?
   How does a beginner produce a sharable stack trace?

Dale

I can help with producing a shareable stack trace...

The debugger has a set of buttons near the top: Proceed, Restart, Into,
Over, Through.  Just to the right of Through is a drop down list with
Fuel out Stack and Copy to clipboard.  You can use either of those to
share the stack.

HTH,
Alistair







Re: [Pharo-users] Pharo Mooc

2016-07-06 Thread Arie van Wingerden
Hi all,

thank you for the answers!
Nice to see the stuff is available for free.
A am also amazed that so many books are available for free.

Thx,
   Arie

2016-07-06 15:11 GMT+02:00 Peter Uhnák :

> > Smalltalk isn't that popular anymore nowadays...
>
> anymore => yet :)
>
> But the resources should be available
> http://forum.world.st/Pharo-Mooc-after-the-19th-of-june-tp4900406p4900498.html
>
> We need someone to find a place to host all this iirc.
>
> On Wed, Jul 6, 2016 at 2:57 PM, Cyril Ferlicot Delbecque <
> cyril.ferli...@gmail.com> wrote:
>
>> On 06/07/2016 14:00, Arie van Wingerden wrote:
>> > ​Hi,
>> >
>> > on the main Pharo page I see Pharo Mooc mentioned. Obviously I am too
>> > late to join.
>> >
>> > Will there be a similar course in the (near) future?
>> >
>> > Are there other (video) courses available? I checked Udemy and O'Reilly,
>> > but alas, Smalltalk isn't that popular anymore nowadays...
>> >
>> > Thx,
>> >Arie
>>
>> Hi,
>>
>> The Pharo Mooc will end the 16 of July. After this date, if I am not
>> wrong, the resources will be available for free. (Video, slides,
>> exercises…)
>>
>> --
>> Cyril Ferlicot
>>
>> http://www.synectique.eu
>>
>> 165 Avenue Bretagne
>> Lille 59000 France
>>
>>
>


Re: [Pharo-users] Pharo Mooc

2016-07-06 Thread Peter Uhnák
> Smalltalk isn't that popular anymore nowadays...

anymore => yet :)

But the resources should be available
http://forum.world.st/Pharo-Mooc-after-the-19th-of-june-tp4900406p4900498.html

We need someone to find a place to host all this iirc.

On Wed, Jul 6, 2016 at 2:57 PM, Cyril Ferlicot Delbecque <
cyril.ferli...@gmail.com> wrote:

> On 06/07/2016 14:00, Arie van Wingerden wrote:
> > ​Hi,
> >
> > on the main Pharo page I see Pharo Mooc mentioned. Obviously I am too
> > late to join.
> >
> > Will there be a similar course in the (near) future?
> >
> > Are there other (video) courses available? I checked Udemy and O'Reilly,
> > but alas, Smalltalk isn't that popular anymore nowadays...
> >
> > Thx,
> >Arie
>
> Hi,
>
> The Pharo Mooc will end the 16 of July. After this date, if I am not
> wrong, the resources will be available for free. (Video, slides,
> exercises…)
>
> --
> Cyril Ferlicot
>
> http://www.synectique.eu
>
> 165 Avenue Bretagne
> Lille 59000 France
>
>


Re: [Pharo-users] Pharo Mooc

2016-07-06 Thread Cyril Ferlicot Delbecque
On 06/07/2016 14:00, Arie van Wingerden wrote:
> ​Hi,
> 
> on the main Pharo page I see Pharo Mooc mentioned. Obviously I am too
> late to join.
> 
> Will there be a similar course in the (near) future?
> 
> Are there other (video) courses available? I checked Udemy and O'Reilly,
> but alas, Smalltalk isn't that popular anymore nowadays...
> 
> Thx,
>Arie

Hi,

The Pharo Mooc will end the 16 of July. After this date, if I am not
wrong, the resources will be available for free. (Video, slides, exercises…)

-- 
Cyril Ferlicot

http://www.synectique.eu

165 Avenue Bretagne
Lille 59000 France



signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] How to deploy a Pharo app?

2016-07-06 Thread Damien Cassou
Arie van Wingerden  writes:
> Is there a recipe for deploying a desktop Pharo app?
>
> What I mean is:
>- no "world" windows visible
>- autostart using a specific message
>- etc.

PharoLauncher and DrGeo are possible sources of inspiration for you.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Re: [Pharo-users] SQLite + Pharo

2016-07-06 Thread Hilaire


Thanks Esteban,

I guess UDBC is for Pharo 5, and for Pharo 4 it is the NB version, right?

I guess both version has the same public interface.

Hilaire

Le 30/06/2016 20:02, Esteban A. Maringolo a écrit :
> Hilaire,
> 
> If you want to generate the SQL statements by hand you can use the
> UDBC SQLite3 driver, or if you want o use an ORM you can use Glorp.
> 
> See: 
> http://forum.world.st/ANN-Glorp-SQLite3-for-Pharo-5-td4899277.html#a4899303
> 
> Regards!
> Esteban A. Maringolo

-- 
Dr. Geo
http://drgeo.eu




[Pharo-users] How to deploy a Pharo app?

2016-07-06 Thread Arie van Wingerden
Hi,

I searched for this, found things, but they ended up with broken links ...

Is there a recipe for deploying a desktop Pharo app?

What I mean is:
   - no "world" windows visible
   - autostart using a specific message
   - etc.

Thanks!
   Arie


[Pharo-users] Pharo Mooc

2016-07-06 Thread Arie van Wingerden
​Hi,

on the main Pharo page I see Pharo Mooc mentioned. Obviously I am too late
to join.

Will there be a similar course in the (near) future?

Are there other (video) courses available? I checked Udemy and O'Reilly,
but alas, Smalltalk isn't that popular anymore nowadays...

Thx,
   Arie


Re: [Pharo-users] SQLite + Pharo

2016-07-06 Thread Hilaire
Thanks Esteban,

I guess UDBC is for Pharo 5, and for Pharo 4 it is the NB version, right?

I guess both version has the same public interface.

Hilaire


Le 30/06/2016 20:02, Esteban A. Maringolo a écrit :
> If you want to generate the SQL statements by hand you can use the
> UDBC SQLite3 driver, or if you want o use an ORM you can use Glorp.

-- 
Dr. Geo
http://drgeo.eu




Re: [Pharo-users] How do I debug: "There was an error while trying to install GitFileTree. Installation was cancelled." from Catalog Browser

2016-07-06 Thread Alistair Grant
Hi Dale,

On Tue, Jul 05, 2016 at 11:53:19AM -0700, Dale Henrichs wrote:
> While we're on the subject, when one does get a debugger How is a beginner
> supposed to share the error information with the folks on this list?
> 
> I have a debugger open on the stack after executing:
> 
>   Metacello new
> configuration: 'GitFileTree';
> version: #stable;
> repository: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo50/main';
> load
> 
> which was my guess for the load expression and I'm getting a walkback that I
> assume is the same as that produced by the Catalog Browser, but there is
> apparently no way of really knowing ...
> 
> Anyway, I've got a very nice debugger with a nice stack and nice error
> message in the title bar, but I don't see any way of actually being able to
> share a simple stack trace and error message with the mailing list other
> than to produce a screenshot which will not show the whole stack ..
> 
> I happen to know that the PharoDebug.log contains a stack trace (and I've
> attached it to this email), but I don't know how a beginner would know to do
> this, either.
> 
> Of course, I think that the stack dump in the PharoDebug.log is unreadable,
> but at least it is a sharable stack.
> 
> Finally to summarize, the actual message error is:  'invalid version number:
> normal version component must be integer v0' and this error is very likely
> consequence of a proposed bugfix for a Metacello bug that was reported a
> month or so ago [1], as I'm using a version of Metacello with the proposed
> bugfix present ... so at the end of the day, this is a problem with my code
> ...
> 
> But I do think the two questions that came from this exercise are still
> relevant:
> 
>   How does a beginner report/debug a Catalog Browser error?
>   How does a beginner produce a sharable stack trace?
> 
> Dale

I can help with producing a shareable stack trace...

The debugger has a set of buttons near the top: Proceed, Restart, Into,
Over, Through.  Just to the right of Through is a drop down list with
Fuel out Stack and Copy to clipboard.  You can use either of those to
share the stack.

HTH,
Alistair