Re: [Pharo-users] Macros?

2018-05-25 Thread Clément Bera
On Sat, May 26, 2018 at 8:07 AM, Denis Kudriashov wrote: > Hi > > 2018-05-26 8:46 GMT+03:00 Clément Bera : > >> Just mentioning another use-case: >> >> getDatabaseInstance >> ^ (Production CifTrue: [Database] CifFalse: [MockDatabase]) new >

Re: [Pharo-users] Macros?

2018-05-25 Thread Clément Bera
n the image for this case right now but it's probably a couple lines of code with Reflectivity. On Sat, May 26, 2018 at 7:28 AM, Clément Bera wrote: > > > On Fri, May 25, 2018 at 10:44 PM, Esteban Lorenzano > wrote: > >> >> >> On 25 May 2018, at 17:

Re: [Pharo-users] Macros?

2018-05-25 Thread Clément Bera
On Fri, May 25, 2018 at 10:44 PM, Esteban Lorenzano wrote: > > > On 25 May 2018, at 17:30, Clément Bera wrote: > > What about a preprocessor like the Java preprocessors ? The Truffle > project relies heavily on that for high performance Java and it's quite > nice. It

Re: [Pharo-users] Macros?

2018-05-25 Thread Clément Bera
What about a preprocessor like the Java preprocessors ? The Truffle project relies heavily on that for high performance Java and it's quite nice. It's difficult to do that in Smalltalk right now. I think if you want to do what are asking for you just need to write a bytecode compiler extension. I

Re: [Pharo-users] Saving a Smalltalk Project

2018-05-03 Thread Clément Bera
That is the answer I would give: Biggest Smalltalk community in Silicon valley is likely the Lam Research one (dozens of devs). On my blog post talking about Smalltalk, I have 2k views per Smalltalk community-wide audience post, so the community is at least that big. Smalltalk conferences (Smallta

Re: [Pharo-users] Literals

2018-04-27 Thread Clément Bera
The guy who asked the question said: "...when you want to shorten some object initialization" Using ClassVariable is an alternative way to shorten object initialization, reading a ClassVariable is almost the same performance as reading a literal, so that looked like a good alternative to me. Both

Re: [Pharo-users] Literals

2018-04-27 Thread Clément Bera
Not really. You can use ClassVariables though. Here's an example for Sets: Object subclass: #MyClass instanceVariableNames: '' classVariableNames: 'MyClassVar' package: 'MyPackage' MyClass class>>initialize super initialize. MyClassVar := Set new. MyClass>>foo self bar: MyClassVar

Re: [Pharo-users] Where do we go now ?

2018-04-13 Thread Clément Bera
"Alpha software can be unstable and could cause crashes or data loss" [1] Experiencing instability, crashes and data loss in the alpha version of a software, including Pharo alpha, is to be expected and nothing to be surprised about. The support of the Pharo stable version (currently 6.1) has sign

Re: [Pharo-users] Slower

2018-04-04 Thread Clément Bera
Hi Hilaire, Do you have to use the world or Morphic at all ? I wrote 2 different real-time 2D games at 50fps in Pharo [1,2]. I tried using Morphic but that was crazy slow I could not even get 20fps. Instead I use direct bindings to Cairo surface and SDL2 window and I don't open the world morph at

Re: [Pharo-users] Porting Transducers to Pharo

2018-03-21 Thread Clément Bera
On Fri, Jun 2, 2017, 17:05 Steffen Märcker wrote: > Dear all, > > thanks for the many suggestions. I didn't had time to test all > import/export ways yet. But for now, I can report on two: > > 1) NGFileOuter > Unfortunately It raised several MNUs in my image. I'll investigate them > later. > > 2)

Re: [Pharo-users] MiniScheme in Pharo

2018-03-18 Thread Clément Bera
p.3 simpliciyty -> simplicity p.4 we will have the define their semantics. -> to define ? I am not sure I understand the sentence p.10 and may converted on the fly -> and maybe ? I am not sure I understand the sentence At the beginning I started to read and understood nothing, then I read a 24 s

Re: [Pharo-users] Please rejoin Discord

2018-03-10 Thread Clément Bera
I think the roles got changed I am no longer admin (Note that it does not really matter since I did not do much admin work but still) On Sat, Mar 10, 2018 at 11:48 AM, Dimitris Chloupis wrote: > Hey guys after my mistake we got "hacked" and someone banned all our > members in Discord > > I have

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-10 Thread Clément Bera
lve. > Cheers, > > Hernán > > 2018-02-10 9:47 GMT-03:00 Clément Bera : > > Hi, > > > > In short, everything that is not namespace/module compatible will be > > deprecated/changed/removed in the future, so it is not recommended to use > > it. > >

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-10 Thread Clément Bera
o look up MyProject.Array, no? > > So if the argument for asClass is based on future addition of modules, > then I will need to manually change it anyway regardless of what approach I > used, because I don't know in which namespace the class will end up. > > Am I missing something?

