Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
March 2014
- 63 participants
- 1299 messages
Re: [Pharo-dev] FLMaterializer Materialization error
by Max Leske
https://code.google.com/p/fuel/issues/detail?id=207
On 27.02.2014, at 17:06, Max Leske <maxleske(a)gmail.com> wrote:
>
> On 27.02.2014, at 16:52, Henrik Johansen <henrik.s.johansen(a)veloxit.no> wrote:
>
>>
>> On 27 Feb 2014, at 3:45 , Mariano Martinez Peck <marianopeck(a)gmail.com> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Feb 27, 2014 at 11:32 AM, Max Leske <maxleske(a)gmail.com> wrote:
>>>
>>> On 27.02.2014, at 14:54, Mariano Martinez Peck <marianopeck(a)gmail.com> wrote:
>>>
>>>>
>>>>
>>>>
>>>> On Thu, Feb 27, 2014 at 10:48 AM, Lorenzo Baracchi <baracchi.lorenzo(a)gmail.com> wrote:
>>>> Hi
>>>>
>>>> I was using FLMaterializer materializationFromFileNamed: filename to read fuel files.
>>>> Until yesterday everything was fine, but today I updated Pharo and received the error "'Materialization error. Unexpected stream version 19 where it should be 193."
>>>>
>>>> I guess that a new version of fuel cannot (simply) read old versions files.
>>>>
>>>> This is the "default" exception. But maybe....between 1.9 and 1.9.2 the file format didn't change. Max?
>>>
>>> I think 1.9 to 1.9.3 should work without problems. I canât think of any changes to the file format.
>>>
>>>
>>> An interesting idea for Fuel would be that for each released version, besides defining the version, we also define the list of previous versions that are known to work with this one. So for example, we could say that 1.9.3 should work ok up to 1.9. So upon materialization we check this info. This would be very cool. Of course, it is our responsibility (humans/developers) to define with which previous versions it should workâ¦
>>
>> A versioning scheme that encodes much of the needed information directly is great for this.
>>
>> An example:
>>
>> X.Y.Z-[Dialect/Version]
>> X - Major version changes, can not be expected to read streams of previous versions correctly (changed storage format for something)
>> Y - Minor version changes, can be expected to read older versions, but not newer, correctly (added new capabilities to the format, such as new hooks etc.)
>> Z - Internal changes/bugfixes, (no changes to the actual serialization format)
>> [Dialect/Version] - Not needed for error recovery if classes of serialized instances are included, as that is better to use directly if encountering missing/incompatible definitions, but a nice bit of info to start from otherwise...
>>
>
> +1
> Thatâs also easy to understand for users.
>
>> Cheers,
>> Henry
March 2, 2014
Re: [Pharo-dev] [squeak-dev] [ANN] Fuel 1.9.3
by Max Leske
On 01.03.2014, at 23:14, Max Leske <maxleske(a)gmail.com> wrote:
>
> On 01.03.2014, at 18:46, phil(a)highoctane.be wrote:
>
>> So Debugger -> Smalltalk tools debugger needed...
>>
> Thanks Phil, I missed that somehow. Debugger is now SpecDebugger. Iâll fix it.
Fixed.
>
>>
>> Le 1 mars 2014 14:19, "Sebastian Sastre" <sebastian(a)flowingconcept.com> a écrit :
>> great job you guys
>>
>> sebastian
>>
>> o/
>>
>> On 01/03/2014, at 02:23, Hernán Morales Durand <hernan.morales(a)gmail.com> wrote:
>>
>>> Thanks for the update.
>>> Cheers,
>>>
>>> Hernán
>>>
>>>
>>> 2014-02-26 18:13 GMT-03:00 Max Leske <maxleske(a)gmail.com>:
>>> Dear fellow Smalltalkers
>>>
>>> Mariano, Martin and myself are happy to announce Fuel version 1.9.3 which includes the follwing changes to 1.9 (1.9.1 and 1.9.2 were never officially announced):
>>>
>>> - (feature) the #fuelReplacement selector offers the ability to statically replace an object (e.g. with nil) during analysis. This can lead to significantly smaller graphs and improved speed when serializing large graphs
>>> - (feature) serialize the same graph that was analyzed instead of retrazing the graph during serialization. This prevents changes in the graph from happening between analysis and serialization
>>> - (change) store source when serializing CompiledMethod objects. Needed because Opal does not allow decompilation
>>> - (fix) migrate variables across hierarchy
>>> - (feature) Object>>serializeToFileNamed: shortcut for serializing arbitrary objects
>>> - (fix) better compression for LargeNegativeIntegers (https://pharo.fogbugz.com/f/cases/12052/Fuel-could-store-LargeNegativeInteg…)
>>>
>>> Pharo30 already includes most of these changes (integration request: https://pharo.fogbugz.com/f/cases/13000/Integrate-Fuel-1-9-3)
>>>
>>> This release runs with:
>>> - Pharo: 1.1.1, 1.1.2, 1.2, 1.2.2, 1.3, 1.4, 2.0, 3.0
>>> - Squeak: 4.1, 4.2, 4.3, 4.4, 4.5
>>>
>>> The documentation is not up to date yet but we will remedy that situatoin within the next couple of days (http://rmod.lille.inria.fr/web/pier/software/Fuel)
>>> If you encounter any bugs or have suggestions, please contact us on the Fuel mailing list (http://lists.gforge.inria.fr/cgi-bin/mailman/roster/pharo-fuel) or create a new issue in our bug tracker (https://code.google.com/p/fuel/)
>>>
>>> We want to thank everyone who contributed to this release (by keyboard or opinion) and also all of those people who actively use Fuel.
>>>
>>> Cheers,
>>> Max
>>>
>
March 2, 2014
Re: [Pharo-dev] Zinc bug submitting form via GET?
by Pharo4Stef
On 02 Mar 2014, at 06:49, Sean P. DeNigris <sean(a)clipperadams.com> wrote:
> In porting the Mechanize web scraping library from Ruby, I started with the
> following example:
> a.get('http://google.com/') do |page|
> search_result = page.form_with(:name => 'f') do |search|
> search.q = 'Hello world'
> end.submit
Cool.
Sean how it is different from Soup?
Do you write tests?
>
> It GETs
> http://www.google.com/search?ie=ISO-8859-1&hl=en&source=hp&q=Hello+world&gb…
>
> I tried to do that with Zinc via formAt: name put:, but when I sent #get,
> the query was empty and the response was another blank search form. It took
> me some time to figure out what was going on and change to #queryPut:at: in
> the GET case, but now I'm managing form logic from the outside. Since GET is
> valid for forms (apparently it is the default per
> http://www.w3schools.com/tags/att_form_method.asp) it seems Zinc should
> handle this more gracefully. I would expect it to check for form fields and
> add them to the query when doing a GET. What do you think?
>
> n.b. Gofer it
> smalltalkhubUser: 'SeanDeNigris' project: 'Mechanize';
> package: 'Mechanize';
> load.
>
>
>
>
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Zinc-bug-submitting-form-via-GET-tp4747276.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>
March 2, 2014
Zinc bug submitting form via GET?
by Sean P. DeNigris
In porting the Mechanize web scraping library from Ruby, I started with the
following example:
a.get('http://google.com/') do |page|
search_result = page.form_with(:name => 'f') do |search|
search.q = 'Hello world'
end.submit
It GETs
http://www.google.com/search?ie=ISO-8859-1&hl=en&source=hp&q=Hello+world&gb…
I tried to do that with Zinc via formAt: name put:, but when I sent #get,
the query was empty and the response was another blank search form. It took
me some time to figure out what was going on and change to #queryPut:at: in
the GET case, but now I'm managing form logic from the outside. Since GET is
valid for forms (apparently it is the default per
http://www.w3schools.com/tags/att_form_method.asp) it seems Zinc should
handle this more gracefully. I would expect it to check for form fields and
add them to the query when doing a GET. What do you think?
n.b. Gofer it
smalltalkhubUser: 'SeanDeNigris' project: 'Mechanize';
package: 'Mechanize';
load.
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Zinc-bug-submitting-form-via-GET-tp4747276.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
March 2, 2014
Re: [Pharo-dev] Status of the VM?
by Jan Vrany
Maybe I'm missing something obvious, but from my point of
view the fundamental difference here is that with JVM's JPDA
triggering of event actually **does not** affect the monitored
system.
If these events are handled by the image, it is quite tricky to
figure out which one is caused by "application" and which one
is caused by the event handling machinery. For instance,
if (non-empty) method is called after a GC, this handler
may trigger another GC, which may...
That brings me to another, if you do in-image profiling (event
handling), data could be quite different than what would you get
using out-of-image profiler.
<personal experience:>
I've used (and implemented some :-) both - Smalltalk in-image tools
and out-of-image tools, namely JPDA and DTRACE/STAP. For serious
profiling and monitoring, I always use out-of-image approach if
possible.
Jan
On 01/03/14 23:34, Clément Bera wrote:
> Hey,
>
> It's fun because I looked at the JVM list and most point looked
> irrelevant as you described.
>
> It seems that the only thing we miss is the GC hook: we could have a
> selector in special object array to call at each GC on the 'Smalltalk'
> object to trigger a method in the image that would be by default an
> empty method.
>
> Field access is a solved problem with slots, definitely.
>
>
> 2014-03-01 22:35 GMT+01:00 Eliot Miranda <eliot.miranda(a)gmail.com
> <mailto:eliot.miranda@gmail.com>>:
>
> Hi Stefan,
>
>
> On Sat, Mar 1, 2014 at 12:55 PM, Stefan Marr
> <smalltalk(a)stefan-marr.de <mailto:smalltalk@stefan-marr.de>> wrote:
>
> Hi:
>
> On 01 Mar 2014, at 19:44, Alexandre Bergel
> <alexandre.bergel(a)me.com <mailto:alexandre.bergel@me.com>> wrote:
>
> > The VM is a formidable thing in which everything happen.
> Exposing to the image whatâs going on in it is really pushing
> the innovation.
>
> Perhaps something that could be relevant in case someone decides
> to implement such an interface in Cog:
> Just one, pretty old example:
> http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#EventIndex
>
>
> Interesting list. Assuming the list refers to events one can handle
> in Smalltalk, then let me go through these and see which we need,
> don't need or already have:
>
>
> Event Index
>
> * Breakpoint
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#Breakpoint>
> we already have this. An illegal bytecode will send an error
> message to the current context. See my MethodMassage package.
> We use this at Cadence to implement coverage.
> * Class File Load Hook
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassFileLoa…>
> not needed. classes are loaded by Smalltalk code, not the VM.
> * *Class Load
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassLoad>*
> not needed. ditto
> * *Class Prepare
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassPrepare>*
> not needed. ditto
> * *Compiled Method Load
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#CompiledMeth…>*
> not needed. methods are loaded by Smalltalk code, not the VM.
> * *Compiled Method Unload
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#CompiledMeth…>*
> not needed. ditto
> * Data Dump Request
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#DataDumpRequ…>
> to what extent is snapshot adequate?
> Has been used for adequate image debugging (and of course we can
> serialize processes so people are using things like Fuel to save
> the stack traces of processes that encounter errors).
> Not adequate for VM debugging: the heap may be invalid and not
> saveable; shapshot load does more than merely fill memory; it
> swizzles etc, and these operations can and will fail on an
> invalid heap. Personally I think things like -blockOnError
> which causes the VM to block rather than exit on error, allowing
> one to attach gdb to a crashed VM process is more useful.
> * *Dynamic Code Generated
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#DynamicCodeG…>*
> not needed. methods are loaded by Smalltalk code, not the VM.
> * *Exception
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#Exception>*
> not needed. Smalltalk's exception system has resume semantics,
> not retry, so there's no need to ask to see an exception at
> source; the source of the exception can be examined after the
> fact (unlike Java, which has restart semantics). In fact folks
> like Avi Bryant (and I believe him) think that the business
> opportunity with hadoop/map-reduce is indeed Smalltalk's
> exception semantics which allow live debugging of errors.
> * *Exception Catch
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ExceptionCat…>*
> not needed. ditto
> * Field Access
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FieldAccess>
> Quite possibly. If one is using classical Smalltalk there is no
> linguistic hook for field access. With Pharo's slots then
> presumably transforming methods to insert traps on field access
> is trivial (and databases like GemStone have done similar things
> with brute bytecode manipulation). With Newspeak, which has no
> direct inst var access, this can be subsumed by MethodEntry (see
> below). So whether this is needed or not depends on either
> language evolution or good bytecode manipulation tools; if these
> are available this is not needed.
> * Field Modification
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FieldModific…>
> Quite possibly. Again the approaches outlined above can be done
> (as gemStone has done in the past). But we nearly have this.
> I've implemented per-instance immutability for the old
> Newspeak VM (a variant of the Squeak interpreter) and this is
> easy to fold into Cog (and indeed the Interpreter VM). GemStone
> engineers prefer per-instance immutability than their own
> bytecode modification. I think I agree. I'd rather depend on
> immutability (which has other uses such as immutable literals)
> than a special VM hook.
> * Frame Pop
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FramePop>
> Hmm. Possibly. IIRC, I think method wrappers provide a
> manageable way to do this.
> * Garbage Collection Finish
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#GarbageColle…>
> Indeed. There are hacks to get this. Further there are many
> ways to implement this. e.g. is it a callback on finishing a
> form of GC, or is it merely the signalling of a semaphore which
> has some Smalltalk process waiting on it (as is the case in VW)?
> * Garbage Collection Start
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#GarbageColle…>
> OK, but what are you going to do when you catch this? Arguably
> there's no memory with which to do anything at the point that
> you get this. Give me a scenario and I'll consider it.
> * Method Entry
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MethodEntry>
> Not sure we need this because all method calls are virtual and
> hence one can use proxies (MNU hook) or method wrappers.
> * Method Exit
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MethodExit>
> Ditto.
> * Monitor Contended Enter
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorConte…>
> Not relevant. Smalltalk doesn't have synchronized methods.
> * Monitor Contended Entered
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorConte…>
> Ditto.
> * *Monitor Wait
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorWait>*
> Ditto.
> * *Monitor Waited
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorWaited>*
> Ditto.
> * Native Method Bind
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#NativeMethod…>
> OK. Not really relevant if we refactor dll loading and function
> lookup as in Alien (and VW) so that the image does the work and
> allows one to implement the hook without VM support.
> * Object Free
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ObjectFree>
> Hmmm. Is this for finalization or something else? In either
> case I think that Ephemerons fit the bill and Cog Spur supports
> ephemerons. So we'll have this before the end of the year.
> * Resource Exhausted
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ResourceExha…>
> Hmmm, I think this is not relevant. Resources such as memory
> produce catchable primitive failures. Likewise for OS
> resources. if things are engineered right then exhaustion fo
> things like file handles should produce exceptions in the image.
> * Single Step
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#SingleStep>
> Not relevant. We already have ways of making Smalltalk
> single-step, heh, heh.
> * Thread End
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ThreadEnd>
> If this applies to Process, then easy. Change fork: et al to
> add code on thread termination. Native threads are a different
> issue. But as yet a non-issue. We don't have them yet,
> although a prototype VM is there to revive when resources allow.
> * Thread Start
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ThreadStart>
> Ditto.
> * VM Death Event
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMDeath>
> Seems like a non-sequitur to me. If the VM has died then
> there's nothing reliable the system above it can do. However,
> see below...
> * VM Initialization Event
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMInit>
> The existing startUp registration mechanism seems adequate to me...
> * VM Object Allocation
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMObjectAlloc>
> AGain lots of hooks to allow this. The link os pretty vague on
> what this might mean. They mention using other mechanisms to
> instrument this.
> * *VM Start Event
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMStart>*
> Again, the existing startUp registration mechanism seems
> adequate to me...
>
> However, if this list refers to sub-image level debugging (and
> that's something I do all the time) then again this isn't relevant.
> We have the simulator which is a fabulous tool for intercepting
> any and all of the above. Gdb is less convenient but can be used by
> someone knowledgeable.
>
> You can get access to many different information in terms of
> âeventsâ on the JVM.
> For building a profiler, more than sufficient. And, at least in
> my personal opinion also something that would be desirable for
> Cog, perhaps in a slightly more modern design, but with a
> similar flavor.
>
>
> So how about responding to the above breakdown with a sketch of what
> events remain, and then speculate on how they might be packaged as
> events.
>
> --
> best,
> Eliot
>
>
March 2, 2014
Re: [Pharo-dev] Status of the VM?
by Clément Bera
Hey,
It's fun because I looked at the JVM list and most point looked irrelevant
as you described.
It seems that the only thing we miss is the GC hook: we could have a
selector in special object array to call at each GC on the 'Smalltalk'
object to trigger a method in the image that would be by default an empty
method.
Field access is a solved problem with slots, definitely.
2014-03-01 22:35 GMT+01:00 Eliot Miranda <eliot.miranda(a)gmail.com>:
> Hi Stefan,
>
>
> On Sat, Mar 1, 2014 at 12:55 PM, Stefan Marr <smalltalk(a)stefan-marr.de>wrote:
>
>> Hi:
>>
>> On 01 Mar 2014, at 19:44, Alexandre Bergel <alexandre.bergel(a)me.com>
>> wrote:
>>
>> > The VM is a formidable thing in which everything happen. Exposing to
>> the image what's going on in it is really pushing the innovation.
>>
>> Perhaps something that could be relevant in case someone decides to
>> implement such an interface in Cog:
>> Just one, pretty old example:
>> http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#EventIndex
>
>
> Interesting list. Assuming the list refers to events one can handle in
> Smalltalk, then let me go through these and see which we need, don't need
> or already have:
>
> Event Index
>
> - Breakpoint<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#Breakpoint>
> we already have this. An illegal bytecode will send an error message
> to the current context. See my MethodMassage package. We use this at
> Cadence to implement coverage.
> - Class File Load Hook<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassFileLoa…>
> not needed. classes are loaded by Smalltalk code, not the VM.
> - *Class Load
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassLoad>*
> not needed. ditto
> - *Class Prepare
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassPrepare>*
> not needed. ditto
> - *Compiled Method Load
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#CompiledMeth…>*
> not needed. methods are loaded by Smalltalk code, not the VM.
> - *Compiled Method Unload
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#CompiledMeth…>*
> not needed. ditto
> - Data Dump Request<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#DataDumpRequ…>
> to what extent is snapshot adequate?
> Has been used for adequate image debugging (and of course we can
> serialize processes so people are using things like Fuel to save the stack
> traces of processes that encounter errors).
> Not adequate for VM debugging: the heap may be invalid and not
> saveable; shapshot load does more than merely fill memory; it swizzles etc,
> and these operations can and will fail on an invalid heap. Personally I
> think things like -blockOnError which causes the VM to block rather than
> exit on error, allowing one to attach gdb to a crashed VM process is more
> useful.
> - *Dynamic Code Generated
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#DynamicCodeG…>*
> not needed. methods are loaded by Smalltalk code, not the VM.
> - *Exception
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#Exception>*
> not needed. Smalltalk's exception system has resume semantics, not
> retry, so there's no need to ask to see an exception at source; the source
> of the exception can be examined after the fact (unlike Java, which has
> restart semantics). In fact folks like Avi Bryant (and I believe him)
> think that the business opportunity with hadoop/map-reduce is indeed
> Smalltalk's exception semantics which allow live debugging of errors.
> - *Exception Catch
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ExceptionCat…>*
> not needed. ditto
> - Field Access<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FieldAccess>
> Quite possibly. If one is using classical Smalltalk there is no
> linguistic hook for field access. With Pharo's slots then presumably
> transforming methods to insert traps on field access is trivial (and
> databases like GemStone have done similar things with brute bytecode
> manipulation). With Newspeak, which has no direct inst var access, this
> can be subsumed by MethodEntry (see below). So whether this is needed or
> not depends on either language evolution or good bytecode manipulation
> tools; if these are available this is not needed.
> - Field Modification<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FieldModific…>
> Quite possibly. Again the approaches outlined above can be done (as
> gemStone has done in the past). But we nearly have this. I've implemented
> per-instance immutability for the old Newspeak VM (a variant of the Squeak
> interpreter) and this is easy to fold into Cog (and indeed the Interpreter
> VM). GemStone engineers prefer per-instance immutability than their own
> bytecode modification. I think I agree. I'd rather depend on immutability
> (which has other uses such as immutable literals) than a special VM hook.
> - Frame Pop<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FramePop>
> Hmm. Possibly. IIRC, I think method wrappers provide a manageable
> way to do this.
> - Garbage Collection Finish<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#GarbageColle…>
> Indeed. There are hacks to get this. Further there are many ways to
> implement this. e.g. is it a callback on finishing a form of GC, or is it
> merely the signalling of a semaphore which has some Smalltalk process
> waiting on it (as is the case in VW)?
> - Garbage Collection Start<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#GarbageColle…>
> OK, but what are you going to do when you catch this? Arguably
> there's no memory with which to do anything at the point that you get this.
> Give me a scenario and I'll consider it.
> - Method Entry<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MethodEntry>
> Not sure we need this because all method calls are virtual and hence
> one can use proxies (MNU hook) or method wrappers.
> - Method Exit<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MethodExit>
> Ditto.
> - Monitor Contended Enter<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorConte…>
> Not relevant. Smalltalk doesn't have synchronized methods.
> - Monitor Contended Entered<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorConte…>
> Ditto.
> - *Monitor Wait
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorWait>*
> Ditto.
> - *Monitor Waited
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorWaited>*
> Ditto.
> - Native Method Bind<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#NativeMethod…>
> OK. Not really relevant if we refactor dll loading and function
> lookup as in Alien (and VW) so that the image does the work and allows one
> to implement the hook without VM support.
> - Object Free<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ObjectFree>
> Hmmm. Is this for finalization or something else? In either case I
> think that Ephemerons fit the bill and Cog Spur supports ephemerons. So
> we'll have this before the end of the year.
> - Resource Exhausted<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ResourceExha…>
> Hmmm, I think this is not relevant. Resources such as memory produce
> catchable primitive failures. Likewise for OS resources. if things are
> engineered right then exhaustion fo things like file handles should produce
> exceptions in the image.
> - Single Step<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#SingleStep>
> Not relevant. We already have ways of making Smalltalk single-step,
> heh, heh.
> - Thread End<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ThreadEnd>
> If this applies to Process, then easy. Change fork: et al to add code
> on thread termination. Native threads are a different issue. But as yet a
> non-issue. We don't have them yet, although a prototype VM is there to
> revive when resources allow.
> - Thread Start<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ThreadStart>
> Ditto.
> - VM Death Event<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMDeath>
> Seems like a non-sequitur to me. If the VM has died then there's
> nothing reliable the system above it can do. However, see below...
> - VM Initialization Event<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMInit>
> The existing startUp registration mechanism seems adequate to me...
> - VM Object Allocation<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMObjectAlloc>
> AGain lots of hooks to allow this. The link os pretty vague on what
> this might mean. They mention using other mechanisms to instrument this.
> - *VM Start Event
> <http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMStart>*
> Again, the existing startUp registration mechanism seems adequate to
> me...
>
> However, if this list refers to sub-image level debugging (and that's
> something I do all the time) then again this isn't relevant. We have the
> simulator which is a fabulous tool for intercepting any and all of the
> above. Gdb is less convenient but can be used by someone knowledgeable.
>
> You can get access to many different information in terms of 'events' on
>> the JVM.
>> For building a profiler, more than sufficient. And, at least in my
>> personal opinion also something that would be desirable for Cog, perhaps in
>> a slightly more modern design, but with a similar flavor.
>>
>
> So how about responding to the above breakdown with a sketch of what
> events remain, and then speculate on how they might be packaged as events.
>
> --
> best,
> Eliot
>
March 1, 2014
Re: [Pharo-dev] [squeak-dev] [ANN] Fuel 1.9.3
by Max Leske
On 01.03.2014, at 18:46, phil(a)highoctane.be wrote:
> So Debugger -> Smalltalk tools debugger needed...
>
Thanks Phil, I missed that somehow. Debugger is now SpecDebugger. Iâll fix it.
> Le 1 mars 2014 14:19, "Sebastian Sastre" <sebastian(a)flowingconcept.com> a écrit :
> great job you guys
>
> sebastian
>
> o/
>
> On 01/03/2014, at 02:23, Hernán Morales Durand <hernan.morales(a)gmail.com> wrote:
>
>> Thanks for the update.
>> Cheers,
>>
>> Hernán
>>
>>
>> 2014-02-26 18:13 GMT-03:00 Max Leske <maxleske(a)gmail.com>:
>> Dear fellow Smalltalkers
>>
>> Mariano, Martin and myself are happy to announce Fuel version 1.9.3 which includes the follwing changes to 1.9 (1.9.1 and 1.9.2 were never officially announced):
>>
>> - (feature) the #fuelReplacement selector offers the ability to statically replace an object (e.g. with nil) during analysis. This can lead to significantly smaller graphs and improved speed when serializing large graphs
>> - (feature) serialize the same graph that was analyzed instead of retrazing the graph during serialization. This prevents changes in the graph from happening between analysis and serialization
>> - (change) store source when serializing CompiledMethod objects. Needed because Opal does not allow decompilation
>> - (fix) migrate variables across hierarchy
>> - (feature) Object>>serializeToFileNamed: shortcut for serializing arbitrary objects
>> - (fix) better compression for LargeNegativeIntegers (https://pharo.fogbugz.com/f/cases/12052/Fuel-could-store-LargeNegativeInteg…)
>>
>> Pharo30 already includes most of these changes (integration request: https://pharo.fogbugz.com/f/cases/13000/Integrate-Fuel-1-9-3)
>>
>> This release runs with:
>> - Pharo: 1.1.1, 1.1.2, 1.2, 1.2.2, 1.3, 1.4, 2.0, 3.0
>> - Squeak: 4.1, 4.2, 4.3, 4.4, 4.5
>>
>> The documentation is not up to date yet but we will remedy that situatoin within the next couple of days (http://rmod.lille.inria.fr/web/pier/software/Fuel)
>> If you encounter any bugs or have suggestions, please contact us on the Fuel mailing list (http://lists.gforge.inria.fr/cgi-bin/mailman/roster/pharo-fuel) or create a new issue in our bug tracker (https://code.google.com/p/fuel/)
>>
>> We want to thank everyone who contributed to this release (by keyboard or opinion) and also all of those people who actively use Fuel.
>>
>> Cheers,
>> Max
>>
March 1, 2014
Re: [Pharo-dev] Status of the VM?
by Eliot Miranda
Hi Stefan,
On Sat, Mar 1, 2014 at 12:55 PM, Stefan Marr <smalltalk(a)stefan-marr.de>wrote:
> Hi:
>
> On 01 Mar 2014, at 19:44, Alexandre Bergel <alexandre.bergel(a)me.com>
> wrote:
>
> > The VM is a formidable thing in which everything happen. Exposing to the
> image what's going on in it is really pushing the innovation.
>
> Perhaps something that could be relevant in case someone decides to
> implement such an interface in Cog:
> Just one, pretty old example:
> http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#EventIndex
Interesting list. Assuming the list refers to events one can handle in
Smalltalk, then let me go through these and see which we need, don't need
or already have:
Event Index
- Breakpoint<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#Breakpoint>
we already have this. An illegal bytecode will send an error message to
the current context. See my MethodMassage package. We use this at Cadence
to implement coverage.
- Class File Load
Hook<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassFileLoa…>
not needed. classes are loaded by Smalltalk code, not the VM.
- *Class Load
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassLoad>*
not needed. ditto
- *Class Prepare
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ClassPrepare>*
not needed. ditto
- *Compiled Method Load
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#CompiledMeth…>*
not needed. methods are loaded by Smalltalk code, not the VM.
- *Compiled Method Unload
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#CompiledMeth…>*
not needed. ditto
- Data Dump Request<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#DataDumpRequ…>
to what extent is snapshot adequate?
Has been used for adequate image debugging (and of course we can
serialize processes so people are using things like Fuel to save the stack
traces of processes that encounter errors).
Not adequate for VM debugging: the heap may be invalid and not saveable;
shapshot load does more than merely fill memory; it swizzles etc, and these
operations can and will fail on an invalid heap. Personally I think things
like -blockOnError which causes the VM to block rather than exit on error,
allowing one to attach gdb to a crashed VM process is more useful.
- *Dynamic Code Generated
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#DynamicCodeG…>*
not needed. methods are loaded by Smalltalk code, not the VM.
- *Exception
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#Exception>*
not needed. Smalltalk's exception system has resume semantics, not
retry, so there's no need to ask to see an exception at source; the source
of the exception can be examined after the fact (unlike Java, which has
restart semantics). In fact folks like Avi Bryant (and I believe him)
think that the business opportunity with hadoop/map-reduce is indeed
Smalltalk's exception semantics which allow live debugging of errors.
- *Exception Catch
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ExceptionCat…>*
not needed. ditto
- Field Access<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FieldAccess>
Quite possibly. If one is using classical Smalltalk there is no
linguistic hook for field access. With Pharo's slots then presumably
transforming methods to insert traps on field access is trivial (and
databases like GemStone have done similar things with brute bytecode
manipulation). With Newspeak, which has no direct inst var access, this
can be subsumed by MethodEntry (see below). So whether this is needed or
not depends on either language evolution or good bytecode manipulation
tools; if these are available this is not needed.
- Field Modification<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FieldModific…>
Quite possibly. Again the approaches outlined above can be done (as
gemStone has done in the past). But we nearly have this. I've implemented
per-instance immutability for the old Newspeak VM (a variant of the Squeak
interpreter) and this is easy to fold into Cog (and indeed the Interpreter
VM). GemStone engineers prefer per-instance immutability than their own
bytecode modification. I think I agree. I'd rather depend on immutability
(which has other uses such as immutable literals) than a special VM hook.
- Frame Pop<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#FramePop>
Hmm. Possibly. IIRC, I think method wrappers provide a manageable way
to do this.
- Garbage Collection
Finish<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#GarbageColle…>
Indeed. There are hacks to get this. Further there are many ways to
implement this. e.g. is it a callback on finishing a form of GC, or is it
merely the signalling of a semaphore which has some Smalltalk process
waiting on it (as is the case in VW)?
- Garbage Collection
Start<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#GarbageColle…>
OK, but what are you going to do when you catch this? Arguably there's
no memory with which to do anything at the point that you get this. Give
me a scenario and I'll consider it.
- Method Entry<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MethodEntry>
Not sure we need this because all method calls are virtual and hence one
can use proxies (MNU hook) or method wrappers.
- Method Exit<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MethodExit>
Ditto.
- Monitor Contended
Enter<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorConte…>
Not relevant. Smalltalk doesn't have synchronized methods.
- Monitor Contended
Entered<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorConte…>
Ditto.
- *Monitor Wait
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorWait>*
Ditto.
- *Monitor Waited
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#MonitorWaited>*
Ditto.
- Native Method
Bind<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#NativeMethod…>
OK. Not really relevant if we refactor dll loading and function lookup
as in Alien (and VW) so that the image does the work and allows one to
implement the hook without VM support.
- Object Free<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ObjectFree>
Hmmm. Is this for finalization or something else? In either case I
think that Ephemerons fit the bill and Cog Spur supports ephemerons. So
we'll have this before the end of the year.
- Resource Exhausted<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ResourceExha…>
Hmmm, I think this is not relevant. Resources such as memory produce
catchable primitive failures. Likewise for OS resources. if things are
engineered right then exhaustion fo things like file handles should produce
exceptions in the image.
- Single Step<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#SingleStep>
Not relevant. We already have ways of making Smalltalk single-step,
heh, heh.
- Thread End<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ThreadEnd>
If this applies to Process, then easy. Change fork: et al to add code
on thread termination. Native threads are a different issue. But as yet a
non-issue. We don't have them yet, although a prototype VM is there to
revive when resources allow.
- Thread Start<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#ThreadStart>
Ditto.
- VM Death Event<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMDeath>
Seems like a non-sequitur to me. If the VM has died then there's
nothing reliable the system above it can do. However, see below...
- VM Initialization
Event<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMInit>
The existing startUp registration mechanism seems adequate to me...
- VM Object Allocation<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMObjectAlloc>
AGain lots of hooks to allow this. The link os pretty vague on what
this might mean. They mention using other mechanisms to instrument this.
- *VM Start Event
<http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#VMStart>*
Again, the existing startUp registration mechanism seems adequate to
me...
However, if this list refers to sub-image level debugging (and that's
something I do all the time) then again this isn't relevant. We have the
simulator which is a fabulous tool for intercepting any and all of the
above. Gdb is less convenient but can be used by someone knowledgeable.
You can get access to many different information in terms of 'events' on
> the JVM.
> For building a profiler, more than sufficient. And, at least in my
> personal opinion also something that would be desirable for Cog, perhaps in
> a slightly more modern design, but with a similar flavor.
>
So how about responding to the above breakdown with a sketch of what events
remain, and then speculate on how they might be packaged as events.
--
best,
Eliot
March 1, 2014
Re: [Pharo-dev] Status of the VM?
by Stefan Marr
Hi:
On 01 Mar 2014, at 19:44, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
> The VM is a formidable thing in which everything happen. Exposing to the image whatâs going on in it is really pushing the innovation.
Perhaps something that could be relevant in case someone decides to implement such an interface in Cog:
Just one, pretty old example: http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html#EventIndex
You can get access to many different information in terms of âeventsâ on the JVM.
For building a profiler, more than sufficient. And, at least in my personal opinion also something that would be desirable for Cog, perhaps in a slightly more modern design, but with a similar flavor.
Best regards
Stefan
--
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/
March 1, 2014