Re: [Pharo-users] Playground auto-save?

2019-06-19 Thread Peter Uhnak
Hi Hilaire, this is a known problem. I've been losing code to Playground for years. (e.g. using undo (ctrl+z) is a good way to lose code) What helps a lot is to look into pharo-local/play-cache directory (you can open Spotter and type in "pharo-local" (without quotes)) which contains a log of

Re: [Pharo-users] How to intercept every instance variable write on all objects

2019-02-02 Thread Peter Uhnak
Hi, 3) Metalinks - it's based on intercepting method calls, right? But I need to intercept direct instance variable write, so probably not possible no, you can attach metalink to any AST node, including an Assignment Node. Some years ago I've made a small utility for this that also

Re: [Pharo-users] subpackages in P7

2018-11-27 Thread Peter Uhnak
The main benefit of using separate packages instead of tags is that you can choose what to load. That's why MyPackage-Test is best kept separate, because when other project is loading your project, they don't need to load such package (which can speed up dependency loading and makes for smaller

Re: [Pharo-users] Problems with NeoCSV Package

2018-11-27 Thread Peter Uhnak
Hi, > Instance of ByteString doesn’t understand #atEnd. This is a very typical error when you have accidentally passed a String instead of a Stream. ... which you did here: > stream := workingDir/myFileName readStreamDo: [ :stream | stream contents]. You can either operate directly on the file

Re: [Pharo-users] Examples of bad code

2018-11-13 Thread Peter Uhnak
Not necessarily unreadable, but I always find the UIManager & co. very confusing. There's a very recent discussion on part of it here http://forum.world.st/Streams-and-FileDialog-in-Pharo-6-and-7-td5084352.html And the combinations and variations of arguments is also a mess

Re: [Pharo-users] ToManyRelationSlot variant with an ordered collection?

2018-11-13 Thread Peter Uhnak
Maybe useful... some months ago I've reimplemented FAME's links (and added support for ToOne, etc.) https://github.com/openponk/synchronized-links I wanted to add supports for slots, but didn't get around to it yet... but maybe it will be easier to adapt this than to rewrite everything from

Re: [Pharo-users] what must be instead of the ??

2018-11-09 Thread Peter Uhnak
> > but how do I find now the answer do I have to do something like puzzle1 > stepChanges detectIndex ? How do you mean? It would be the same santaFloorOnBasement "calculates which step take Santa to the basement" stepChanges := input collect: [ :c | floor := floor + (c = '(' ifTrue:

Re: [Pharo-users] what must be instead of the ??

2018-11-09 Thread Peter Uhnak
On Fri, Nov 9, 2018 at 1:26 PM Roelof Wobben wrote: > Thanks all. > > This code seems to do the job > > santaFloorOnBasement > "calculates which step take Santa to the basement" > | index| > index := 1. > [floor ~= -1 ] whileTrue: > [ floor := ((input at: index) = '('

Re: [Pharo-users] ring deprecation in pharo 7

2018-10-23 Thread Peter Uhnak
Hi Doru, I imagine the replacement is Pavel's Ring2 https://github.com/pavel-krivanek/ring2 Peter On Fri, Oct 19, 2018 at 10:56 PM Tudor Girba wrote: > Hi, > > Ring seems to be deprecated in Pharo 7. Is there something else it will be > replaced with? > > In particular, I am looking for the

Re: [Pharo-users] RBParser bug ? (Morphic corruption)

2018-10-17 Thread Peter Uhnak
Yes, this is fixed in P7 https://pharo.fogbugz.com/f/cases/20212#BugEvent.193460 solution is to close your image and open again, or go to process browser and kill the new UI loop that started. As a workaround you can do parseExpression:onError: (or whatever the name is)... or I've made a small

[Pharo-users] library to chain select:/collect:/ ... via cascade

2018-10-17 Thread Peter Uhnak
Hi, is there some library that will allow me to chain select:/collect:/... via cascade? E.g. #(12 7 'a' nil #(0)) query reject: #isNil; select: #isNumber; collect: #squared; select: #even? The point is to not have to write billion parentheses when building a more complex query. I imagine this

Re: [Pharo-users] TxText ?

2018-10-14 Thread Peter Uhnak
I think it is "going to be replaced" for several years now, so I wouldn't worry about it too much. Peter On Sun, Oct 14, 2018 at 10:53 AM Hilaire wrote: > Hi, > > I read on some Rubric class comment, it will be replaced or merged with > TxText. > > I heard about TxText on this list, but what

[Pharo-users] finding dependees of a package

2018-10-07 Thread Peter Uhnak
Hi, I know I can "Browse Dependencies" of a particular package, but this only shows me the dependencies of the selected package X. What I am looking for is a list of packages that depend on X ... is that possible? Thanks, Peter

[Pharo-users] Metacello load baselines/configurations only

2018-10-03 Thread Peter Uhnak
Hi, is there a way to instruct Metacello to only install BaselineOfs/ConfigurationOfs instead of the entire project? For the purposes of analyzing dependencies. Thanks, Peter

Re: [Pharo-users] [ANN] Migrated Artefact to GitHub

2018-10-02 Thread Peter Uhnak
On Tue, Oct 2, 2018 at 4:55 PM Sean P. DeNigris wrote: > Guillermo Polito wrote > > when somebody migrates the repository. > > Who has access to the Pharo-contributions GH organization? Is that the > "go-to" repository for this case? I'm not often clear about under which GH > user/org something

Re: [Pharo-users] TextEditor

2018-09-21 Thread Peter Uhnak
Hi, depending on your use-case you might also consider Spec or Playground http://forum.world.st/Using-Playgrounds-as-a-notepad-tp4869129p4869227.html Peter On Fri, Sep 21, 2018 at 5:06 PM Hilaire wrote: > Hello Hernán, > > Thanks to point Rubric which I did not know until now. Any doc/pointer

Re: [Pharo-users] overriding FileReference>>copyTo: behavior

2018-09-17 Thread Peter Uhnak
Ideally something that works as updater only (doesn't touch nor change modification time if the contents is the same) On Mon, Sep 17, 2018 at 1:16 PM Peter Uhnak wrote: > Hi, > > is there an API to copy a file that will override the target destination > if it already exists?

[Pharo-users] overriding FileReference>>copyTo: behavior

2018-09-17 Thread Peter Uhnak
Hi, is there an API to copy a file that will override the target destination if it already exists? I was quite surprised that #copyTo: (and #copyAllTo:) will throw up when the target file already exists. Do I need to explicitly remove the file before copying / copy the contents instead? Thanks,

Re: [Pharo-users] is class-side name setter used by the system

2018-09-17 Thread Peter Uhnak
Hi Peter, >there is no more #name: in Class (or ClassDescription or Behavior). It > is named #setName: > It is only used by the class builder, some class methods and some tests. > It could be hidden better if it is still a problem. > > Cheers. > > > On Mon, Sep 17, 2018

[Pharo-users] is class-side name setter used by the system

2018-09-17 Thread Peter Uhnak
Hi, is the class-side "name:" setter used by the system itself? Because I remember many times overriding it for my own needs and it never broke anything as far as I know... which makes it strange why it even exists (because it is a trap). Thanks, Peter

Re: [Pharo-users] To get started with Gtoolkit and bloc

2018-09-13 Thread Peter Uhnak
Hi, you can start with the Bloc booklet http://files.pharo.org/books-pdfs/booklet-Bloc/BLOCDRAFT.pdf ... it is probably a bit outdated, but I think the API hasn't changed that much. and then in the image itself there is a "Bloc-Examples" package that contains hundreds (thousands?) of examples.

Re: [Pharo-users] Ready to use Roassal?

2018-09-09 Thread Peter Uhnak
Not sure if this is already fixed in P7, but in P6 sometimes the catalog would not load properly... so one has to close pharo and open it again... probably not the best experience for non-pharo user. Also, if your user is using linux, they also need to have libcairo(i386) installed, otherwise

Re: [Pharo-users] memorizing data between tests

2018-09-09 Thread Peter Uhnak
Hi Ben, take a look at TestResource (its comment and subclasses). It should do what you are looking for. Peter On Sun, Sep 9, 2018 at 8:08 AM Ben Coman wrote: > Say I want to write ten tests for different aspects of a web service point. > Apart from the risk of relying on an external service,

Re: [Pharo-users] Configuring iceberg on Windows

2018-09-06 Thread Peter Uhnak
> I need to get past that error since I get it even when I install Moose via Metacello. Note that Moose depends on projects that are on github, so if it is misconfigured, then it will fail. Maybe you can provide both the ssh key and regular key/password? I use both and so far I had no problems

[Pharo-users] MetaLink after on a message with argument

2018-09-04 Thread Peter Uhnak
Hi, I'm trying to install an #after metalink to a MessageNode that has an argument, however it fails because the bytecode is missing the argument (I think). Note that #before control worked fine, so I am not sure whether this is a bug, not yet supported, or am I doing something wrong. code

Re: [Pharo-users] separate native window of same Pharo image

2018-08-16 Thread Peter Uhnak
> I believe this is a known Windows issue. Well this is more of a show-stopper than just an issue. Is the project maintained? Is Windows support something that is planned? Thanks, Peter On Thu, Jul 19, 2018 at 7:35 PM kmo wrote: > I believe this is a known Windows issue. I have certainly

Re: [Pharo-users] XML Writer not pretty printing

2018-08-16 Thread Peter Uhnak
ur-mileage-may-vary... > > parser := XMLDOMParser > on:' > > > > '. > > (parser parseDocument) > removeAllFormattingNodes; > prettyPrinted. > > Regards > Carlo > > On 14 Aug 2018, at 13:08, Peter Uhnak wrote: &

[Pharo-users] XML Writer not pretty printing

2018-08-14 Thread Peter Uhnak
Hi, I am trying to output a pretty printed document, but it seems that the configuration is being ignored doc := ' ' parseXML. String << [ :stream | doc printOn: stream beforeWritingDo: [ :writer | writer enablePrettyPrinting; enablePlatformSpecificLineBreak. writer formatter

Re: [Pharo-users] Spec "bindings"

2017-09-09 Thread Peter Uhnak
Hi Rob, I'm making a note to look at your proposals and I will discuss it with Stef later. > > he has more and younger braincells than me But not enough connections between them. The cells just sit there alone and are not talking to anyone. :( Peter

Re: [Pharo-users] YAML parser (2017)

2017-08-19 Thread Peter Uhnak
On Sat, Aug 19, 2017 at 02:45:28PM +0200, H. Hirzel wrote: > Peter, thanks for the confirmation that in your installation of the > PetitYAML grammar all tests are green. > > I wonder how you did it. As I've said, you need to update PetitParser; if there's no appropriate catalog entry, then

Re: [Pharo-users] YAML parser (2017)

2017-08-19 Thread Peter Uhnak
All my tests are green, so maybe you need to update PetitParser too to the latest (PetitParser-JanKurs.290) It is probable that Pillar loaded older version of PetitParser. Peter On Fri, Aug 18, 2017 at 10:56:30PM +0200, H. Hirzel wrote: > Hello again > > On 8/18/17, Peter Uh

Re: [Pharo-users] Installation done last week: Do I have Pharo 6.0 or Pharo 6.1?

2017-08-18 Thread Peter Uhnak
On Fri, Aug 18, 2017 at 07:16:30PM +0200, H. Hirzel wrote: > Thank you, Bernhard and Markus for confirming that Pharo is not > reporting the correct version number. > > But do you think I probably got 6.1 when I installed it on the 9th August > with > > curl get.pharo.org | bash Yes, you

Re: [Pharo-users] YAML parser (2017)

2017-08-18 Thread Peter Uhnak
t; my purposes. > > On 8/18/17, Peter Uhnak <i.uh...@gmail.com> wrote: > > Hi, > > > > Phil Back has kindly fixed the PetitYAML so it mostly works now. > > The only problem I've encountered was some weird misparsing of strings > > containing slashes,

Re: [Pharo-users] Installation done last week: Do I have Pharo 6.0 or Pharo 6.1?

2017-08-18 Thread Peter Uhnak
I don't know what was the exact reasoning why it was chosen to stay this way... 60505 is still 6.0, so somewhere between 60506 and 60510 is the split. :-) Peter On Fri, Aug 18, 2017 at 04:21:24PM +0200, H. Hirzel wrote: > Hello > > Pharo 6.1 was released on the 24th July 2017. > Thread

Re: [Pharo-users] YAML parser (2017)

2017-08-18 Thread Peter Uhnak
; > > --Hannes > > On 8/16/17, H. Hirzel <hannes.hir...@gmail.com> wrote: > > Are there any news about a YAML parser for Pharo 5 / 6.1? > > > > --Hannes > > > > On 5/29/17, Peter Uhnak <i.uh...@gmail.com> wrote: > >> Hi, > >>

Re: [Pharo-users] Preference to for not showing hidden files in the FileBrowser?

2017-08-17 Thread Peter Uhnak
There's no such option. I've created File Dialog ( https://github.com/peteruhnak/file-dialog ) which will be in P7 when I find the time to go through the incorporation process... which practically means September... Peter On Thu, Aug 17, 2017 at 01:05:25PM +0200, Guillermo Polito wrote: > On

Re: [Pharo-users] including Pillar in Pharo image by default

2017-08-11 Thread Peter Uhnak
A long time issue with Markdown was that there was no standardization (and when I used Pillar's MD export ~2 years ago it didn't work well). However CommonMark ( http://spec.commonmark.org/0.28/ ) has become the de-facto standard, so it would make sense to support it bidirectionally with

Re: [Pharo-users] including Pillar in Pharo image by default

2017-08-11 Thread Peter Uhnak
On Fri, Aug 11, 2017 at 09:14:01PM +0200, Esteban Lorenzano wrote: > > > On 11 Aug 2017, at 21:10, Esteban Lorenzano wrote: > > > > hi, > > > >> On 11 Aug 2017, at 18:57, Cyril Ferlicot D. >> > wrote: > >> >

Re: [Pharo-users] including Pillar in Pharo image by default

2017-08-11 Thread Peter Uhnak
think about Pharo 70 as the core and birth of a new generation of > imageS > > I will restart to revisit Pillar once I'm done with the Lecture at Prague. > > Stef > > On Fri, Aug 11, 2017 at 6:52 PM, Peter Uhnak <i.uh...@gmail.com> wrote: > > Hi, > > > &

[Pharo-users] including Pillar in Pharo image by default

2017-08-11 Thread Peter Uhnak
Hi, I would like to propose including Pillar in the Pharo image by default. My reasoning: Since we are moving to git, and most people will use github, gitlab, and the likes, it is expected to include a README.md file (or possibly more extensive documentation) alongside the code. Which means

[Pharo-users] Playground doesn't respect LF endings

2017-08-07 Thread Peter Uhnak
Hi, when I paste a text into the playground with line endings containing just LF (unix-style), then navigation to beginning/end of a line instead jumps to the beginning/end of the text. (I guess it is hardcoded to CR only). Right now I have to execute `Clipboard clipboardText

[Pharo-users] sharing context/variables between multiple playgrounds

2017-08-07 Thread Peter Uhnak
Hi, is there a way to share context/variables between multiple playgrounds? E.g. in Playground window 1 I declare ``` factor := 70. ``` and in Playground window 2 I do (without declaring `factor`) ``` 5 * factor. "-> 350" ``` Thanks, Peter

Re: [Pharo-users] Lazy-initialization patterns

2017-08-05 Thread Peter Uhnak
Personally I prever to avoid long lazy initializations, so I have it nice and tidy in a single method. MyClass>>#property ^ property ifNil: [ property := self bar collect: #food ] If I want to initialize the value in a separate method (typically for testing or reuse), then I prefer to

Re: [Pharo-users] Compiling lots of method source without debugger

2017-08-04 Thread Peter Uhnak
Hi, > This is my first time here so I hope this is the right place to ask > questions. It is. :) > I want to be able to compile these methods programatically without > interruptions (using method source strings only) and gather all compiler > errors that occur. What would be the best way to go

Re: [Pharo-users] step-by-step trace of object creation and messaging?

2017-08-01 Thread Peter Uhnak
Hi David, > I am new to Pharo As in you've never seen Pharo before, or that you have only limited knowledge? All the examples are just methods in the system. E.g. the simple example is defined in class-side of BormExampleDiagrams in method #exampleDataFlows. So you could run it from

Re: [Pharo-users] How to export critics from Critic Browser?

2017-07-31 Thread Peter Uhnak
Hi, I did a small experiment on Travis short while ago that collects the QAs and prints them to output log. Script (you would be interested only in the Smalltalk part of the code): https://github.com/peteruhnak/ugly-pharo-code/blob/master/qa-testing.sh Travis output (expand line 400):

Re: [Pharo-users] Iceberg and removing packages

2017-07-30 Thread Peter Uhnak
This was supposedly fixed in April https://github.com/pharo-vcs/iceberg/issues/317 however I had the same issue ~two months ago, so I had to delete the packages by hand. P On Sun, Jul 30, 2017 at 11:04:20AM -0300, Esteban A. Maringolo wrote: > Hi, > > I'm playing around with Iceberg in

Re: [Pharo-users] NeoCSV change proposal

2017-07-23 Thread Peter Uhnak
Thank you Sven! Peter On Sun, Jul 23, 2017 at 01:59:41PM +0200, Sven Van Caekenberghe wrote: > > > On 23 Jul 2017, at 09:55, Peter Uhnak <i.uh...@gmail.com> wrote: > > > > Ah, ByteArrayMap, I was trying ByteArray. > > ByteArrayMap is not a class, it is still

Re: [Pharo-users] NeoCSV change proposal

2017-07-23 Thread Peter Uhnak
y: { $,. $". Character cr. Character lf } ] bench. > > "'2,200,668 per second'" > > > > [ ByteString findFirstInString: s10 inCharacterSet: ',"', String crlf > > startingAt: 1 ] bench. "'1,187,324 per second'" > > [ ByteString findFirstInStr

Re: [Pharo-users] NeoCSV change proposal

2017-07-22 Thread Peter Uhnak
second'" [ ByteString findFirstInString: s100 inCharacterSet: ',"', String crlf startingAt: 1 ] bench. "'165,526 per second'" #includesAny: seems to be the best by far. Storing the tested characters didn't improve it by much. Peter On Sat, Jul 22, 2017 at 06:51:31PM +020

[Pharo-users] is Renraku general purpose rule checker?

2017-07-22 Thread Peter Uhnak
Hi, I'm looking at Renraku and I wonder, would Renraku be a good start for general-purpose checking? E.g. I have a domain, where Person cannot drink if they are underage. So I've created a simple ReAbstractRule subclass that does basic check SomeRule>>basicCheck: anEntity ^ anEntity

Re: [Pharo-users] NeoCSV change proposal

2017-07-22 Thread Peter Uhnak
attached On Sat, Jul 22, 2017 at 02:12:10PM +0200, Peter Uhnak wrote: > Hi, > > this is a continuation of an older thread about quoting fields only when > necessary. ( > http://forum.world.st/NeoCSVWriter-automatic-quotes-td4924781.html ) > > I've attached fileou

[Pharo-users] NeoCSV change proposal

2017-07-22 Thread Peter Uhnak
Hi, this is a continuation of an older thread about quoting fields only when necessary. ( http://forum.world.st/NeoCSVWriter-automatic-quotes-td4924781.html ) I've attached fileouts of NeoCSV packages with the addition (I don't know if Metacello can file-out only changesets). The change

[Pharo-users] best naming practices for (file) format reading/writing

2017-07-22 Thread Peter Uhnak
Hi, I've seen (and I use) different naming conventions when reading/writing from files/streams... e.g. MyReader new readFromStream: aStream. "-> aModel" MyWriter new writeToStream: aModel. "-> aStream" or (MyReader new on: aStream) upToEnd. "-> aModel" (MyWriter new on: aStream) nextPut:

Re: [Pharo-users] Iceberg + github without github account

2017-07-21 Thread Peter Uhnak
In Iceberg (Version Control) settings, there should be an option "enable Metacello (or Monticello?) integration" that should disable this iirc. On Fri, Jul 21, 2017 at 08:35:23PM +0200, Herby Vojčík wrote: > Hello! > > I use Iceberg with metacelloIntegration: true to have gitlocal:// protocol >

Re: [Pharo-users] Mysterious problem in loading Pharo

2017-07-17 Thread Peter Uhnak
m: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of > Peter Uhnak > Sent: 16 July 2017 15:40 > To: Any question about pharo is welcome <pharo-users@lists.pharo.org> > Subject: Re: [Pharo-users] Mysterious problem in loading Pharo > > I had this problem f

Re: [Pharo-users] Mysterious problem in loading Pharo

2017-07-16 Thread Peter Uhnak
I had this problem for several months (and still do), and so far I didn't manage to figure out what is the actual cause. Sometimes it fixes itself (close Pharo and open again), sometimes opening it with different VM (and then reopen with the original) helps, and sometimes I have to restart

Re: [Pharo-users] [Pharo-dev] integrating FileDialog into Pharo 7

2017-07-10 Thread Peter Uhnak
Done. What next? Peter On Mon, Jul 10, 2017 at 12:46:50PM +0200, Pavel Krivanek wrote: > We should work on integration of it. Firstly please move tests to a > separate package. > > Cheers, > -- Pavel > > 2017-07-10 12:34 GMT+02:00 Peter Uhnak <i.uh...@gmail.com&g

[Pharo-users] integrating FileDialog into Pharo 7

2017-07-10 Thread Peter Uhnak
Hi, some people expressed interest in integrating File Dialog https://github.com/peteruhnak/file-dialog into Pharo as the default file dialog. Is it something people are interested in, or is the current solution sufficient for them? Peter

Re: [Pharo-users] 2 questions around gitlab, gitfiletree, BaselineOf

2017-07-07 Thread Peter Uhnak
Hi, I had similar issues when using gitfiletree... and in the end I've ended up with this https://github.com/peteruhnak/pharo-scripts/blob/master/config/5.0/openponk-autoload.st it is not the prettiest thing, however it is automated so I didn't bother improving it. * automatically loads

Re: [Pharo-users] Saving to local git and "Loading all file names from http://...pharo5/inbox"

2017-06-19 Thread Peter Uhnak
ion to the author of original script - Peter Uhnak. > > The goal is to avoid contacting server (takes alot of time and blocks the > image) every time you save a package to a filetree repo. As I understand > repositories in question are kind of special and are always checked, so > re

Re: [Pharo-users] Wiring objects, IoC and Service Locator

2017-06-08 Thread Peter Uhnak
On Thu, Jun 08, 2017 at 08:02:04AM -0700, Attila Magyar wrote: > Vitor Medina Cruz wrote > > This is exactly my concern! Sure, for small stuff that is not a problem, > > but what if you have a big app? > > I don't think it makes any difference. Scale can make all the difference. Imagine the

Re: [Pharo-users] Wiring objects, IoC and Service Locator

2017-06-08 Thread Peter Uhnak
On Thu, Jun 08, 2017 at 08:46:15AM -0300, Vitor Medina Cruz wrote: > This is true for IoC DI containers, but I don't think it applies for > service locator, which, I think, could not be considered a framework > approach. Actually, I think being a framework is the big problem of the of > the

Re: [Pharo-users] Wiring objects, IoC and Service Locator

2017-06-07 Thread Peter Uhnak
> I don't see what is special about this. You can easily arrange instance > creation order with methods on the class-side of your domain classes. I will not use the term "class", but rather a "service" (service can be just a single class, but that is not always the case). The point of inversion

Re: [Pharo-users] is it related to Freetype or Athens?

2017-06-07 Thread Peter Uhnak
On Tue, Jun 06, 2017 at 07:33:04PM +0200, Hilaire wrote: > Hi there, > > A Dr. Geo user on Ubuntu 64bits 16.04 got that buggy rendering of the > canvas, then on some situation the rendering completely stop on a red > screen, with a stack showing may be a zero divide error. I did not get > access

Re: [Pharo-users] Bloc/Brick/Spec

2017-06-06 Thread Peter Uhnak
* Bloc - low level library (think basic shapes, rectangles, ...) * Brick - widget library on top of Bloc akin to the widget part of Morphic (buttons, checkboxes, ...) * Spec - UI framework with adaptable backend; currently using Morphic as a backend, however once Bloc/Brick matures, Bloc/Brick

Re: [Pharo-users] Saving selected changes in Monticello

2017-06-05 Thread Peter Uhnak
Komitter could indeed help you, see https://www.peteruhnak.com/blog/2016/08/12/fine-grained-committing-and-extending-nautilus/ Peter On Mon, Jun 05, 2017 at 08:27:23AM +0200, serge.stinckw...@gmail.com wrote: > Kommiter available in default image allows you do cherry pick quite easily. > >

[Pharo-users] snap morphs/windows to each other when dragging

2017-06-04 Thread Peter Uhnak
Hi, is it possible to tell windows to "snap" to other windows when dragging? So e.g. when I am dragging Playground window, it will try to snap side by side with a close-by another window, so they don't overlap (unless I e.g. press shift or something). Thanks, Peter

Re: [Pharo-users] Porting Transducers to Pharo

2017-05-31 Thread Peter Uhnak
You can also give a try to use SIF (Smalltalk Interchange Format) https://github.com/peteruhnak/sif There is parcel file in VW subfolder, and docs here: https://github.com/peteruhnak/sif/blob/master/docs.md I've used it about year ago for some small code exchanges; but of course you will have

[Pharo-users] YAML parser (2017)

2017-05-29 Thread Peter Uhnak
Hi, do we have a working parser for YAML? There's PPYAMLGrammar (in PetitParser), however it doesn't seem to work in Pharo 6 at all (not even tests pass). In Pharo 5 the tests are green, but using it on YAML content still fails... with small fix I managed it to "pass", however the output seems

Re: [Pharo-users] Ston feature idea?

2017-05-17 Thread Peter Uhnak
Just curious... why don't you use MSE? Peter On Wed, May 17, 2017 at 12:44:58PM +0200, Sven Van Caekenberghe wrote: > Hi Cyril, > > This can be done quite easily in STON, I will make you a small example and > add it to the unit tests. > > Sven > > > On 17 May 2017, at 12:19, Cyril Ferlicot

Re: [Pharo-users] Intro to git-only Pharo

2017-05-10 Thread Peter Uhnak
Hi, this is my (=not canonical) perspective On Wed, May 10, 2017 at 07:56:19AM +0200, Joachim Tuchel wrote: > Hi guys, > > please forgive me if this mail is a sign of ignorance. I am not a > regular Pharo user and one of the reasons for this is that I didn't > like most of the source management

Re: [Pharo-users] [ANN] git migration tool

2017-05-06 Thread Peter Uhnak
Hi, the code generated from the migration tool can be used by both Iceberg and GitFileTree (because they both use FileTree format to store the code). So you can just migrate your code, install Iceberg and you're good to go. I can write a blog post about this I guess... (maybe I could add the

Re: [Pharo-users] Epicea vs RB refactorings

2017-05-03 Thread Peter Uhnak
anyone? On Wed, Apr 26, 2017 at 11:19:07AM +0200, Peter Uhnak wrote: > Hi, > > I'm under the impression that Epicea is supposed to replace RB refactorings > at some point. > > If that is true, is it currently possible to build refactorings by hand? > > For

Re: [Pharo-users] Put FTTableMorph layout into ComposableModel lyout

2017-05-02 Thread Peter Uhnak
Hi, you can look at chapter 9.1 in the Spec Booklet http://files.pharo.org/books-pdfs/spec/2017-01-23-SpecBooklet.pdf it shows how to integrate any morph inside a Spec Model. But did you look at FastTabelModel? It uses FTTableMorph underneath, so maybe it can already do what you need. Peter

Re: [Pharo-users] Spec Adapter Advice

2017-04-29 Thread Peter Uhnak
On Sat, Apr 29, 2017 at 09:24:28PM +0200, Denis Kudriashov wrote: > 2017-04-29 20:36 GMT+02:00 Peter Uhnak <i.uh...@gmail.com>: > > > > > > > You can set the bindings on the class side, but I currently don't see a > > way > > > to say "ope

Re: [Pharo-users] Spec Adapter Advice

2017-04-29 Thread Peter Uhnak
On Sat, Apr 29, 2017 at 09:22:46PM +0200, Denis Kudriashov wrote: > Hi > > 2017-04-29 20:36 GMT+02:00 Peter Uhnak <i.uh...@gmail.com>: > > > No, it is not. It has hard wired bindings from certain names to morphic > > adapters, but only if you don't actually specify

Re: [Pharo-users] Spec Adapter Advice

2017-04-29 Thread Peter Uhnak
On Fri, Apr 28, 2017 at 04:20:57PM -0400, Rob Rothwell wrote: > Hi Peter, > > However, I have discovered by creating new ComposableModel, WindowModel, > and MorphicWindowAdapter classes that even the SpecInterpreter itself is > hard-wired to use Morphic. No, it is not. It has hard wired bindings

Re: [Pharo-users] Spec Adapter Advice

2017-04-28 Thread Peter Uhnak
it took me two weeks and I've created two extra tools to understand the old one and there are still some special exceptions), so then we can rethink the way it is done. Peter > > 2017-04-28 0:04 GMT+02:00 Peter Uhnak <i.uh...@gmail.com>: > > > Hi Rob, > > > >

Re: [Pharo-users] Spec Adapter Advice

2017-04-28 Thread Peter Uhnak
ll the right pieces > are there and a lot of this could mostly be "just work" once I get going. > > Thanks again, > > Rob > > On Thu, Apr 27, 2017 at 6:04 PM, Peter Uhnak <i.uh...@gmail.com> wrote: > > > Hi Rob, > > > > I guess th

Re: [Pharo-users] Spec Adapter Advice

2017-04-27 Thread Peter Uhnak
Hi Rob, I guess the best resource at the moment is to just look at existing adapters. But here are some thoughts to get you started: (Spec) ComposableModel has as its widget (Spec) Adapter Adapter has as its widget the actual visual component, which currently means Morphic. The simplest

Re: [Pharo-users] MOOC offline download

2017-04-27 Thread Peter Uhnak
Everything is also on github so you can clone it locally https://github.com/SquareBracketAssociates/PharoMooc On Thu, Apr 27, 2017 at 11:50:22PM +0800, Ben Coman wrote: > I was just chatting with someone with limited Internet who was looking to > odownload the mooc files [1] for use offline.

Re: [Pharo-users] Sending byte array in a JSON format

2017-04-26 Thread Peter Uhnak
It is also possible that ZnEasy is doing some encoding transformations that breaks it; after all, you are retrieving binary data as text data, so encoding should be applied on it. Peter On Wed, Apr 26, 2017 at 04:50:04PM +0200, Sven Van Caekenberghe wrote: > I am puzzled by how they actually

Re: [Pharo-users] Sending byte array in a JSON format

2017-04-26 Thread Peter Uhnak
Maybe the content is not properly stored in the JSON on github' side? But you can use base64 in `accept:` to make it work. json := STONJSON fromString: (ZnClient new url: 'https://api.github.com/gists/5503544'; accept:

[Pharo-users] Epicea vs RB refactorings

2017-04-26 Thread Peter Uhnak
Hi, I'm under the impression that Epicea is supposed to replace RB refactorings at some point. If that is true, is it currently possible to build refactorings by hand? For example in RB I often do: ``` model := RBNamespace new. model defineClass: ('<1s> subclass: #<2s>instanceVariableNames:

[Pharo-users] improving audio/video quality of pharo days recordings

2017-04-25 Thread Peter Uhnak
Hi, we had a small discussion on discord about improving the audio/video quality of recordings of past pharo days, where many recordings are really hard to see (or completely unreadable), or the presenter is really hard to understand (especially if they speak quietly or have a strong accent).

Re: [Pharo-users] Hot to retrieve values from Nested Dictionaries

2017-04-24 Thread Peter Uhnak
Maybe we could introduce `@` message, so one can chain them and then even execute keyword without parenthesis Dictionary>>@ aKey ^ at: aKey dict @ 'key1' @ 'key2' @ 'key3' dict @ 'key1' @ 'key2' @ 'key3' select: [ :each | ... ] I'm always adding this when hacking around, maybe we

Re: [Pharo-users] Octal multiplication

2017-04-23 Thread Peter Uhnak
On Sun, Apr 23, 2017 at 06:13:42AM -0700, nacho wrote: > Hello, > This could sound like a dumb question, it may be. > If I print: > 8r3 * 8r3 I get 9. > It seems that Pharo converts first to decimal and then performs the > multiplication. How do I get the result in octal which should be 8r11?

Re: [Pharo-users] best practices for using external files for testing

2017-04-18 Thread Peter Uhnak
tract all test files in the Configuration > and then use a method in abstract test class to access test files. > Cheers, > > Hernán > > > 2017-04-15 13:52 GMT-03:00 Peter Uhnak <i.uh...@gmail.com>: > > > Hi, > > > > is there a common/best practice

Re: [Pharo-users] Exporting Packages to Cincom Smalltalk (VisualWorks)

2017-04-18 Thread Peter Uhnak
o Roassal export classes, which does > something similar to the code you pointed me to (yours seems more > tidy). > > Thanks again, > > Esteban A. Maringolo > > > 2017-04-17 12:57 GMT-03:00 Peter Uhnak <i.uh...@gmail.com>: > > Some time ago I hacked to

Re: [Pharo-users] How childrenBlock: in TreeModel works

2017-04-17 Thread Peter Uhnak
I guess something like this could work... ``` d := { Dictionary with: #n -> 'whatever' with: #d -> { Dictionary with: #a -> #AA with: #b -> #BB. Dictionary with: #c -> #CC with: #d -> #DD }.

Re: [Pharo-users] best practices for using external files for testing

2017-04-17 Thread Peter Uhnak
t I have not felt the > need so far to do this. > On Sat, 15 Apr 2017 at 19:52, Peter Uhnak <i.uh...@gmail.com> wrote: > > > Hi, > > > > is there a common/best practice for using external files in tests? > > > > In my specific case I am interest

Re: [Pharo-users] Exporting Packages to Cincom Smalltalk (VisualWorks)

2017-04-17 Thread Peter Uhnak
Some time ago I hacked together a very simple thing that generates VW XML from code represented in Moose/UML... I guess you could use it as a starting point: https://github.com/OpenPonk/class-editor/tree/master/repository/UML-CodeGenerator.package/UCMVWXmlExporter.class Also take a look at SIF

[Pharo-users] best practices for using external files for testing

2017-04-15 Thread Peter Uhnak
Hi, is there a common/best practice for using external files in tests? In my specific case I am interested in git-based projects, where I have a big (~1MB) file stored in repository and I would like to use it in my tests. For GitFileTree project I could presumably use the following to access

Re: [Pharo-users] Methods & Classes using the command line.

2017-04-13 Thread Peter Uhnak
This should be similar to having the code in playground and executing it at once. I guess it's more forgiving. What I sometimes do to work around it is to store the created class into variable, or use symbol and asClass cast e.g. cls := Object subclass: #TestClass. cls compile:'meth'. or

[Pharo-users] why is adding instance variables so slow?

2017-04-12 Thread Peter Uhnak
Hi, does anyone know why adding instance variables is so slow? I did some quick benchmarks (see below), resulting in more than order of magnitude speed difference between having it in the class definition and adding it later. In fact it is still much faster to delete the class and then

Re: [Pharo-users] How childrenBlock: in TreeModel works

2017-04-01 Thread Peter Uhnak
Hi, I wanted to point you to the new Spec book ( http://files.pharo.org/books-pdfs/spec/2017-01-23-SpecBooklet.pdf ), but apprently it's not there. Many Spec widgets have examples accompanying them, so always check class side (not for all though). For TreeModel you can see couple there - good

Re: [Pharo-users] Morphic component to display images/pictures

2017-04-01 Thread Peter Uhnak
The mooc challenge (no #4) doesn't really address any of the things I am interested in (the result is the same as what inspector can currently do). Spec has ImageModel, but that doesn't even have scrollbars... anyway... I am currently refactoring Spec interpreter and after that I would like to

[Pharo-users] Morphic component to display images/pictures

2017-03-30 Thread Peter Uhnak
Hi, do we have a Morphic/Brick/whatever component for displaying pictures/images in Pharo? The "best" I found was GTInspector extension on PNG files, which provides scrollbars, however I would like to also have: 1) zooming with mousewheel (now it scrolls vertically) 2) dragging the image

Re: [Pharo-users] using UFFI in non-crashing way

2017-03-26 Thread Peter Uhnak
On Sun, Mar 26, 2017 at 05:45:04PM +0200, Esteban Lorenzano wrote: > > > On 26 Mar 2017, at 15:40, Peter Uhnak <i.uh...@gmail.com> wrote: > > > > Hi, > > > > is it possible to use UFFI and avoid crashing the image when the called > > code segfaults

  1   2   3   >