Re: [Pharo-dev] Anoying bug fond in Artefact running in Windows 10
Hi Casimiro, Which version of Pharo do you use ? 6.1 ? Olivier :) 2017-10-19 18:27 GMT+02:00: > When you insert a jpeg from a file, for some reason the file descriptor > (stream) is kept open (at least in the Windows end of things). Then, if a > second page is to be generated, the following error is shown: > > 'MessageNotUnderstood: receiver of "reset" is nil > > PDFJpegElement>>stream: > JPEGReadWriter > aJPEGReadWriter > JPEGReadWriter(ImageReadWriter)>>on: > nil > > Sample code: > > aPage := PDFPage new. > > imageStream := FileStream fileNamed: 'lsi-tec.jpg'. > > aPage > add: > ((PDFJpegElement fromStream: imageStream) > from: 15 mm @ 20 mm; > dimension: 40 mm @ 40 mm). > imageStream close. > > Generated report is in annex > > The only way to recover is to close pharo, start it again. Then the file > descriptor (stream) is released and it is possible to go on. > > Has anyone faced this problem? > How to solve it? > > Best regards, > > Casimiro Barreto > >
Re: [Pharo-dev] Parallel Port
Hi, Sorry, I can't help. It's not the same problem as us. We work with the serial port to communicate with Arduino. Best regards Olivier :) 2017-06-10 20:38 GMT+02:00 Stephane Ducasse <stepharo.s...@gmail.com>: > I have forwarded your email to olivier Auverlot because he was > fighting to get Arduino working and I remember there were something > related. > > On Sat, Jun 10, 2017 at 2:57 AM, Facundo Vozzi <facundo...@gmail.com> > wrote: > > Hi, > > I need to access to the Parallel Port in order to use an old > Analog/Digital > > board to sense temperature in a micro brewery. Is anyone using any > package > > to do this? > > > > I'm using Pharo 6 on Windows. > > > > Thanks in advance, > > Facundo > >
Re: [Pharo-dev] How to use the serial port on MacOS X?
Hi Ben, I don't think that the problem concerns the USB port or the cable because: * I have tested with a simple Perl script (with the Device::SerialPort module) and all is ok. * In a shell, I can activate the rx/tx leds of the Arduino with the command "more -f /dev/cu.usbmodel1411". * I can use the Arduino IDE to program the card and send my binaries. If my Pharo code is correct, I suspect a problem in the serial plugin for MacOS X. I tried unsuccessful with Pharo 5 and Pharo 6. Best regards Olivier :) 2017-03-13 8:01 GMT+01:00 Ben Coman <b...@openinworld.com>: > Just a few random thoughts... > > Can you load an echo program into the Arduino to check comms is not > getting corrupted? > https://www.baldengineer.com/alternatives-to-arduinos- > serial-monitor.html > > > Is the problem with a USB3 port? > Try using a USB2 port. > > > Are you using an FTDI cable? > http://forum.arduino.cc/index.php?topic=373817.0 > http://ewen.mcneill.gen.nz/blog/entry/2016-06-26-os-x-el-capitan-setup/ > > try disabling Apple's Virtual Com Port and using FTDI's per section 7... > http://www.ftdichip.com/Support/Documents/AppNotes/AN_ > 134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf > > or using a non-FTDI serial adpator. > > cheers -ben > > > On Mon, Mar 13, 2017 at 12:21 AM, olivier auverlot < > olivier.auver...@gmail.com> wrote: > >> Hi, >> >> I try to use the serial port to communicate with an Arduino. On Linux, no >> problemo. I can open the serial port with the following code: >> >> | serialPort baudRate comPortNumber | >> baudRate := 31250. >> comPort := '/dev/ttyACM0'. >> >> serialPort := SerialPort new >> baudRate: 31250; >>dataBits: 8; >>stopBitsType: 1; >>parityType: 0; >> yourself. >> >> "the port is closed to ensure that it will be free" >> serialPort close. >> (serialPort openPort: comPort) isNil >> ifTrue: [ ^self error: 'COM port not available' ] >> ifFalse: [ serialPort inspect ]. >> serialPort close. >> >> But on MacOS X (10.11.6), the same code used with /dev/cu.usbmodel1411 >> doesn't run. The error is "Cannot open '/dev/cu.usbmodel1411'". I'm sure >> that is the correct serial port. If I type "more -f /dev/cu.usbmodel1411" >> in a terminal, the rx/tx leds of the Arduino are blink. >> >> Someone has an idea about this problem that is not specific of the >> Arduino but concerns the generic usage of the serial port with Pharo? >> >> Best regards >> Olivier >> >> ps: I can't test on Windows but I'm interested by a feedback. >> > >
[Pharo-dev] How to use the serial port on MacOS X?
Hi, I try to use the serial port to communicate with an Arduino. On Linux, no problemo. I can open the serial port with the following code: | serialPort baudRate comPortNumber | baudRate := 31250. comPort := '/dev/ttyACM0'. serialPort := SerialPort new baudRate: 31250; dataBits: 8; stopBitsType: 1; parityType: 0; yourself. "the port is closed to ensure that it will be free" serialPort close. (serialPort openPort: comPort) isNil ifTrue: [ ^self error: 'COM port not available' ] ifFalse: [ serialPort inspect ]. serialPort close. But on MacOS X (10.11.6), the same code used with /dev/cu.usbmodel1411 doesn't run. The error is "Cannot open '/dev/cu.usbmodel1411'". I'm sure that is the correct serial port. If I type "more -f /dev/cu.usbmodel1411" in a terminal, the rx/tx leds of the Arduino are blink. Someone has an idea about this problem that is not specific of the Arduino but concerns the generic usage of the serial port with Pharo? Best regards Olivier ps: I can't test on Windows but I'm interested by a feedback.
Re: [Pharo-dev] Talk at Google Devdays BE accepted
Cool Le 7 oct. 2016 14:04, "p...@highoctane.be"a écrit : > Title is Material Design Lite in Pharo. > > Phil >
Re: [Pharo-dev] new pharo cheatsheet
@cyril +1 Le 9 avr. 2016 10:56 AM, "Cyril Ferlicot D."a écrit : > Le 08/04/2016 22:08, J.F. Rick a écrit : > > It looks good. I might mention that most data structures are 1 indexed > > as most other languages tend to be 0 indexed and that throws people new > > to the language. > > > > I use Pharo since 1 year now and I had to use indexes only 3-4 times. I > think it is more important to say that Pharo have Collections with an > awesome API. > > -- > Cyril Ferlicot > > http://www.synectique.eu > > 165 Avenue Bretagne > Lille 59000 France > >
Re: [Pharo-dev] new pharo cheatsheet
I think that it could be interesting to use it also on a simple HTML page for the Pharo web site. This document can be put in the main menu ("Beginners" ?) just before "Documentation". It's really cool to have a synthesis document for the newcomers. 2016-04-09 8:09 GMT+02:00 Ben Coman: > On Sat, Apr 9, 2016 at 6:16 AM, Damien Pollet > wrote: > > On 8 April 2016 at 22:57, Sven Van Caekenberghe wrote: > >> > >> Since we are simpler and more logical, a cheat sheet should not confuse > >> people by describing what we are not. > > > > > > I beg to disagree. "Simpler and more logical" is just your biased point > of > > view; fact is, zero-based indexing is just more widespread in programming > > languages. > > > > I would be happy to be proven wrong about that, but I seriously doubt > most > > people that come to Smalltalk have never been exposed to programming > before. > > It's not unreasonable to assume that they've started programming in any > one > > of the most popular languages these days, and that that language is > > zero-indexed. So mentioning that in Smalltalk the first element is > indeed at > > index 1 is pretty essential, if just to lift the ambiguity. > > +1. But to follow Sven's point exactly. We don't need to say we are > "not 0 based", just that we are "1 based". > > cheers -ben > >
Re: [Pharo-dev] Sounds like Goodies
yes, the project is on SmalltalkHub ( http://smalltalkhub.com/mc/olivierauverlot/Phonetix/main). It's work in progress for french & english languages. Phonetix contains: * Flesh Indicator, * Gunning Fog Indicator, * Hamming Distance, * Levenshtein Distance * Syllabes counter, * Soundex (French & English), * Soundex2 (French & English), * Phonex, * Nysiis Olivier 2016-01-14 9:48 GMT+01:00 Guillaume Larcheveque < guillaume.larcheve...@gmail.com>: > For Soundex, I am quite sure that Olivier Auverlot implemented it in > Pharo, maybe also the other ones. > > 2016-01-13 16:50 GMT+01:00 Torsten Bergmann <asta...@gmx.de>: > >> The dolphin 7 open source repo includes some contributions from Udo >> including >> an implementation for Levenshtein distance [1]. It's a single method + >> test case and easy to >> port. >> >> The algorithm [2] is useful to find out how close two strings are >> (approximate string matching). >> >> There is also SoundEx [4] and SoundsLike [5] (Soundex, Double Metaphone >> and NYSIIS algorithms) >> for Pharo available. >> >> I just want to let anyone know - just in case someone works on a more >> "robust" autocompletion >> that is also typo aware. ;) >> Having custom templates [6] like in Eclipse would also be good to have in >> future Pharo code editor. >> >> More to add to the wishlist? Damn ... Santa already passed by... >> >> Have fun >> T. >> >> [1] >> https://github.com/dolphinsmalltalk/Contributions/tree/master/Udo%20Schneider/Levenshtein%20Distance >> [2] https://en.wikipedia.org/wiki/Levenshtein_distance >> [3] >> https://github.com/dolphinsmalltalk/Contributions/tree/master/Udo%20Schneider/Soundex >> [4] http://smalltalkhub.com/#!/~riverdusty/SXSoundEx >> [5] http://www.smalltalkhub.com/#!/~UdoSchneider/SoundsLike >> [6] http://www.tutorialspoint.com/eclipse/eclipse_code_templates.htm >> >> > > > -- > *Guillaume Larcheveque* > >
[Pharo-dev] Using Pharo with Debian 8 64 bits
Hi, I just tried to use Pharo 4 in graphical mode with Debian Jessy 64 bits. The last version of this Linux distribution needs some operations to running Pharo. I think that could be interesting to share my configuration work. - unzip the Pharo4 archive, - sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install ia32-libs and now, the voodoo operations :-) - apt-get install libx11-6:386 - apt-get install libgl1-mesa-glx:i386 - apt-get install libfontconfig1:i386 Hope that's can help someone. Best regards Olivier
Re: [Pharo-dev] Looking for a way to build SQL query
Hi Stef, I have not knowledge about a framework to build SQL queries from Pharo syntax. However, Garage provides a solution to build easily SQL query with arguments. Take a look at https://guillep.github.io/DBXTalk/garage/prepared_statements.html Olivier :-) 2015-09-03 11:45 GMT+02:00 Peter Uhnák: > Maybe Querier? > It was presented on ESUG, but I don't know how production ready it is, you > would have to ask Michal. > > http://querier.xmb.cz/ > https://www.youtube.com/watch?v=c2yhd8BjFjU > > Peter > > On Thu, Sep 3, 2015 at 11:32 AM, stepharo wrote: > >> Hi guys >> >> I'm looking for a lib that I can use to build sql queries instead of >> manipulating strings. >> ROE? >> >> Stef >> >> >
[Pharo-dev] Syslog client
Hi, I just released an UDP client for the Syslog network protocol (RFC5424). The product is available on SmalltalkHub. http://smalltalkhub.com/#!/~olivierauverlot/Syslog Best regards Olivier ;-)
Re: [Pharo-dev] [Pharo-users] Syslog client
Hi Sven, I believe logging to syslog(d) is part of SystemLogger. I haven't found the protocol implementation of the Unix syslog in SystemLogger package. Are you sure ? Olivier ;-) 2015-03-31 15:15 GMT+02:00 Sven Van Caekenberghe s...@stfx.eu: I believe logging to syslog(d) is part of SystemLogger. http://www.smalltalkhub.com/#!/~StephaneDucasse/SystemLogger See category SystemLogger-SysLogSender On 31 Mar 2015, at 15:11, Dmitri Zagidulin dmi...@zagidulin.net wrote: YES! Awesome! :) I was just about to look to see if there was a decent Syslog client for Pharo! On Tue, Mar 31, 2015 at 4:46 AM, olivier auverlot olivier.auver...@gmail.com wrote: Hi, I just released an UDP client for the Syslog network protocol (RFC5424). The product is available on SmalltalkHub. http://smalltalkhub.com/#!/~olivierauverlot/Syslog Best regards Olivier ;-)
Re: [Pharo-dev] Prepared Statements on PostgresV2?
Supporting open source database is the first step but you're right, we must also propose a solution for proprietary databases. The difficulty is to create an framework that proposes the ability to mix native driver (as level 4 in JDBC) and driver wrappers for undocumented protocols. As you, I'm a big fan of MSQL Server but keeps secret this information ;-) Olivier 2015-01-11 13:00 GMT+01:00 Alain Rastoul alf.mmm@gmail.com: Hi Olivier, Native driver in Pharo is good news :) Lack of Sql server support is bad news (I invested a lot in it for a long time, and I'm a fan) but I'll go for postgresql, I think I should like it too, I created a table once and did a select with it (haha) Regards, Alain Le 11/01/2015 12:20, olivier auverlot a écrit : Developping the database protocols in Pharo is simply the best solution because Pharo is a cross-plateforms solution and it's necessary to have cross-plateforms frameworks for it. This solution will facilitate the deploiement of Pharo solutions because no configuration must be doing on the hosts. The Pharo image must be simply be copied. But yes it's a big work and I think that the priorities must be done on some databases servers as MySQL, Postgresql and SQLite. In the open source world, the protocols are more accessibles and the communities can help us. Olivier ;-) 2015-01-11 12:16 GMT+01:00 stepharo steph...@free.fr mailto:steph...@free.fr: thanks for the report. Stef Le 11/1/15 00:29, Stephan Eggermont a écrit : Stef wrote: Now I do not get it. Did you port it to Pharo? I spend about a day evaluating it in 40272. I looked at three packages (and their two test packages). PostgresV3-Core handles the V3 protocol, makes a connection using a socket, provides a result set with rows, columns and text converters. I got a few problems in the unit tests, looks like something in the way floats are handled is different (PG3SocketReadStreamparseFloatLength: and there is a method missing PG3SocketReadStream parseScaledDecimal PostgresV3-Pool provides a connection pool. I was able to use that to connect to a database, execute queries and get data out of it. Issues there are trivial: PG3Connectionmd5HashMessage: aString ^Smalltalk globals at: #MD5 ifPresent: [ :md5 | (md5 hashMessage: aString) hex asLowercase ] ifAbsent: [ WebUtils md5Digest: aString ] We don't have WebUtils, but we have MD5 Then there is PostgresV3-CodeMirror. In PG3SchemaMirror there are some overrides to select a different compiler (+parser) and code highlighter. That allows subclasses to have plsql functions as methods, using the PG3FunctionMirror. In Pharo, I couldn't easily find how to change the code highlighter in Nautilus. The PG3Compiler just changes the parser used to PG3Parser. The PG3Parser is a subclass from the squeak parser and so uses some things that work a bit different PG3ParsercheckSyntaxFor: uses a cue instance variable. It is not a full plsql parser, relying on the database to check syntax. PG3SchemaChanges uses Toolbuilder to show a window with the differences between the functions in the database and those in the image and select which ones to change. Stephan
[Pharo-dev] PNG in Artefact
I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact. https://sites.google.com/site/artefactpdf/ Best regards Olivier ;-)
Re: [Pharo-dev] PNG in Artefact
In fact, the PNG is converted to JPEG image before to be included in the PDF file. But the conversion process doesn't support transparency and sets a black background. I think that is a limitation in the JPEG writer but someone have perhaps an idea to fix it. Olivier ;-) 2015-01-11 21:11 GMT+01:00 Torsten Bergmann asta...@gmx.de: JPEG supports is degrading. Less and less good support. Le 11/1/15 18:04, Torsten Bergmann a écrit : I improved Artefact this morning and added the support for PNG files. It's now possible to use PDFPngElement to include a PNG (untransparent) in a PDF file produced by Artefact. Nice, what is the reason only untransparent PNGs work? Thanks - but that was not my question. PNG graphics format can - but must not include transparency. When I understand the mail correct only non-transparent PNG images are supported with the new addition. That's why I ask about transparent PNG. Bye T.
Re: [Pharo-dev] Prepared Statements on PostgresV2?
SQL support is very poor in Pharo and many improvements are necessary. PostgresV2 is actually probably the best solution available because it is written only in Pharo and works on many platforms. The framework does the work but it's a limited solution. Olivier ;-) 2015-01-10 10:09 GMT+01:00 stepharo steph...@free.fr: May be this is the time to improve this package :) I'm sorry I have no DB experience. As part of the consortium agenda for this year we have - better ffi - better db support Stef Le 10/1/15 02:06, David Carlos Manuelda a écrit : I've installed and tested PostgresV2 under pharo with the following doits Gofer new smalltalkhubUser: 'PharoExtras' project: 'PostgresV2'; configuration; load. (#ConfigurationOfPostgresV2 asClass project version: '2.4') load While it works good, it is missing a very important feature from both security and performance point of view: The prepared statements. As a brief, prepared statements are parameterized SQL statements that are loaded ONCE per connection instead of sending the whole query to DB every time, and also, they are parameterized, so it completelly prevents SQL injection, as the parameters are automatically 'detected' and scaped and/or handled accordingly without allowing in any case a parameter to alter the SQL meaning, which can happen by using regular SQL queries made by string concatenation. I browsed the class and did not find any prepare: method nor anything similar. Also, you can give a name to a SQL sentence, which makes the code much more readable without messing too much logic with SQL commands and string concatenation. An example is as follows: (supposing we have an instance variable connection, already initialized and connected via PGConnection class) Instead of: self connection execute: 'SELECT data FROM mytable WHERE name=''', anUser userName, ''';'. Would be something like this: self connection executePrepared: 'getUserData' with: anUser userName. And another suggestion could be something like: self connection prepare: 'getUserData' withSQL: 'SELECT data FROM mytable WHERE name=$1' Any plan for this to be implemented or any hint to other PostgreSQL class that already has it? David. P.S. I've written in my blog about this some time ago: http://stormbyte.blogspot.com.es/2012/06/programming-with- database-using.html if someone finds it useful.
[Pharo-dev] Voyage,Mongo and Seaside...
Where must i initialize a mongo connection in a Seaside application when I use Voyage ? My application use the singleton mode of Voyage. What is the good place to create the singleton ? * in the initialize class method of mySeaside root WAComponent (It will called one time when Seaside initialize the hosted applications) * in the instance method initialize of my Seaside root WAComponent (It will called each time that's a user start to use the application) The second case seems to be better because the connection time is probably limited by Mongo or the connection could be broken. Someone have experimented good practices at this problematic ? Best regards Olivier ;-)
Re: [Pharo-dev] ANNC: QR Code (v.2)
Le 7 oct. 2014 à 13:54, J.F. Rick a écrit : Well, the QRCode natively just has a bitmap form. The little server app requests that form (perhaps with a border, mirrored, reversed, etc.) and then magnifies it and converts it to a PNG. So, putting the result in a PDF is as trivial or as hard as putting a bitmap form into a PDF. How difficult that is is something that Olivier can perhaps answer. In fact, the faster approach is to convert the PNG to a JPEG picture with Pharo and to include it into a PDF Document with Artefact. It's easy to do but I can't estimate the quality lost of the picture (I suppose that's is important for the scanning of the QRCode with a phone). pharoByExampleLogo := (ZnClient new url: 'http://pharobyexample.org/pictures/pbe-title.jpg'; get). aPage := PDFPage new. aPage add: (PDFJpegElement from: 5 mm@0mm wh: 160mm@90mm fromStream: pharoByExampleLogo readStream). The best solution is to create a QRCodeComponent in Artefact and draw the QRCode directly in the PDF document. Olivier ;-)
Re: [Pharo-dev] Current maintainer of PharoExtras/LDAP?
LDAP is so important. Improving support for Active Directory and SSL is really a good idea. I used the framework in many projects with Pharo 1.3 and 2.0. It works very well. But I'm hitting a few issues now which would change the base packages. What are the changes ? Best regards Olivier :-) Le 16 juil. 2014 à 19:47, stepharo a écrit : On 16/7/14 19:02, Udo Schneider wrote: All, I'm currently making some changes to the LDAP package to make it play nicer with ActiveDirectory and SSL. Up to now all those changes were non-intrusive to the current packages. But I'm hitting a few issues now which would change the base packages. What's the policy on this? Improving :) We need stronger and better libraries. Keeping those changes in my own fork or submitting them to a maintainer (who?). I gave you access to the PharoExtras repo. Just add tests and build the best LDAP you want :) Make sure that everything work well and suits your needs. I'm not sure that current design is good. At least when olivier auverlot showed to me I was skeptical about the chapter we/he wrote on it. In addition ... as far as I can see the current package is Pharo only (was Squeak). If Pharo-only is o.k. I could for instance integrate my stuff for LDAP-over-SSL in there directly (based on Zodiac). Excellent idea. Our goal is to make sure that people can make business. Thanks, Udo
Re: [Pharo-dev] Current maintainer of PharoExtras/LDAP?
Le 17 juil. 2014 à 12:08, Udo Schneider a écrit : What are the changes ? SSL: * Addition of LDAPSConnection/LDAPSWorker and instance generation methods (e.g. LDAPSConnection#to:port:ssl:) to use Zodiac Sockets instead of regular sockets. Both classes support SSL and non-SSL connection. So it might be worth rolling them into the regular LDAPConnection/LDAPWorker AD: * Addition of LDAPSearchResultReference to handle ReferenceResults. W/o this even something simple like searching the RootDSE fails. * Addition of LDAP URLs (not working yet) to parse ReferenceResults * Some convenience methods to search/create/delete AD Users and Groups. Support for (Re)Setting Passwords ... this was quite PITA to figure out BTW ... Misc: * Spec based LDAP Browser (http://udos.s3.amazonaws.com/LDAPBrowser.png) Just a summary (omitting some bits and pieces like fetching RootDSEs, namingContexts ...) CU, Udo amazing !!! On 17.07.2014 09:30, Olivier Auverlot wrote: LDAP is so important. Improving support for Active Directory and SSL is really a good idea. I used the framework in many projects with Pharo 1.3 and 2.0. It works very well. But I'm hitting a few issues now which would change the base packages. What are the changes ? Best regards Olivier :-) Le 16 juil. 2014 à 19:47, stepharo a écrit : On 16/7/14 19:02, Udo Schneider wrote: All, I'm currently making some changes to the LDAP package to make it play nicer with ActiveDirectory and SSL. Up to now all those changes were non-intrusive to the current packages. But I'm hitting a few issues now which would change the base packages. What's the policy on this? Improving :) We need stronger and better libraries. Keeping those changes in my own fork or submitting them to a maintainer (who?). I gave you access to the PharoExtras repo. Just add tests and build the best LDAP you want :) Make sure that everything work well and suits your needs. I'm not sure that current design is good. At least when olivier auverlot showed to me I was skeptical about the chapter we/he wrote on it. In addition ... as far as I can see the current package is Pharo only (was Squeak). If Pharo-only is o.k. I could for instance integrate my stuff for LDAP-over-SSL in there directly (based on Zodiac). Excellent idea. Our goal is to make sure that people can make business. Thanks, Udo
Re: [Pharo-dev] Fwd: Request
Hi Guido, You can try Faster than Light. This is a pool connection to open multiple sockets. The project is on Smalltalkhub ( http://smalltalkhub.com/#!/~RMoD/FasterThanLight). It works with Pharo 2.0, not tested with 3.0 Olivier ;-) 2014-02-13 15:20 GMT+01:00 b...@openinworld.com: Guido Chari wrote: Hi guys, I´m doing some experiments with dynamic primitives and files. Actually i am working with the socket and file plugin. (In that order of priority) Does anyone know about an open pharo app that make heavy use of sockets (mainly creating lot) that i can borrowed (install locally) for doing serious experiments? Something with heavy used of files will help too. Thanks, Best, Guido. SmalltalkHub?
Re: [Pharo-dev] out of scope for two weeks
Look after yourself Olivier :-) Le 3 janv. 2014 17:10, Stéphane Ducasse stephane.duca...@inria.fr a écrit : hi guys my doc stopped me because I’m exhausted so see you in two weeks. Stef
Re: [Pharo-dev] [ANN] PunQLite - a new NoSQL wrapper for Pharo
Really cool. That seems very simple to use :-) 2013/12/24 Masashi UMEZAWA masashi.umez...@gmail.com Hi all, I've developed PunQLite. UnQLite NoSQL database binding for Pharo. https://github.com/mumez/PunQLite http://smalltalkhub.com/#!/~MasashiUmezawa/PunQLite UnQLite is a fast, lightweight, portable, embedded KVS with a simple scripting engine (Jx9). http://unqlite.org/ Torsen kindly wrote about PunQLite project's beginning on his blog. http://astares.blogspot.jp/2013/11/punqlite-for-pharo-using-unqlite.html At that time, it was only a bare NativeBoost FFI interface. Now it has become a full-fledged wrapper. db := PqDatabase open: 'test.db'. db at: 'Smalltalk' put: 'COOL'. db at: 'Pharo' put: 'HOT'. db at: 'Smalltalk' ifPresent: [:data | data asString inspect ]. Transcript cr; show: db keys. db do: [:cursor | Transcript cr; show: cursor currentStringKey; space; show: cursor currentStringValue. ]. db close. Moreover, it is quite fast. I wrote a simple benchmark that does many round-trips (put/get 10 small elements). The result is 877 msecs (on my windows laptop). It was impressive. Enjoy! -- [:masashi | ^umezawa]
Re: [Pharo-dev] How to delete an obsolete class ?
In my case, Smalltalk fixObsoleteReferences doesn't works. I was forced to rebuild a new image :-( Best regards Olivier Le 14 oct. 2013 à 08:50, roberto.mine...@usi.ch a écrit : Thank you Pavel, Just run into the same situation and your 'Smalltalk fixObsoleteReferences' worked like a charm ;) Cheers, Roberto On Oct 10, 2013, at 11:11 AM, Pavel Krivanek pavel.kriva...@gmail.com wrote: Hi Olivier, firstly try Smalltalk fixObsoleteReferences. Then try this: Smalltalk tools pointerExplorer openOn: SystemNavigation default obsoleteClasses first. Look at every reference that is not related to the explorer itself and try to find why it is not garbage-collected. Cheers, -- Pavel 2013/10/10 Olivier Auverlot olivier.auver...@gmail.com: Hi Pavel, Thanks for your response. I tryed this morning and in fact, the obsolete class has not instances. SystemNavigation default obsoleteClasses {AnObsoletePVENodeStatus} SystemNavigation default obsoleteClasses collect: #allSubInstances. an Array(an OrderedCollection()) have you an idea how to remove this class ? Best regards Olivier ;-) Le 9 oct. 2013 à 10:46, Pavel Krivanek a écrit : You need to check if it still does have some instances and kill them. Then find and remove all references to the class. SystemNavigation default obsoleteClasses. SystemNavigation default obsoleteClasses collect: #allSubInstances. SystemNavigation default obsoleteClasses first allSubInstances first pointersTo. etc... Good hunt -- Pavel 2013/10/9 Olivier Auverlot olivier.auver...@gmail.com: Hi, In my project, my code has a strange behavior when I'm reading all subclasses of an another class. The following code must visit all the subclasses of PVEStatus but I get a bad result. PVEStatus allSubclasses do: [ :statusDatatype | (aRawStatus at: 'type') = statusDatatype type ifTrue: [ ^ statusDatatype getStatus: aRawStatus callback: self ] ] The answer contains #AnObsoletePVENodeStatus and this class doesn't exist. She doesn't appear in the class browser. I suppose that it's a rest of refactoring. How can I delete this obsolete class ? Best regards Olivier ;-)
Re: [Pharo-dev] How to delete an obsolete class ?
Hi Pavel, Thanks for your response. I tryed this morning and in fact, the obsolete class has not instances. SystemNavigation default obsoleteClasses {AnObsoletePVENodeStatus} SystemNavigation default obsoleteClasses collect: #allSubInstances. an Array(an OrderedCollection()) have you an idea how to remove this class ? Best regards Olivier ;-) Le 9 oct. 2013 à 10:46, Pavel Krivanek a écrit : You need to check if it still does have some instances and kill them. Then find and remove all references to the class. SystemNavigation default obsoleteClasses. SystemNavigation default obsoleteClasses collect: #allSubInstances. SystemNavigation default obsoleteClasses first allSubInstances first pointersTo. etc... Good hunt -- Pavel 2013/10/9 Olivier Auverlot olivier.auver...@gmail.com: Hi, In my project, my code has a strange behavior when I'm reading all subclasses of an another class. The following code must visit all the subclasses of PVEStatus but I get a bad result. PVEStatus allSubclasses do: [ :statusDatatype | (aRawStatus at: 'type') = statusDatatype type ifTrue: [ ^ statusDatatype getStatus: aRawStatus callback: self ] ] The answer contains #AnObsoletePVENodeStatus and this class doesn't exist. She doesn't appear in the class browser. I suppose that it's a rest of refactoring. How can I delete this obsolete class ? Best regards Olivier ;-)
Re: [Pharo-dev] [PROVENANCE INTERNET] Re: Please contributors fill up this form...
PharoContributor new name: 'Olivier Auverlot'; id: 'olivierauverlot'; email: 'olivier.auver...@gmail.com'; description: 'Artefact,PROXimity'; yourself
[Pharo-dev] How to delete an obsolete class ?
Hi, In my project, my code has a strange behavior when I'm reading all subclasses of an another class. The following code must visit all the subclasses of PVEStatus but I get a bad result. PVEStatus allSubclasses do: [ :statusDatatype | (aRawStatus at: 'type') = statusDatatype type ifTrue: [ ^ statusDatatype getStatus: aRawStatus callback: self ] ] The answer contains #AnObsoletePVENodeStatus and this class doesn't exist. She doesn't appear in the class browser. I suppose that it's a rest of refactoring. How can I delete this obsolete class ? Best regards Olivier ;-)
[Pharo-dev] New project announcement: PROXimity
Hi, I just started since 3 days to work on a new framework for Pharo. It's named PROXimity. The goal of this framework is to control a Proxmox virtualization solution with Pharo. Proxmox uses a REST API. With Zinc and STON, it's very easy to give orders as creating a virtual machine, managing the boot and stop, etc. I'm working on this project because it is a subpart of another application but I think that it could interest other Pharo users (for example: seaside hosting). The first Pharo classes are published on SmalltalkHub. If you're interested and want join your forces with me, don't hesitate to contact me. http://www.proxmox.com http://pve.proxmox.com/wiki/Proxmox_VE_API Best regards Olivier ;-)
Re: [Pharo-dev] New project announcement: PROXimity
why not ! it would be very cool to have an abstraction layer. The difficulty is to communicate with the virtualisation product. For Proxmox, it's easy because it uses HTTP but I don't know the other products. Le 3 oct. 2013 à 10:05, Christophe Demarey a écrit : Hi Olivier, Cool. Do you think it is possible to do a more generic Cloud interface in Pharo? I mean an API agnostic to the used cloud manage (proxmox, cloudstack, openstack, amazon)? There is a Java project called jclouds[1] that does that. It may be cool that other people can define more cloud providers. Regards, Christophe. [1] : http://jclouds.incubator.apache.org/ Le 3 oct. 2013 à 08:06, Olivier Auverlot a écrit : Hi, I just started since 3 days to work on a new framework for Pharo. It's named PROXimity. The goal of this framework is to control a Proxmox virtualization solution with Pharo. Proxmox uses a REST API. With Zinc and STON, it's very easy to give orders as creating a virtual machine, managing the boot and stop, etc. I'm working on this project because it is a subpart of another application but I think that it could interest other Pharo users (for example: seaside hosting). The first Pharo classes are published on SmalltalkHub. If you're interested and want join your forces with me, don't hesitate to contact me. http://www.proxmox.com http://pve.proxmox.com/wiki/Proxmox_VE_API Best regards Olivier ;-)
Re: [Pharo-dev] LDAP - licensing....
Yes, as Stef says, I use LDAPlayer everyday at work and it run fine :-) Some month ago, I wrote a draft of an article about LDAPlayer. If you read french, you can download it from http://perso.numericable.fr/~oauverlo/pharo/ldap.pdf The article isn't completed but contains some informations. I plan to rewrite it... Best regards Olivier ;-) Le 27 sept. 2013 à 22:45, p...@highoctane.be a écrit : Ah ah, thanks!! I am doing some Stamp with RabbitMQ over here. Works. /Phil
Re: [Pharo-dev] Barcodes
Woohoo ! Le 22 juin 2013 à 01:05, Stephan Eggermont a écrit : Guillaume wrote: I prefer the first one, creating a separate package depending on both. Done merged. Now there is an ArteBar package in Artefact. Configuration not changed. Stephan
Re: [Pharo-dev] Barcodes
me too :) Le 21 juin 2013 à 16:39, Guillaume Larcheveque a écrit : I prefer the first one, creating a separate package depending on both. 2013/6/21 Stephan Eggermont step...@stack.nl I've committed and merged. That introduces a dependency on Barcode in Artefact. Would you prefer: - creating a separate package depending on both - splitting artefact - making Artefact depend on Barcode - making the dependency the other direction - reverting Stephan -- Guillaume Larcheveque
Re: [Pharo-dev] Barcodes
Hi Gary, Thanks for this informations. It's very interesting. All the data there can be gatherted from the FreeType TTF font in Pharo. Just needs to be present on the end-user's pc. Have you already wrote code to extract the informations from a TTF font ? If someone has exploring this domain, we could write faster the implementation. Best regards Olivier ;-) Le 19 juin 2013 à 18:05, Gary Chambers a écrit : Hi Olivier. For our label/report generation we do draw the barcodes rather than use a Form. Actually we have a Canvas that adapts to generate PDF so it is all WYSIWYG. Therefore no actual dependency in the PDF generation to any barcode objects. Looking to support Arefact instead of the stuff we have. Not looked at the details of Artefact yet though. TTF in PDF is not so bad... a snippet of what's expected in the output: 6 0 obj /Type /Font /Subtype /TrueType /BaseFont /Arial /FirstChar 0 /LastChar 255 /Widths 8 0 R /FontDescriptor 9 0 R /Encoding /WinAnsiEncoding endobj 9 0 obj /Type /FontDescriptor /FontName /Arial /Flags 32 /FontBBox [-665 -325 2000 1005] /Ascent 905 /Descent -212 /Leading 0 /ItalicAngle 0 endobj 8 0 obj [ 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 277 277 354 556 556 889 666 190 333 333 389 583 277 333 277 277 556 556 556 556 556 556 556 556 556 556 277 277 583 583 583 556 1015 666 666 722 722 666 610 777 722 277 500 666 556 833 722 777 666 777 722 666 610 722 666 943 666 666 610 277 277 277 469 556 333 556 556 500 556 556 277 556 556 222 222 500 222 833 556 556 556 556 333 500 277 556 500 722 500 500 500 333 259 333 583 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 277 333 556 556 556 556 259 556 333 736 370 556 583 333 736 552 399 548 333 333 333 576 537 333 333 333 365 556 833 833 833 610 666 666 666 666 666 666 1000 722 666 666 666 666 277 277 277 277 722 722 777 777 777 777 777 583 777 722 722 722 722 666 666 610 556 556 556 556 556 556 889 500 556 556 556 556 277 277 277 277 556 556 556 556 556 556 556 548 610 556 556 556 556 500 556 500 ] endobj (actually we now use MacRoman encoding as generally works better). All the data there can be gatherted from the FreeType TTF font in Pharo. Just needs to be present on the end-user's pc. A typical PDF reader will do fallbacks as necessary if not present. (not tackled fully embedded fonts yet). Regards, Gary - Original Message - From: Olivier Auverlot To: Pharo Development List Sent: Wednesday, June 19, 2013 6:42 AM Subject: Re: [Pharo-dev] Barcodes Hi Gary, yes, I'm interested by help and pointers about TTF. It's a planned evolution of Artefact. About barcodes generation, why don't use Artefact directly ? You can draw barcodes with the PDFDraw elements (PDFLineElement, PDFRectElement, etc.) and print the document on stickers. In the future, it could be cool to have a Artefact-Elements-Barcodes package :) Best regards Olivier Le 18 juin 2013 à 18:37, Gary Chambers a écrit : Well, hoping to work with Torsten on barcodes in general, given we have support for canvas based drawing of a few formats here at Pinesoft. Also, if Olivier would like some help with TTF in PDFs I can give some pointers etc. Regards, Gary - Original Message - From: Chris Cunningham To: Pharo Development List Sent: Tuesday, June 18, 2013 5:23 PM Subject: Re: [Pharo-dev] Barcodes You should be able to create a form, paint it white, draw on it with a barcode TTF font, export that form to JPEG, and then use that JPEG into Artefact. Not really straight-forward, but it should work. *Note: I've found that writing JPEG's in Pharo, it assumes that the background is BLACK if it isn't isn't specifically painted with something else first. Unlike PNG and GIF, which assume WHITE. -Chris On Tue, Jun 18, 2013 at 1:44 AM, Olivier Auverlot olivier.auver...@gmail.com wrote: Hi Torsten, Artefact don't support TTF fonts for the moment but it's planned in futures versions. Best regards Olivier :-) Le 14 juin 2013 à 16:16, Milan Mimica a écrit : You just need a TTF font. Does Artefact support TTF? hpdf does. On 14 June 2013 13:58, Torsten Bergmann asta...@gmx.de wrote: Do we have some barcode stuff available for Pharo? Something Form based that can be used with Artefact? Thx T. -- Milan Mimica http://sparklet.sf.net
Re: [Pharo-dev] Barcodes
Very cool !!! Le 20 juin 2013 à 13:41, Stephan Eggermont a écrit : So, this kind-of works. Both Artefact and Barcode repositories are not writable, so here is an artefact package that depends on barcode. ean13Test: aStream drawing an EAN13 | pdfdoc aPage barcode sequence | barcode := BarcodeEAN13 value: '2109876543210'. sequence := barcode binarySequence. pdfdoc := PDFDocument new. aPage := PDFPage new. sequence withIndexDo: [:each :index | each = $1 ifTrue: [ aPage add: (PDFLineElement from: (20+index) pt @ 50 pt to: (20+index) pt @ 20 pt). ] ]. pdfdoc add: aPage. pdfdoc styleSheet drawColor: (PDFColor r: 0 g: 0 b: 0). pdfdoc exportTo: aStream Artefact-Barcodes.stean13Test.pdf
Re: [Pharo-dev] Barcodes
Hi Torsten, Artefact don't support TTF fonts for the moment but it's planned in futures versions. Best regards Olivier :-) Le 14 juin 2013 à 16:16, Milan Mimica a écrit : You just need a TTF font. Does Artefact support TTF? hpdf does. On 14 June 2013 13:58, Torsten Bergmann asta...@gmx.de wrote: Do we have some barcode stuff available for Pharo? Something Form based that can be used with Artefact? Thx T. -- Milan Mimica http://sparklet.sf.net
Re: [Pharo-dev] Barcodes
Hi Gary, yes, I'm interested by help and pointers about TTF. It's a planned evolution of Artefact. About barcodes generation, why don't use Artefact directly ? You can draw barcodes with the PDFDraw elements (PDFLineElement, PDFRectElement, etc.) and print the document on stickers. In the future, it could be cool to have a Artefact-Elements-Barcodes package :) Best regards Olivier Le 18 juin 2013 à 18:37, Gary Chambers a écrit : Well, hoping to work with Torsten on barcodes in general, given we have support for canvas based drawing of a few formats here at Pinesoft. Also, if Olivier would like some help with TTF in PDFs I can give some pointers etc. Regards, Gary - Original Message - From: Chris Cunningham To: Pharo Development List Sent: Tuesday, June 18, 2013 5:23 PM Subject: Re: [Pharo-dev] Barcodes You should be able to create a form, paint it white, draw on it with a barcode TTF font, export that form to JPEG, and then use that JPEG into Artefact. Not really straight-forward, but it should work. *Note: I've found that writing JPEG's in Pharo, it assumes that the background is BLACK if it isn't isn't specifically painted with something else first. Unlike PNG and GIF, which assume WHITE. -Chris On Tue, Jun 18, 2013 at 1:44 AM, Olivier Auverlot olivier.auver...@gmail.com wrote: Hi Torsten, Artefact don't support TTF fonts for the moment but it's planned in futures versions. Best regards Olivier :-) Le 14 juin 2013 à 16:16, Milan Mimica a écrit : You just need a TTF font. Does Artefact support TTF? hpdf does. On 14 June 2013 13:58, Torsten Bergmann asta...@gmx.de wrote: Do we have some barcode stuff available for Pharo? Something Form based that can be used with Artefact? Thx T. -- Milan Mimica http://sparklet.sf.net
Re: [Pharo-dev] Release Artefact 1.0, the PDF framework
Agree with Stef. We have worked in the context of the 2.0 and next versions. Olivier ;-) Le 5 juin 2013 à 09:04, Stéphane Ducasse a écrit : Sabine please do not use 1.4 it is more than one year old now. Do not expect support on it. We improved radically Pharo since then. Stef On Jun 5, 2013, at 8:57 AM, Sabine Knöfel sabine.knoe...@gmail.com wrote: Hi Olivier, Hi Guillaume, I tried to load the new version 1.0 of artefact into a new Pharo 1.4 image and have the following problems: 1) Gofer new smalltalkhubUser: '' project: 'RMoD/Artefact'; package: 'ConfigurationOfArtefact'; load. my Gofer does not understand smalltalkhubUser:project: 2) I loaded manually - ConfigurationOfArtefact load I got the following error: DuplicatedVariableError: stream is already defined in PDFImage Can you please check this? Sabine On Fri, May 31, 2013 at 5:00 PM, b...@openinworld.com wrote: Thats really great. I'll have to find some time to have a look at it. cheers -ben Guillaume Larcheveque wrote: We are proud to announce that Artefact is available in 1.0 version. You can download it from: http://smalltalkhub.com/#!/~RMoD/Artefact Artefact is a framework to generate PDF documents. It is fully written in Smalltalk and doesn't require any native library. Artefact is light, platform independant and offer to users a high level of abstraction in order to easily creating PDF documents. * completely written in Smalltalk (and only Smalltalk), * complete freedom about the order of creation for pages, elements... (no need to follow the document order) * multi format and orientation for pages * page composition based on reusables PDF elements, * extensibility by offering a composition standard to create your own high level elements * styleSheet that can be reused in many documents and avoid wasting time and place with duplication * image support with the JPEG format * pre-defined high level elements like datagrid * support PDF compression to produce compact files A basic documentation is available in the help browser. Many examples are implemented in the PDFDemos class.
Re: [Pharo-dev] Release Artefact 1.0, the PDF framework
Sabine, I work since the start of the week on a Seaside application with Pharo 2.0. That's seems good. Olivier ;-) Le 5 juin 2013 à 09:14, Sabine Knöfel a écrit : Thanks for the fast answer. I thought that Pharo 2.0 is not yet ready for seaside? But that is wrong? On Wed, Jun 5, 2013 at 9:10 AM, Olivier Auverlot olivier.auver...@gmail.com wrote: Agree with Stef. We have worked in the context of the 2.0 and next versions. Olivier ;-) Le 5 juin 2013 à 09:04, Stéphane Ducasse a écrit : Sabine please do not use 1.4 it is more than one year old now. Do not expect support on it. We improved radically Pharo since then. Stef On Jun 5, 2013, at 8:57 AM, Sabine Knöfel sabine.knoe...@gmail.com wrote: Hi Olivier, Hi Guillaume, I tried to load the new version 1.0 of artefact into a new Pharo 1.4 image and have the following problems: 1) Gofer new smalltalkhubUser: '' project: 'RMoD/Artefact'; package: 'ConfigurationOfArtefact'; load. my Gofer does not understand smalltalkhubUser:project: 2) I loaded manually - ConfigurationOfArtefact load I got the following error: DuplicatedVariableError: stream is already defined in PDFImage Can you please check this? Sabine On Fri, May 31, 2013 at 5:00 PM, b...@openinworld.com wrote: Thats really great. I'll have to find some time to have a look at it. cheers -ben Guillaume Larcheveque wrote: We are proud to announce that Artefact is available in 1.0 version. You can download it from: http://smalltalkhub.com/#!/~RMoD/Artefact Artefact is a framework to generate PDF documents. It is fully written in Smalltalk and doesn't require any native library. Artefact is light, platform independant and offer to users a high level of abstraction in order to easily creating PDF documents. * completely written in Smalltalk (and only Smalltalk), * complete freedom about the order of creation for pages, elements... (no need to follow the document order) * multi format and orientation for pages * page composition based on reusables PDF elements, * extensibility by offering a composition standard to create your own high level elements * styleSheet that can be reused in many documents and avoid wasting time and place with duplication * image support with the JPEG format * pre-defined high level elements like datagrid * support PDF compression to produce compact files A basic documentation is available in the help browser. Many examples are implemented in the PDFDemos class.