Re: [Factor-talk] Using find-by-class in html.parser.analyzer
2013/7/15 Alex Vondrak ajvond...@gmail.com In general, I'm not sure if html.parser is very mature compared to, say, the XML vocab: http://docs.factorcode.org/content/article-xml.html The major difference is that html.parser handles invalid html which the xml vocab doesn't. So for parsing pages on the web, html.parser is what you have to use. Would be great if someone wrote a wrapper for libxml2 which is the best xml/html parsing library ever. Then you wouldn't need to use different interfaces for xml and html. -- mvh Björn -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Using find-by-class in html.parser.analyzer
Hi Alex, Thanks very much for your reply. I think my issue might come from the fact that find-by-class or its XML equivalent require the entire class string to match which is technically not correct (an element can have several CSS classes so it should be a string contains as a whole word type search, not an exact match). Is there any function that does a match of this time? I expect it could be written up as a quotation. Mark -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
[Factor-talk] Models for UI
Hi, Sorry - one other question: If I have a numeric value that I want to put onto a UI, am I forced to store it in a model as a string? Or to have two models, one for the number and one for the string? Mark -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Models for UI
One thing you could do is use an arrow to make it presentable: 12.5 model [ present ] arrow label-control dup gadget. On Mon, Jul 15, 2013 at 3:58 PM, Mark Green m...@antelope.nildram.co.ukwrote: Hi, Sorry - one other question: If I have a numeric value that I want to put onto a UI, am I forced to store it in a model as a string? Or to have two models, one for the number and one for the string? Mark -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Models for UI
Oops, managed my own fudge for this: TUPLE: uiInt intModel strModel ; M: uiInt model-changed strModel swap value numberstring swap set-model ; : uiInt ( int -- uiInt ) uiInt new over model 2dup add-connection intModel over numberstring model strModel nip ; : uiInt ( uiInt -- int ) intModel value ; : uiInt ( int uiInt -- ) intModel set-model ; : change-uiInt ( uiInt quot: ( int -- int ) -- ) swap intModel swap change-model ; inline Mark On Mon, Jul 15, 2013 at 11:58 PM, Mark Green m...@antelope.nildram.co.ukwrote: Hi, Sorry - one other question: If I have a numeric value that I want to put onto a UI, am I forced to store it in a model as a string? Or to have two models, one for the number and one for the string? Mark -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] ui crash on startup
Hi John, so with these changes, it's now possible to compile the vm without linking to the ui libs (X11_UI_LIBS in Config.Unix) and have a working UI. At least it works for me. So could we remove the NO_UI flag from build-support/factor.sh ? I guess it's better if all libs that are not needed by the vm are loaded the same way (through factor add-library code), if it's not too hard to maintain. I suppose maintenance was the reason it was loaded through pkg-config --libs gtk+-2.0 gtkglext-1.0 instead of a bunch of add-library. Jon On Mon, Jul 15, 2013 at 7:00 PM, John Benediktsson mrj...@gmail.com wrote: Hi Jon, We had some problems on a fresh arch linux install not loading the proper libraries for the UI - this seemed to fix it and didn't appear to have any negative side-effects. What are your thoughts on reverting the patch, or a different approach? Best, John. On Sun, Jul 14, 2013 at 3:56 PM, Jon Harper jon.harpe...@gmail.comwrote: Hi list, using ubuntu 12.04 and ATI proprietary driver, factor crashed at startup. The crash happened because glGetString(GL_VERSION) returned a null pointer. I traced it to 7616d5d6877f327f2331fe8a8d830e71101402d9 which added a dlopen for libGL.so Why was this changed ? Note that I got it to work eventually (I think my system was broken, ldconfig -p was reporting 2 libs for libGL.so; I removed some of the libGL.so symlinks) Jon -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk
Re: [Factor-talk] Using find-by-class in html.parser.analyzer
On Mon, Jul 15, 2013 at 12:11 PM, Mark Green m...@antelope.nildram.co.ukwrote: I expect it could be written up as a quotation. Maybe something like this? ``` IN: scratchpad htmlbodydiv class=\food is good\pmmm, candy bar/p/div/body/html parse-html [ class attribute foo swap subseq? ] find-all . { { 2 T{ tag { name div } { attributes H{ { class food is good } } } } } } ``` Or like this? ``` IN: scratchpad htmlbodydiv class=\food is good\pmmm, candy bar/p/div/body/html parse-html [ class attribute split food swap member? ] find-all . { { 2 T{ tag { name div } { attributes H{ { class food is good } } } } } } ``` Just some ideas; I'm sure this could/should all be factored out into the proper helper words. Regards, --Alex Vondrak -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk