Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-27 Thread Stephane Ducasse
> About deprecation, I found it fast because I think FFI as a key component of > a language. I imagine similar problems could happen when going from Morphic > to its successor (Bloc?). Even with a stable API, I expect some code to > explicitely depends on Morphic and break in the next GUI

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-23 Thread bdurin
Hi Stef, Thank you for your explanations! About deprecation, I found it fast because I think FFI as a key component of a language. I imagine similar problems could happen when going from Morphic to its successor (Bloc?). Even with a stable API, I expect some code to explicitely depends on

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-23 Thread bdurin
Hi Marcus, I would be happy to contribute to your experiment. Let me know. Bruno -- View this message in context: http://forum.world.st/Parser-failure-on-FFI-pragmas-declaration-in-Pharo-5-tp4961737p4963662.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-22 Thread Stephane Ducasse
Hi in fact I was wrong we do not support pragma for FFI and we could have deprecated them but we did not. Stef On Tue, Aug 22, 2017 at 5:15 PM, Stephane Ducasse wrote: > Tx for the report > > > On Wed, Aug 16, 2017 at 11:31 PM, bdurin wrote: >>

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-22 Thread Stephane Ducasse
Tx for the report On Wed, Aug 16, 2017 at 11:31 PM, bdurin wrote: > Hi, > > I stumbled upon what seems to me a strange issue in Pharo 5. The RBParser > fails to correctly parse the legacy FFI pragmas. This completely breaks down > the browser, the inspector and debugger

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-22 Thread Marcus Denker
> > On Tue, Aug 22, 2017 at 4:35 PM, bdurin wrote: >> Hi Hannes, >> >> Thanks for your help! I agree that loading in Pharo 4 (I guess) and >> following your recipe works and is easy. >> My concern is not specific to ZeroMQ though. In fact I discovered that >> ZeroMQ

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-22 Thread Stephane Ducasse
Bruno There was a huge change in the FFI (in fact it was rewritten from the ground) and you face a case where we were not backward compatible. Nobody reported it to us before. Now if you unzip the mcz you get the pharo text in plain mode. It does not solve the problem of parsing but in that case

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-22 Thread bdurin
Hi Hannes, Thanks for your help! I agree that loading in Pharo 4 (I guess) and following your recipe works and is easy. My concern is not specific to ZeroMQ though. In fact I discovered that ZeroMQ package is just a very low-level bindings of Zeromq C API whereas I thought it was something more

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-21 Thread H. Hirzel
On 8/17/17, bdurin wrote: Hello Bruno > Hi, > > In Pharo 6 it > fails early with a nice syntax error but it still prevents me from getting > the code into Pharo. ZeroMQ are just bindings that I can easily rewrite. Good to know that you can easily rewrite the bindings.

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-20 Thread Holger Freyther
> On 18. Aug 2017, at 16:46, Denis Kudriashov wrote: > > @Esteban: Would you accept a change to the FFI-Pharo5Compat to not use the > currentScope variable/reduce error checking? Or would you accept it in a > FFI-Pharo6Compat package? > I think it would help to be able

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-18 Thread Denis Kudriashov
> > @Esteban: Would you accept a change to the FFI-Pharo5Compat to not use the > currentScope variable/reduce error checking? Or would you accept it in a > FFI-Pharo6Compat package? > I think it would help to be able to load the Nacl code in Pharo6 and then > fix it? But you can just switch

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-18 Thread Holger Freyther
> On 17. Aug 2017, at 19:37, Denis Kudriashov wrote: Hey! > Yes. > > Also simple solution can be to override compiler of problem classes to return > old compiler. > > I know it is better to rewrite code but it can be not simple task when there > are a lot of

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-17 Thread Denis Kudriashov
Yes. Also simple solution can be to override compiler of problem classes to return old compiler. I know it is better to rewrite code but it can be not simple task when there are a lot of ffi-methods. 2017-08-17 13:17 GMT+02:00 Guillermo Polito : > > > On Thu, Aug

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-17 Thread bdurin
Hi, Thank you Denis and Esteban for your help. I agree, the way to go is to rewrite correct UFFI bindings. Denis' solution seems fragile. About my points 3 and 4 I think I was not clear. I did not want to force old FFI syntax. I explained why I thought that the way Pharo 5 was failing at

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-17 Thread Guillermo Polito
On Thu, Aug 17, 2017 at 1:09 PM, Denis Kudriashov wrote: > > Sorry, but we will not accept old pragma format (as I said, is invalid… >> and ugly ;) ). > > > But we will be able load old compiler (when it will be removed from > standard image) to support such old code > But

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-17 Thread Denis Kudriashov
> Sorry, but we will not accept old pragma format (as I said, is invalid… > and ugly ;) ). But we will be able load old compiler (when it will be removed from standard image) to support such old code 2017-08-17 11:48 GMT+02:00 Esteban Lorenzano : > hi, > > Old way to do

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-17 Thread Esteban Lorenzano
hi, Old way to do FFI calls is no longer supported on Pharo, but this deprecation is very old (since Pharo 2). Now, in Pharo 4 we replaced the compiler (for OpalCompiler) and we no longer supported “pragma-like” calls, in part because they are “invalid” pragma calls (they do not agrees with

Re: [Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-17 Thread Denis Kudriashov
Hi. I think your problem related to the old FFI syntax. In Pharo UFFI is the way to do external calls. To enable old FFI syntax try to switch compiler: Smalltalk compilerClass: Compiler I used this trick to port some small library which was based on old FFI. I made migration manually but maybe

[Pharo-users] Parser failure on FFI pragmas declaration in Pharo 5

2017-08-16 Thread bdurin
Hi, I stumbled upon what seems to me a strange issue in Pharo 5. The RBParser fails to correctly parse the legacy FFI pragmas. This completely breaks down the browser, the inspector and debugger (because as far as I understand all use RBParser to correctly highlight syntax). I had the image