Re: [Pharo-users] canonical way to convert Symbol into Class (retrieve class by its name)

2018-02-10 Thread Clément Bera
Hi, In short, everything that is not namespace/module compatible will be deprecated/changed/removed in the future, so it is not recommended to use it. a.2) #Array asClassInEnvironment: Smalltalk globals b.1) Smalltalk globals at: #Array => Ok-ish, note that you may need to change 'Smalltalk globa

[Pharo-users] Problem with Traditional and Simplified Chinese parsing in Pharo

2018-01-29 Thread Clément Bera
Hi, I am currently parsing lua and JSON-like file in Pharo. They contain both Simplified and Traditional Chinese characters for comments and for strings displayed in the UI. Lua files are parsed correctly. However the JSON-like files aren't. In attachment I put one of the problematic file with Si

Re: [Pharo-users] looking for another iterator :)

2018-01-21 Thread Clément Bera
I don't think we do. Do you need it on SequenceableCollection or HashedCollection too ? Recently I was trying to iterate over the first N elements of a collection and since there was no #first:do: I used #from:to:do:. I guess you could use that too: aCollection from: 1 to: (aCollection size min:

Re: [Pharo-users] How to write a little REPL

2017-11-28 Thread Clément Bera
There is a REPL Image we use for VM debugging. It's a REPL in the command line and in the VM Simulator. File-in in attachement to load and start the REPL. On Tue, Nov 28, 2017 at 8:18 AM, Stephane Ducasse wrote: > Sorry I wanted to have it in pharo :) > > On Mon, Nov 27, 2017 at 3:56 AM, Holge

Re: [Pharo-users] Can we halt on memory growth beyond a limit?

2017-10-24 Thread Clément Bera
Hi, You can start the VM with this parameter: --memory [mk]use fixed heap size (added to image size) When the memory is reached you have an out of memory error. Check --help on the VM. On Tue, Oct 24, 2017 at 10:15 PM, PAUL DEBRUICKER wrote: > I'm trying to get some understanding about

Re: [Pharo-users] Pharo and instance variables ...

2017-10-17 Thread Clément Bera
On Wed, Oct 18, 2017 at 7:07 AM, James Ladd wrote: > Hey David, > > If you could only access instance variables in the class that defined them > and therefore only in a subclass via an accessor / mutator method w that be > a big problem in your view? > Yes. I don't want to have to define access

Re: [Pharo-users] Music beat detection and 60FPS graphics on Pharo?

2017-10-14 Thread Clément Bera
Hi Phil, I did that using Ronie's OpenAL binding and Merwann's wav parser back in 2014-2015: MCSmalltalkhubRepository owner: 'ronsaldo' project: 'OpenAL' MCSmalltalkhubRepository owner: 'MerwanOuddane' project: 'WAVParser' I did things such as (build yourself something derived from this code I

Re: [Pharo-users] Force headless mode

2017-09-26 Thread Clément Bera
Or write a script that obfuscate the code. Not so hard to do. On Tue, Sep 26, 2017 at 5:13 PM, Christophe Demarey < christophe.dema...@inria.fr> wrote: > Hi > > What about deploying a minimal image without UI ? > But, as you probably know, headless mode does not prevent to dump the code. > > Chr

Re: [Pharo-users] X11 options on Ubuntu VM / Athens rendering problems

2017-09-24 Thread Clément Bera
der in the future making it work on the latest Pharo version on multiple OS if it makes sense to show people how to do it. I'm busy with other concerns right now. Anyway, it's just one approach, you can use another one. > Cheers, > > Jeff > > > > > > On Sun

Re: [Pharo-users] X11 options on Ubuntu VM / Athens rendering problems

2017-09-24 Thread Clément Bera
Hi, I describe in the next paragraphs what I do to build application with Pharo at 50 fps. Now I am using a SDL2 window with OSWindow and not the default Pharo window for rendering. There is a fullscreen option with OSWindow, I don't use it but I've just tried it works fine. To use Athens/Cairo I

Re: [Pharo-users] CodeImporter. 256 literals limit

2017-08-29 Thread Clément Bera
Hi, If your tool works in Pharo 6, you can use the other bytecode set which supports up to 32k literals. To do so, go to: World Menu > Settings > Compiler > Encoder and pick SistaV1 instead of V3PlusClosures Try to load your code. The default Pharo 6 VM supports both bytecode sets. Alternatively

Re: [Pharo-users] Pharo 6 / VM crashes

2017-04-30 Thread Clément Bera
Hi, About the best way to help... A reproducible case that we (VM developers) can reproduce easily is the best way to help. If we do not have a way to reproduce your bug, we cannot do anything about it. The best is an image which crashes immediately after start-up or a do-it that reliably crash t

Re: [Pharo-users] Need help opening image

2017-03-12 Thread Clément Bera
Hi, You need a VM with the SqueakV3 memory manager and compiled in the past few months for Mac OS X Sierra support. All recent Pharo VM are compiled with the Spur memory manager leading to this error “This interpreter (vers. X) cannot read image file (vers. 6505)”. I would try the latest VM from

Re: [Pharo-users] why is concat of Symbols a string?

2017-03-04 Thread Clément Bera
Hi, All symbols are interned in the Symbol table. If one does (#foo , #bar , #baz) and each returned value would be a symbol, then both #foobar and #foobarbaz would be registered in the symbol table. I would guess that's why the concatenated value is a string and not a symbol, to avoid registerin

Re: [Pharo-users] Pharo Spur 64 VM

2017-03-02 Thread Clément Bera
Hi Raffaello, Reportedly, the VM without the JIT (pure interpreter, also called PharoS or StackVM) works on windows 64 and FFI works with it if the VM compiled with clang but not with gcc. There is no configuration for Pharo right now. It should not be hard to add a pharo configuration to have the

Re: [Pharo-users] [Stupid Benchmarks] C++ vs Pharo

2016-12-17 Thread Clément Bera
If I am correct, when you do: double x=0; while(x<10) { x = x+1; } C++ compiles the + to double operation. In Pharo, this code: |x| x := 0. 1 to: 10 do:[:each| x := x +1] is using SmallInteger operations. The code you wrote is fully inlined in Cog's JIT (no message s

Re: [Pharo-users] Cog VM on Raspberry Pi ?

2016-10-18 Thread Clément Bera
The VM you use is the fastest one available. It's slower mostly due to non Smalltalk concerns (processor architecture, energy consumption, frequency, overall hardware). There is an abstraction over the back-ends in the JIT and it could be that overall the JIT is a little bit more optimised for in

Re: [Pharo-users] Debugger with inlined methods

2016-10-13 Thread Clément Bera
> > Regards, > Vitor > > On Wed, Oct 12, 2016 at 9:38 AM, Clément Bera > wrote: > >> The simulation of primitives is done in Context>>#doPrimitive:method:r >> eceiver:args: >> >> Basically, specific numbers are simulated in the image while othe

Re: [Pharo-users] Debugger with inlined methods

2016-10-12 Thread Clément Bera
The simulation of primitives is done in Context>>#doPrimitive:method:receiver:args: Basically, specific numbers are simulated in the image while other numbers are run using the VM code. Quick methods (what you call inlined methods) are encoded with primitive numbers between 256 and 512. If you lo

Re: [Pharo-users] Pharo5 download for linux - interpreter cannot read image file

2016-10-06 Thread Clément Bera
eas Sunardi >> wrote: >> >>> Thank you for the impressive quick response. Unfortunately, I have older >>> glibc. So now I'm struggling with compiling glibc 2.15 for 32 bit on my 64 >>> bit CentOS 6.5 machine. Not an easy thing to do. >>> >&

Re: [Pharo-users] Pharo5 download for linux - interpreter cannot read image file

2016-10-06 Thread Clément Bera
Thanks for reporting the problem. The error means the VM is incompatible with the image. There was a change of image format in Pharo 5, so the package has likely an old VM while the image has the new format, or the new VM while the image has the old format. Someone will look into that problem in

Re: [Pharo-users] Essential Documentation

2016-09-23 Thread Clément Bera
General documentation on all the base frameworks is present in the *Pharo by example* book. You can download it for free here: http://pharobyexample.org/versions/PBE1-2009-10-28.pdf Or here for the updated version: https://ci.inria.fr/pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSucc

Re: [Pharo-users] Fwd: [Vm-dev] unused-method removal vs. Spur compaction

2016-09-19 Thread Clément Bera
19, 2016 at 3:51 PM, Clément Bera > wrote: > > I am not sure this is the right mailing list. > > > > Spur32BitPreen could be used as part of the Pharo release process as > long as > > the compactor is not working well. This way released images can be more > >

Re: [Pharo-users] limits on number of instance variables and class variables

2016-09-11 Thread Clément Bera
Hello Ben, The limit you see for instance variables is due to: - Class format encoding (Memory manager dependent) - Bytecode set encoding (Bytecode set dependent) The 255 inst var limit is enforced both by: - the V3 Memory manager - the SqueakV3PlusClosures bytecode set. Now we have Spur instead

Re: [Pharo-users] Profiling

2016-09-08 Thread Clément Bera
On Thu, Sep 8, 2016 at 3:44 AM, Vitor Medina Cruz wrote: > Hello, > > While profiling some I/O code that takes ~20 seconds to execute under my > local image, the report says that about ~13 seconds is waste on > OtherProcesses -> ProcessorScheduler class>>idleProcess. I could not > understand what

Re: [Pharo-users] Performance vs Ruby performance

2016-09-07 Thread Clément Bera
What ruby runtime exactly ? The standard ruby interpreter, rubinius, JRuby ? What do you mean by performance ? Smallest time to run long computation ? Latency for web servers ? Pauses in real time applications ? The standard ruby interpreter is really slow (likely ~100 times slower than the Pharo

Re: [Pharo-users] Spur problem?

2016-09-07 Thread Clément Bera
Hi, I've never seen that error before. That looks interesting. You need to provide more information. For example the backtrace or something written in PharoDebug.log. Else, as suggested, set a breakpoint in malloc_error_break and try to figure out what is going on. On Wed, Sep 7, 2016 at 4:56 P

Re: [Pharo-users] 64bit support

2016-08-16 Thread Clément Bera
The 64 bits linux and mac VM have been working for more than 6 months. They've been in production in a company since April or something like that. Latest product are built by Travis and available here: https://bintray.com/opensmalltalk/vm/cog#files. Pharo provides a Pharo-flavored VM with a differe

Re: [Pharo-users] Programmatic generation of new class

2016-07-29 Thread Clément Bera
On old versions of Pharo you need to use: #subclass:instanceVariableNames:classVariableNames:poolDictionaries:package: That might be it. On Fri, Jul 29, 2016 at 6:14 PM, Peter Uhnak wrote: > Can you show the full trace? Because I am regularly doing something > similar without any problems. > In

Re: [Pharo-users] Spur Cog vs VW

2016-06-07 Thread Clément Bera
We measured Spur vs pre-Spur, but I am not sure we can measure VW without Cincom's approval. On Tue, Jun 7, 2016 at 7:56 AM, Gerry Weaver wrote: > Hi, > > I was reading about the VM stuff and assumed (wrongly) that the post > applied to that. Sorry for the noise. > > Thanks, > -G > > > -Orig

Re: [Pharo-users] parameters of the virtual machine

2016-05-25 Thread Clément Bera
; > > you should add that to a simple blog post :) > > > Stef > > Le 24/5/16 à 19:35, Clément Bera a écrit : > > Hi, > > Sorry the mail is quite long... I CC'd Nevena for section II, she used the > VM caches for type inference. > > *Section I. VM param

Re: [Pharo-users] parameters of the virtual machine

2016-05-24 Thread Clément Bera
Hi, Sorry the mail is quite long... I CC'd Nevena for section II, she used the VM caches for type inference. *Section I. VM parameters* * 46 size of machine code zone, in bytes* Well, the size of the machine code zone :-). To speed-up execution, the cog uses internally a JIT compiler whic

Re: [Pharo-users] Presenting Pharo in Greece

2016-05-13 Thread Clément Bera
I usually get it from http://files.pharo.org/ In media, pharoCheatSheet or flyer-cheat-sheet. On Fri, May 13, 2016 at 10:32 AM, Dimitris Chloupis wrote: > thanks any idea where i can get the card that contains the pharo syntax ? > > On Fri, May 13, 2016 at 10:33 AM stepharo wrote: > >> good lu

Re: [Pharo-users] What frameworks/libraries are available for creating programming languages with Pharo

2016-03-22 Thread Clément Bera
I think in addition of the parser/compilation chain, a language is about having a good IDE. The Pharo IDE depends more and more on the AST and not on the source code, so if your new language uses an AST polymorphic with the Smalltalk AST I guess you can have IDE tools for free (at least partly).

Re: [Pharo-users] Beginner's question on morphs

2016-03-13 Thread Clément Bera
Alternatively, I do that using a SDL window. This way, the production game can be launched using SDL and pharo headless, and not have the overhead of the morphic rendering loop. 2016-03-13 15:22 GMT+01:00 Henrik Nergaard : > http://ws.stfx.eu/1RCNV18R5J7E > > Best regards, > Henrik > > -Origi

Re: [Pharo-users] Get the code of a method - Artefact

2016-03-10 Thread Clément Bera
sourceCode is the best way to do it. It answers the original sources if available, and the decompiled sources if not available. 2016-03-10 11:22 GMT+01:00 Cyril Ferlicot : > Hi, > > Do you really need to decompile the method? A CompiledMethod know his > source code. > > See: Object methods first

Re: [Pharo-users] A new idea for a project: WarpSpeed (a C inliner)

2016-02-28 Thread Clément Bera
Hello, As Stephan Eggermont said, you need to make some measurements. There are a few big problems. In short, if the FFI call is going to do quite some computation (at least a few millisecond), assuming tinyC has performance similar to gcc or llvm, you may get faster, if the FFI call is going to

Re: [Pharo-users] I wish there were ePUB versions of Pharo books

2016-02-26 Thread Clément Bera
Alternatively, convertor from pdf to epub are available and free. Pillar can generate pdf. I know converting does not produce a file as good as if there were a pillar exporter, but that's a good enough temporary solution to me. 2016-02-25 22:54 GMT+01:00 stepharo : > Hi martin > > Why don't yo

Re: [Pharo-users] Compiling Pharo to C++

2016-02-16 Thread Clément Bera
Ok. Then I guess you can do something like Slang, which is used for the VM. Slang is a restrictive Smalltalk compiling to C. The slang compiler parses the code using the Smalltalk Compiler parser, then translate the Smalltalk AST to its own AST, do some manipulation based on pragmas available in

Re: [Pharo-users] Compiling Pharo to C++

2016-02-16 Thread Clément Bera
Are you sure C++ compilation is the best way ? There are a lot of flaws: Smalltalk needs to be restrictive or will be compiled to very slow code, you will loose debugging features, etc. I would try to integrate Pharo the same way lua is integrated in engines like Source2 from valve: you run your U

Re: [Pharo-users] Recommended VM on Raspberry Pi ?

2016-02-13 Thread Clément Bera
Hello Sven, You can use the VM with the JIT on the Pie now (Spur Cog VM). It is deployed by default on the recent raspberry pis and has millions of users for Squeak and Scratch since August 2015 (the raspberry pie fondation paid Tim for the ARM JIT on the Cog because of the size of their user base

Re: [Pharo-users] OS(Sub)Process on Raspberry Pi ?

2016-02-13 Thread Clément Bera
The latest FFI uses the old VM FFI which works on x86 and ARM and a new front-end which is seemingly x86 dependent. So OSSubProcess will work if you use FFI, but the old syntax not the new one. 2016-02-13 0:23 GMT+01:00 Mariano Martinez Peck : > Hi Sven, > > Since OSSubprocess uses the latest FF

Re: [Pharo-users] stupid spur question

2016-02-02 Thread Clément Bera
Hello, Both classes (SmallFloat64 and BoxedFloat64) are present on 32 bits and 64 bits by default right now. The code base is common between 32 and 64 bit images. It is possible to run a 32 bit image without the class SmallFloat64, but it is not the default behavior. There are no instances of Smal

Re: [Pharo-users] OSWindowSDL2

2016-01-24 Thread Clément Bera
Yeah I did in in early version of Pharo 5 (50155). 2016-01-24 10:10 GMT+01:00 stepharo : > the support for SDL2.0 should be better in Pharo50 (even if due to ffi > changes and new objcte format we may have some > glitches). > > > Le 23/1/16 22:45, Edwin Ancaer a écrit : > >> I'm not a smalltalk e

Re: [Pharo-users] Failling Tests are green if BlockCannotReturn exception

2016-01-11 Thread Clément Bera
2016-01-12 0:40 GMT+01:00 Vincent BLONDEAU < vincent.blond...@polytech-lille.net>: > Hi, > > > > It is expected. > > When you evaluate a block with a return, the method containing the block > definition (here testBlock) will return. > > So the test will pass. > > > > BTW, you don’t need to put a r

Re: [Pharo-users] Block that doesn't leak memory

2015-12-27 Thread Clément Bera
There is no way of creating such blocks currently. In fact only non local returns and debugging are problems as remote variables are accessed through an indirection. A lightweight block (to reuse your terms) with no outer context but accesses to remote temporary variables would work fine. The com

Re: [Pharo-users] [Question] Inspecting a collection of strings in Pharo 5 -- edit pane for a string?

2015-12-20 Thread Clément Bera
2015-12-20 8:15 GMT+01:00 Marcus Denker : > > > On Sat, Dec 19, 2015 at 9:24 PM, Tudor Girba wrote: > >> Hi, >> >> Strings are supposed to be immutable, and that is why we do not support >> editing by default :). >> >> > I do not think this is good... yes, it would be nice if *literal* strings >

Re: [Pharo-users] Installation

2015-12-02 Thread Clément Bera
Have you tried this (from this page: http://pharo.org/gnu-linux-installation#ubuntu-ppa-headless-vm ): Ubuntu (ppa) Ubuntu users can use the dedicated ppa to install Pharo in various ways: Install the headless Pharo VM only sudo add-apt-repository ppa:pharo/stable sudo dpkg --add-architecture i38

Re: [Pharo-users] How to play audio files with Pharo ?

2015-11-18 Thread Clément Bera
PharoSound was not working on Mac on my machine a few month ago. It was reported to be working on the Raspberry Pie and windows. 2015-11-18 12:23 GMT-03:00 Merwan Ouddane : > This summer I made a wav parser, there is an example to play wav files > with OpenAL. > > https://pharoweekly.wordpress.co

Re: [Pharo-users] Woden?

2015-07-18 Thread Clément Bera
Hello, You can try to reload ConfigurationOfOSWindow or try to get the latest ConfigurationOfOSWindow then load the bleeding edge, that might be it. Else for the #doSemanticAnalysisIn: you can try to flush the ASTCache (I think it's "ASTCache rest") Have fun 2015-07-18 17:54 GMT+02:00 Hilaire :

Re: [Pharo-users] PharoJS

2015-07-15 Thread Clément Bera
2015-07-15 12:34 GMT+02:00 Sean P. DeNigris : > Noury Bouraqadi-2 wrote > > Regarding the naming PharoJS is more than a bridge. It allows: > > -Develop and test apps in Pharo > > -Generate a javascript file for a standalone app > > How does it compare to Amber? Similar use case? > > The resulting

Re: [Pharo-users] PharoJS

2015-07-14 Thread Clément Bera
What is PharoJS ? Are you talking about Pharo on top of the Bert's SqueakJS VM ? If so, it starts, but some primitives fail making it freeze after a short while as you describe. It would be fun to have it running even though most of the Pharo folks went into the Amber direction for Pharo on Javas

Re: [Pharo-users] Slow compilation on one of my Windows PCs

2015-06-29 Thread Clément Bera
What about "1 tinyBenchmarks" ? Just to know if the VM is slower as a whole or only compilation / source access ? 2015-06-30 0:36 GMT+02:00 Jan Blizničenko : > And one another benchmark of linux in VM on that desktop PC: > Roassal loading - 58 s > compilations per second - avg: 262.4682, min: 25

Re: [Pharo-users] Silent compilation

2015-05-19 Thread Clément Bera
Silent compilation is when the compilation is done without telling any other objects. In the regular compilation of a method, for example, you tell all the class browsers opened that the method was compiled so that if a class browser shows an old version of the same method it is refreshed to show

Re: [Pharo-users] questionable questionable code critic

2015-04-24 Thread Clément Bera
Code critics relies on simple rules, such as the use of the selector #isKindOf: . It does not detect the second case because the rule is simple, though both are questionable. Best, 2015-04-24 18:24 GMT+02:00 Peter Uhnák : > Why does CodeCritic (QualityAssistant) considers this questionable > >

Re: [Pharo-users] Bytecodes in Nautilus

2015-04-01 Thread Clément Bera
Seemingly, UI-wise, it was not good to have a button for the bytecode. As I use it al the time, I reintroduced it in the menu and you can use the shortcut Cmd+b+b, which reportedly was better. In other IDE tools that nautilus you can't see anymore the bytecodes though. 2015-04-01 8:06 GMT-07:00

Re: [Pharo-users] Proxies: Subclassing nil

2015-03-31 Thread Clément Bera
Hey Sean, Now to create a proxy you need to subclass ProtoObject and not nil. This was changed years ago to avoid some issues. An example of issue that existed: when you subclass nil, as #doesNotUnderstand: is not implemented by default on your proxy, any proxy created receiving a message would c

Re: [Pharo-users] topics.pharo.org - Deep learning

2015-03-27 Thread Clément Bera
Hello, I believe that topics related to robotics are supervised by Noury Bouraqadi and / or Luc Fabresse. I think you should ask them for more information. You can find their mail on their web page (just type their names on google) Good luck, Clement 2015-03-27 9:51 GMT+01:00 Damien Cassou

Re: [Pharo-users] Fwd: [Pharo Consortium] Your organization application has been rejected.

2015-03-03 Thread Clément Bera
Well, this year google it looks like accepted less organizations. 2012: 180 organizations accepted. 2013: 177 organizations accepted. 2014: 190 organizations accepted. 2015: 137 organizations accepted. A few projects with ESUG could be nice for sure. But there we will have in the same issues agai

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-20 Thread Clément Bera
It depends on your OrderedCollection implementation. OrderedCollection has a variable size in memory. When instantiated, it has for example 10 slots, and if you have more than 10 objects, it needs to change its size to hold more slots. The current implementation relies on an indirection to an arr

Re: [Pharo-users] What happens to saved inspectors?

2015-02-18 Thread Clément Bera
Hey, Inspectors are different between Moose and Pharo 3. Can you precise, are you using the Glamour inspector, the EyeInspector or the old Morphic inspector ? I have never seen that in Pharo. Are your titles dynamic (I mean, when the object changes, can your title change ?) ? 2015-02-18 11:35 GM

Re: [Pharo-users] Small benchmark

2015-02-17 Thread Clément Bera
h the updated result once Pharo4 is out. > > > > Of course, you can add the benchmark and tweak it for your needs. > > > > Thank you for all the good work you are doing! Reaching a speed near > > pypy would be a real game changer! > > > > 2015-02-17 11:24

Re: [Pharo-users] Small benchmark

2015-02-17 Thread Clément Bera
Hello Andrea, The way you wrote you algorithm is nice but makes extensive use of closures and iterates a lot over collections. Those are two aspects where the performance of Pharo have issues. Eliot Miranda and myself are working especially on those 2 cases to improve Pharo performance. If you don

Re: [Pharo-users] Image growing size

2015-02-03 Thread Clément Bera
Hello, There could be many reasons why you would have such a big image. The most common reason is the monticello metadata, as Phil said. Another reason could be because some caches and objects that are flushed on snapshot, so if you looked at the image size at runtime and not the file size (for

Re: [Pharo-users] Why single inheritance?

2015-01-28 Thread Clément Bera
2015-01-28 16:41 GMT+01:00 Laura Risani : > Hi all, > > What is the explanation why Smalltalk designers preferred single > inheritance+traits to multiple inheritance? Why is the former better than > the latter? > Do traits let you share state also or only behavior? > Traits only share behaviors.

Re: [Pharo-users] Waiting object

2015-01-27 Thread Clément Bera
Hello, Or simpler: 1 second wait. In your example: Transcript open. [ 10 timesRepeat:[Transcript crShow:(DateAndTime now). 1 second wait] ] fork. 2015-01-27 20:21 GMT+01:00 Nicolai Hess : > > 2015-01-27 19:46 GMT+01:00 Laura Risani : > >> Hi all, >> >> I need an object/method lik

Re: [Pharo-users] Running Pharo headless

2015-01-21 Thread Clément Bera
2015-01-21 10:31 GMT+01:00 nacho <0800na...@gmail.com>: > philippeback wrote > > why running pharo with a squeakvm? > > > > I do it, in my Raspberry Pi :p and its slo > Actually I think only the UI is slow on the Pi because on the squeak VM made by Tim he reimplemented differently BitBlt. Is

Re: [Pharo-users] Running Pharo headless

2015-01-21 Thread Clément Bera
aside.image \ > st ./startServer.st \ > --no-quit > > Apart from running it under a limited user/group, it is also possible to > chroot it for an extra security measure. > > > Michal > > > > > On 21.1.2015 09:16, Clément Bera wrote: > > Just a deta

Re: [Pharo-users] Running Pharo headless

2015-01-21 Thread Clément Bera
Just a detail. When you run headless with the latest pharo-vm (that you can download here: http://files.pharo.org/vm/pharo/ in your OS directory, file stable.zip), add --no-quit after --no-display in the VM start-up options. 2015-01-21 7:21 GMT+01:00 p...@highoctane.be : > why running pharo with

Re: [Pharo-users] "Improper store into indexable object" and weird variable names

2015-01-20 Thread Clément Bera
Typically, if the image can still access the change file but not the source file (or the other way around), some methods still show temporary variable names, whereas other methods show t1, t2, etc , depending on which files their sources were in. 2015-01-20 10:21 GMT+01:00 Sven Van Caekenber

Re: [Pharo-users] Notification on GC of an object?

2015-01-13 Thread Clément Bera
Yeah Object>>#finalize is supposed to do what you said but unfortunately it does not work... Maybe it's a VM bug or maybe it's not supported any more. We'll see if Eliot answer the thread. 2015-01-13 15:55 GMT+01:00 Johan Fabry : > > No, just putting the cleanup code in a finalize method does n

Re: [Pharo-users] Traveling to PharoDays

2014-12-27 Thread Clément Bera
There's a direct train from Paris CDG airport to Lille. It's usually more complex to go from brussels airport to Lille. There's an airport in Lille but there's very few flights from there (only to Marseilles and Porto AFAIK). 2014-12-27 12:21 GMT+01:00 Udo Schneider : > All, > > what's the best

Re: [Pharo-users] New Pharo Collections

2014-12-16 Thread Clément Bera
2014-12-17 7:42 GMT+01:00 Damien Cassou : > > > Le 16 déc. 2014 22:48, "dboeren" a écrit :. > > Off the top of my head, I would be interested in support for "slices" > > meaning taking being able to treat a subset of a larger > OrderedCollection as > > its own OrderedCollection rather than using c

Re: [Pharo-users] Beginner of smalltalk 80 - first graphic windows and GUI - need help

2014-11-26 Thread Clément Bera
Hello, I don't really know how to answer. Are your examples really from smalltalk-80 ? Were they running on the Xerox-D microcoded machine ? Because I don't think there are anymore smalltalk-80 available right now, nor machine that can run it. There's a smalltalk-78 running on javascript on the w

Re: [Pharo-users] Building 64-bit pharo VM

2014-11-18 Thread Clément Bera
Hello, What you want to do is difficult because the vm internals rely on the word size. There are two solutions: 1) editing the VM (JIT native code back end + memory manager) to support 64 bits. That's a work in progress. You can discuss about it on the Squeak vm-dev mailing list. 2) compiling th

Re: [Pharo-users] Reloading a shared c library after been modified?

2014-10-12 Thread Clément Bera
Hello, this is possible but non trivial. I think the easiest way is to bind the C functions to manage C libraries: dlopen, dlsym, dlclose, dlerror. Then you can manually open and close the dynamic libs (dlopen, dlclose) and call the function dynamically loaded with dlsym. dlerror is used for erro

Re: [Pharo-users] Passed by references and by value

2014-09-25 Thread Clément Bera
Depending on the VM you use, different objects are passed by values. Currently -> only smallintegers on Spur 32 bits VM -> smallintegers and characters on Spur 64 bits VM -> smallintegers, characters and smallfloat But as Stef said it does not really matter in smalltalk. 2014-09-25 21:55 GMT+02:

Re: [Pharo-users] Calling Pharo from C

2014-09-18 Thread Clément Bera
Let's say no. It will be possible in the future but it requires quite some work in the VM. If you want to do this work, ask the question on VM-dev mailing list they will tell you what you need to do to make it possible. 2014-09-18 22:05 GMT+02:00 Annick Fron : > > Is it possible to call pharo fr

Re: [Pharo-users] New compiler: variable and recursive bloc of code

2014-09-10 Thread Clément Bera
Hello, The additional assignment is not needed. You get a warning because the warning detection is approximate and sometimes raises warning whereas it should not, but if you proceed, it compiles fine. 2014-09-10 8:54 GMT+02:00 Hilaire : > Hello, > > I noticed this change described bellow and I

Re: [Pharo-users] Math Ontologie on Pharo 3.0

2014-09-09 Thread Clément Bera
I got unmatched string quote. If it's French, could it be a ' ? It looks like a parser bug to me... I hope not :-) > > Alain > > On Tue, Sep 9, 2014 at 5:43 AM, Clément Bera > wrote: > >> What kind of bug do you have with accent ? Do you have a stack trace

Re: [Pharo-users] Math Ontologie on Pharo 3.0

2014-09-08 Thread Clément Bera
What kind of bug do you have with accent ? Do you have a stack trace ? More importantly, can you give us a reproducible case ? I will investigate tomorrow if you have a reproducible case to check if this is due to Opal. It may also be recent changes related to fonts. 2014-09-08 21:07 GMT+02:00 S

Re: [Pharo-users] FFI with compile flags

2014-08-13 Thread Clément Bera
I don't understand, do you want to compile your library using FFI or do you want to bind a library compiled your way with FFI ? If you want to compile your library using FFI, then use OSProcess to run the compilation line you showed. If you want to bind a library compiled your way with FFI, the e

Re: [Pharo-users] Seeing all the methods that is used in a method

2014-08-07 Thread Clément Bera
2014-08-07 10:47 GMT+02:00 aria2end : > Yes Exactly. I want to see all the potential methods called from from this > method which is the second case. but I receive error using that script. > > MessageNotUnderstood: ByteSymbol>>implementors > > Ok this method is implemented in the image I use (Phar

Re: [Pharo-users] Seeing all the methods that is used in a method

2014-08-07 Thread Clément Bera
2014-08-07 5:11 GMT+02:00 aria2end : > Hi, I know that I can see senders and implementers of a method but is there > any way to see all methods that are used in a method ? > This is impossible. The method called for each message send can only been known at runtime, because it depends on the recei

Re: [Pharo-users] I need some explaination about arguements assignment

2014-08-07 Thread Clément Bera
2014-08-07 6:38 GMT+02:00 aria2end : > Hi james, > > Your post not only resolved the issue but also introduced me a new approach > which I was looking for it. > Thank you > > do you know the reason why assigning to a passed-in argument is illegal by > any chance ? > > This is illegal because then

Re: [Pharo-users] FFI Basic

2014-07-10 Thread Clément Bera
Well the method with the code you give was compiled without any problem in my image (Pharo #30851 with FFI loaded with configuration browser as explained in the other thread). Perhaps this is related to your bug in the other thread where you were (probably) missing a package ? 2014-07-10 18:15

  1   2   >