Re: [Factor-talk] Listener on Windows - UI Corruption

2016-04-30 Thread Björn Lindqvist
>   Having said all that, I suspect GC to be the source of problems. Did any of 
> you experience similar issues on other platforms besides Windows?
>   How do I go about hunting for that kind of bug in Factor?

You can never exclude anything, but it seems very unlikely that the GC
would be the problem. The GC copies objects so it is vulnerable to
shadow data bugs. That is, some references might no be updated to
point to the newly copied to location for the object. In the listener,
you can run the minor-gc and gc words and see if there is a pattern or
if you are able to trigger the bug that way. You can also recompile
Factor to run in debug mode:

  nmake /f Nmakefile x86-64 DEBUG=1

Also I see that you are running Factor in compatibility mode because
the fonts are all blurry. That is automatically enabled in Windows for
Factor if you have a high dpi screen. You can try and disable it by
right-clicking the .exe file and go: Properties -> Compatibility ->
Inactivate scaling when using High DPI.


-- 
mvh/best regards Björn Lindqvist

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


[Factor-talk] Coordinates of child gadgets

2016-04-30 Thread Alexander Ilin
Hello!

  I have the following code:

USING: kernel typed literals accessors assocs sequences math math.vectors
  opengl ui.gadgets ui.render colors colors.constants locals arrays
  namespaces ;
IN: iqlink.field

TUPLE: inner-gadget < gadget ;
TUPLE: outer-gadget < gadget ;

M: inner-gadget pref-dim*
  drop { 10 10 } ;

M: inner-gadget draw-gadget*
  loc>> { 10 10 } gl-fill-rect ;

: add-inner-gadget ( index parent -- )
  swap 10 * dup 2array
  inner-gadget new swap >>loc
  add-gadget drop ;

:  ( -- outer-gadget )
  outer-gadget new dup [ add-inner-gadget ] curry
  3 iota swap each ;

M: outer-gadget pref-dim*
  drop { 60 60 } ;

M: outer-gadget draw-gadget*
  drop "red" named-color gl-color gl-error ;

  Run with: [  "OuterGadget" open-window ] with-ui

  The outer-gadget simply creates three instances of inner-gadget and keeps 
them as children. All inner-gadgets have the same size 10x10 pixels.
  The outer-gadget positions its children at coordinates { 0 0 }, { 10 10 } and 
{ 20 20 } by setting their loc slot.
  It is therefore expected that the resulting image will consist of three red 
squares aligned diagonally end to end (see "expected.png").
  However, the result is different (see "actual.png").

  Why the difference? Is there a hidden coefficient I'm not taking into account?

  I can get the expected image if I replace 10 with 5 in add-inner-gadget. I 
don't understand this.

---=---
 Александр
--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Coordinates of child gadgets

2016-04-30 Thread Alexander Ilin
Hello!

>   I have the following code:

  Never mind that last post, I figured it out.

  I missed the fact that while drawing a child gadget the { 0 0 } coordinate is 
already at the top-left corner of the child. The additional shift by loc was 
messing things up.

---=---
 Александр

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk