AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 5907 |
r3wp | 58701 |
total: | 64608 |
results window for this page: [start: 901 end: 1000]
world-name: r4wp
Group: Ann-Reply ... Reply to Announce group [web-public] | ||
Endo: 2-Jul-2012 | there is "labelfont" word in the script? I think there is a end-of-line problem on your download. | |
Henrik: 2-Jul-2012 | I see labelfont twice in the source code, where neither is a definition. | |
Arnold: 2-Jul-2012 | I changed the version for the one I had this morning and it worked under winXP maybe something went wrong uploading. I'll have a quick look | |
Endo: 2-Jul-2012 | it is a bit difficult to see which one is solid, a different color might be better. It's a great game by the way. | |
Arnold: 2-Jul-2012 | Remove the bad lines version 1.04 works for me here. Mailed and uploaded just in between some modifications to clean things up a bit. Sorry for the inconvenience! | |
Arnold: 2-Jul-2012 | Because on MY REBOL environment labelfont still had a valid definition! It was still in memory from the earlier execution of the script. If tomorrow I start it again it will fail too! | |
Arnold: 2-Jul-2012 | @Rebolek Thanks, that wil be on the list together with line width and color and font-size preferences, a multilingual help function and a resize mechanism. ((: | |
Arnold: 2-Jul-2012 | Of course REBOL's 'case you mean 'switch (REBOL 3 knows a 'case) | |
GrahamC: 2-Jul-2012 | Rebol2 has a pretty straight forward case construct | |
Arnold: 3-Jul-2012 | This is the benefit of speaking another language than English that is the base for so many computerlanguages. You can say things like rij: array [100] where array: array [100] would be a sure syntax error, and rij means array in Dutch off course. If you are in need of additional translations, just say so. Next I will build a multi-lang support lbl-something/text: lbl-something-tekst and a preferences panel with file (mirror.ini or mirror-pref.ini) for language (En De Nl Fr Es Pt additional wishes?), mirror line-width normal(1)/bold(3 wide) for placed or both kinds and/or the grid, color of added mirrors, color for ok color for not ok. | |
Maxim: 3-Jul-2012 | I'm adding a visual and interactive mirror tracing layer so that you can just hover over the numbers and they shoot a visible ray across the grid :-) | |
Arnold: 3-Jul-2012 | Thanks, when I did the trick in my Java applet I had never expected to use XOR at all ever. In Java I had an field of 10by10. I'll explain a little. Starting top left having an initial direction south start on the first field of the grid. determine the next direction to go then step and repeat until you step of the board stap=step r row, k for column (kolom) so stapr or stapk will be 0 or 9. then you are on the other end of the board. the values along the board is a series of 32 elements going clockwise around the board. Go to the next field clockwise when right your init direction is west etc. | |
Arnold: 3-Jul-2012 | When determining the values around the board you skip the ones that already have a value. | |
Maxim: 3-Jul-2012 | yeah, I'm pretty close to getting it , right now I'm adapting the function which returns the current row-column based on the position, since I need it to handle position outside the edge of the grid-box. then I'll have the initial cell to use to start "walking" the grid. in the end, I'll just add a refinement to the function which does the waking so it returns a block of all the tiles is crossed and an indication of what edges it came in and out of (to make it easier to loop and draw). | |
Arnold: 3-Jul-2012 | Having the 3 layers on top of each other was a nice REBOL feature saving a little time redrawing the grid and other mirrors as was necessary in Java (well I am not an experienced Java programmer, so it was necessary for me to solve it like that) | |
Arnold: 3-Jul-2012 | Somewhere I have read that someone had a problem with a similar drawing trick, can't remember where unfortunately, but it made me fear this trick might be impossible. Luckely it did work like I implemented it right on the first try.. | |
Jerry: 9-Jul-2012 | Thanks. Kaj. I always thought that I should do something for the REBOL community. But in REBOL programming, I am not as good as any one of you. Finally, I found a way to make my contribution -- writing a book and trying to make REBOL popular in China. | |
Kaj: 9-Jul-2012 | You're right, this is a great contribution | |
Marco: 9-Jul-2012 | Congratulations, jerry. @Kay: RebRep is tied to Windows because I don't have a working linux box. I have tried to install Kubuntu 12.04 on an sdcard but it stops at the login where I don't know what to write since the most obvious "kubuntu" and <return> do not work. I have also tried ubuntu 12.04 and it works but have a nasty bug configuring audio and seems not to regognize all the hardware. | |
Arnold: 11-Jul-2012 | I was surprised to find my little project back on this new blog at rebol2.blogspot.com I hope this will help to show that there still is a bright future for REBOL ahead. | |
Kaj: 11-Jul-2012 | It's nice when a new REBOL user starts doing such a project right away :-) | |
Arnold: 11-Jul-2012 | Have you checked the new version yet? Learning a lot of new stuff about VID, getting more code out right the first time, etc. | |
Jerry: 13-Jul-2012 | You can see some pages of my REBOL book here http://ww1.sinaimg.cn/large/6037fd14jw1duv0gjoatwj.jpg It's a colorful book :-) | |
Arnold: 13-Jul-2012 | And a picture sometimes says more than a thousand words can. (Especially when your Chinese is a bit rusty like mine) :))) | |
Group: Rebol School ... REBOL School [web-public] | ||
Maxim: 13-Sep-2012 | I must admit that if you can receive events in the host, you can just execute a code string within the root ( just like if one enters a command in the prompt). It worked very well for interfacing with GLUT ... I had just built a little pseudo event system which I called from within the glut callback and it was fast enough to handle all events in real-time. | |
Marco: 16-Sep-2012 | How can I convert an integer! that is a pointer to a C struct returned by a library function to a binary! ? | |
BrianH: 16-Sep-2012 | With more C code that copies the binary to a REBOL-allocated buffer. You can't deallocate a pointer in REBOL. | |
Gregg: 16-Sep-2012 | Will this work? LPINT-def: [value [integer!]] none LPINT: make struct! LPINT-def none make-LPINT: does [make struct! LPINT-def none] get-dereferenced-data: func [ {Given a pointer to memory, copy the target data into a REBOL struct.} pointer [struct!] "LPINT structure" struct-def [block!] "Contains a sub-struct that is the real struct you want." /local struct data orig-pointer result ] [ struct: make struct! compose/deep/only [ ; make wrapper struct sub [struct! (struct-def)] ] none orig-pointer: third struct ; store original inner pointer change third struct third pointer ; change inner pointer to ref'd data data: copy third struct/sub ; copy data from the inner struct ;print mold data change third struct orig-pointer ; restore inner pointer result: make struct! struct-def none ; make result struct change third result data ; change data in result struct ;probe result struct: data: orig-pointer: none ;recycle result ] It's from some old code, so no guarantees. | |
Marco: 16-Sep-2012 | @BrianH I am writing in Rebol, I am not able to write C code. @Gregg I need to pass an integer! to a function that converts it to a binary, and your function expects a struct! how do I change it? | |
Ladislav: 16-Sep-2012 | You can't deallocate a pointer in REBOL. - that is false, use the http://www.fm.tul.cz/~ladislav/rebol/library-utils.r | |
MagnussonC: 18-Sep-2012 | I read a file, line by line and want parts of each line in certain variables. First is an integer then a space and then a 3-4 character word then a space and then the rest of the line in a string. I guess there is no way like in Perl to match those variabels at once and put the value in numbered variables. I suppose I need to parse that line with something like (thru "a" copy b to "c") once for each variable (or perhaps first char with line/1)!? | |
MaxV: 18-Sep-2012 | Please put some example, you are a bit vague | |
Maxim: 18-Sep-2012 | does this help? -------------------------- a: {123 abcd bla blca bla 534 hged bla blca bla 947 ahg psogie rpgioseg seo[rgieh rpgiu} digits: charset "0123456789" letters: charset [#"A" - #"Z" #"a" - #"z"] space: charset " " data: complement charset "^/" ctx: copy [ ] parse/all a [ some [ copy id some digits space copy var 3 4 letters space copy line-data some data ; we have a match for all data, add it in our container ( append ctx copy reduce [ to-set-word rejoin [var "-" id] line-data] ) "^/" ] ] ctx: context ctx probe ctx | |
Maxim: 18-Sep-2012 | obviously, this depends on the input data being pristine... if there are chances that the input isn't, then a bit more code would allow you to safely skip invalid lines. | |
Maxim: 18-Sep-2012 | I added a bit of processing to show how to use parse in order to actually do things beyond just match patterns. note that the paren is at the end, once we have all data we want to match. An error people often do is to start processing too soon. | |
NickD: 23-Sep-2012 | There has to be something Rebol is doing beyond a simple language api to get level of security purported by Carl. What kind of pipes does it use? | |
NickD: 23-Sep-2012 | My misunderstanding then. I do not even know what 'pipes' are. I am posing the question on behalf of another. The question started based on the understanding from a conversation with Carl concerning the security benefits of AltMe and the once pending contract with the CIA. | |
Kaj: 23-Sep-2012 | Pipes can also refer to local connections between processes, but that's originally a Unix technology | |
Kaj: 23-Sep-2012 | When AltME was introduces a decade ago, many communication systems were unencrypted, so it was good then. Like Lotus Notes at the time | |
Kaj: 23-Sep-2012 | It's also more secure because you run your own server, instead of handing your data to a provider. That's fundamental, as long as you keep the data safe on all AltME clients. Which is hard, because it's not encrypted on disk | |
MarcS: 3-Oct-2012 | (i left in a couple of examples to demonstrate usage) | |
MarcS: 3-Oct-2012 | as the title suggests, it's a fudge | |
Ladislav: 3-Oct-2012 | Actually, the SPEC block *is* modified, but in a way that may not matter often | |
MarcS: 3-Oct-2012 | i just thought i was setting up a new lexical scope | |
Ladislav: 3-Oct-2012 | THat is a complicated issue, but the principle is easy. USE modifies it BODY and should be treated as modifying. However, you can easily define a non-modifying version: USE words copy/deep body | |
Steeve: 3-Oct-2012 | Marcs, It only works if the word 'recur appears at the end of your function (like in safe). The code flow is never interrupted anywhere else. You should have used the throw/catch technique instead of simply setting a state (true/false) to control the iterations. Besides that, I think your code is a little convoluted (basically, you're just inserting the body of a function in a while loop. | |
MarcS: 3-Oct-2012 | [a] why would thow/catch be better here? | |
MarcS: 3-Oct-2012 | [b] why is it convoluted to convert to a loop? | |
Steeve: 3-Oct-2012 | To answer to the question: why tail recursion from anywhere ? What if you want conditionned recursion ? Recurse could appear inside a IF block not at at the tail. | |
MarcS: 3-Oct-2012 | yes, there's a shortcoming if you're recursing from within a conditional -- thanks for spotting that; will rework | |
Gregg: 3-Oct-2012 | The usage comment in the third version is very nice. On doc strings, try to keep them short, leaving detailed notes to the usage or other comments. e.g. rfunc: func [ {Defines a tail-call optimized user function, using RECUR for self-calls.} spec [block!] "Function spec (see: func)" body [block!] "Function body (modified) (see: func)" /local wrapped ] [ ... ] Short doc strings are nicer with HELP. | |
MarcS: 3-Oct-2012 | that was originally _args_ but i switched it out so that you could get a more readable recur call (i.e., cheekily make use of 'with' so that it read better) | |
Gregg: 3-Oct-2012 | Easy enough to add sigils to make it special. I don't general go as far as a gensym approach for things like this. | |
Ladislav: 3-Oct-2012 | also, there is a problem with the result I think | |
Steeve: 3-Oct-2012 | Here is a version with no locals, no temporary context, no shit and not tested ;-) rfunc: func [spec body][ func spec compose/deep [ forever [ set [(spec)] catch/name [ return (func spec body) (spec) ] 'recur ] ] ] recur: func [args][throw/name reduce args 'recur] | |
Steeve: 3-Oct-2012 | to return a value and stop the function you need to use 'return instead of 'break | |
MarcS: 3-Oct-2012 | well, it has to be a tail call | |
Steeve: 3-Oct-2012 | it's a tail call but it can be anywhere in the function body | |
MarcS: 3-Oct-2012 | not be pedantic, but i linked to that for the opening two sentences: In computer science, a tail call is a subroutine call that happens inside another procedure as its final action; it may produce a return value which is then immediately returned by the calling procedure. The call site is then said to be in tail position, i.e. at the end of the calling procedure. | |
Steeve: 3-Oct-2012 | I just decided it would be a new paradigm :-) | |
Ladislav: 3-Oct-2012 | Marc, to no pollute this group I posted a private conversation mentioning how to define a TAIL-CALL function using the function spec and how to handle the situation even if the function spec is "more complicated" than just a block of words. | |
Steeve: 3-Oct-2012 | It's Rebol School group here. Why would your post be a pollution ? I don't get it | |
Ladislav: 3-Oct-2012 | It is a bit long to my taste, but I can repost here if you prefer. Also, BTW, welcome to REBOL, Marc | |
Steeve: 3-Oct-2012 | Yes wellcome Marc. (Not really a beginner though) Yes Ladislav I've nothing against a long post here since it's related to the topic, or if you prefer you can use a copy/past service in the cloud. | |
Ladislav: 3-Oct-2012 | OK, this is the long version: tail-func: func [ { Define a recursive user function with the supplied SPEC and BODY. The function can use a special TAIL-CALL local function to perform a tail-recursive function call. } [catch] spec [block!] {Help string (opt) followed by arg words (and opt type and string)} body [block!] {The body block of the function} /local the-function tail-call context-word ] [ ; define a new 'tail-call local variable tail-call: use [tail-call] ['tail-call] ; bind the given BODY to "know" the 'tail-call variable body: bind/copy body tail-call ; find a local word in SPEC context-word: find spec word! if context-word [context-word: first context-word] ; define the TAIL-CALL function set tail-call func spec compose [ ( either context-word [ ; set parameters to the new arguments compose [set parameters values? (context-word)] ] [[]] ) throw/name none 'tail-call ] ; define the function the-function: throw-on-error [ func spec compose/deep [ (either context-word [context-word] [[]]) while [true] [ catch/name [ return do [(body)] ] 'tail-call ] ] ] if context-word [ ; get the function context context-word: bind? first second :the-function ; replace the context word in the function body by NONE change second :the-function none ; adjust the TAIL-CALL body ; replace the 'parameters word change/only at second get tail-call 2 bind first context-word context-word ] :the-function ] values?: func ['word] [second bind? word] | |
Steeve: 3-Oct-2012 | Hum Ok, I see the >> return do [(body)] as a nice optimization of my code. But for the rest, I'm not sure... | |
Steeve: 3-Oct-2012 | I used a trick not well known. >> do second function! allow to execute a function without having to pass its arguments. | |
Steeve: 3-Oct-2012 | Notice the weird sequence >> to-block form first object! That is because the local context returned from a function is not well formed. If the specs of the function are [a [block!] /local b], it will return a strange objetc! where: >> first object! == [a /local b] So to correct its format, I do >> to-block form first object == [a local b] | |
Gregg: 3-Oct-2012 | Marc, a simple naming question. Why did you choose 'recur instead of 'recurse? | |
Ladislav: 3-Oct-2012 | I think I included all your modifications Ladislav but shortly :-) - well, your version still - misses error handling - uses the arg-block passing method (which is a matter of preference, i.e. some may prefer that) - uses REDUCE which does not "tolerate" certain argument types | |
Steeve: 4-Oct-2012 | Ladislav, - uses the arg-block passing method (which is a matter of preference, i.e. some may prefer that) No it uses the regular passing method, like yours. - misses error handling True, though it's not that hard to figure where to add some throw-on-error. "- uses REDUCE which does not "tolerate" certain argument types" Good catch | |
DocKimbel: 4-Oct-2012 | Just a question about that very interesting thread on tail calls optimization: does at least one of the proposed solution support recursive function calls with refinements? (I had a quick look and it seems not, but I might have missed it). | |
Steeve: 4-Oct-2012 | Last version. - Any spec accepted but needs at least one parameter (can be just a local) rfunc: func [ [catch] spec [block!] body [block!] /local arg obj recur ][ throw-on-error [ if error? try [arg: to-lit-word first find spec any-word!][ make error! "rfunc needs at least one parameter." ] recur: func spec compose [throw/name bind? (:arg) 'recur] obj: catch/name [do second :recur] 'recur funct spec compose/deep [ recur: quote (:recur) forever [ set/any [(to-block form first obj)] second catch/name [ return do [(body)] ] 'recur ] ] ] ] | |
Steeve: 4-Oct-2012 | Not really fair, you redefine the throw word and expect it to work as is ? Your function got the same problem on my pc, except it occurs at the execution time. ** Script Error: Cannot use path on integer! value ** Where: tail-call ** Near: throw/name none 'tail-cal or maybe you have a new version right now (Actually I have problems with Altme to synchronize with some recent posts I can't see all of them currenly) | |
Ladislav: 4-Oct-2012 | (no "reserved words" at all, except that the 'tail-call word has got a special meaning as a function to make the tail call, however, it still *can* be redefined at the cost that the tail call cannot be made in such case since it is redefined) | |
DocKimbel: 4-Oct-2012 | Ladislav: would you be interested in improving the 'proxify function from the REBOL profiler I've built for Red project, it has the same kind of constraints as 'tail-call? The current code is a bit "rough", I don't have time to make a cleaner and simpler version of it. See code at: https://github.com/dockimbel/Red/blob/v0.3.0/red-system/utils/profiler.r | |
DocKimbel: 4-Oct-2012 | Also runtime performance is a big concern for such functions, so every little speed gain is good to take. | |
james_nak: 4-Oct-2012 | I have a script that runs another script (via do) but when I launch it from an icon or through startup, the other script asks for permission to open a port. I've tried looking for some properties to change in the icon and setting secure to allow (which brings up its own requester). How do I do this? | |
Steeve: 4-Oct-2012 | Completly changed my mind. It's lot leasier to manage /recur as a refinement! - eg. safe/recur instead of recur - no words collision anymore (obviously /recur can't be used as a parameter). Also really short code rfunc: func [[catch] spec [block!] body [block!] /local ctx fun][ spec: append copy spec /recur ctx: bind? first second fun: throw-on-error [func spec [recur]] change second :fun compose/deep [ if (in ctx 'recur) [throw/name second (ctx) 'recur] while [true][ set/any [(bind to-block form first ctx ctx)] catch/name [ return do [(bind/copy body ctx)] ] 'recur ] ] :fun ] | |
Ladislav: 4-Oct-2012 | It's lot leasier to manage /recur as a refinement! - yes, that is an interesting idea | |
Steeve: 5-Oct-2012 | ;Go back to recur as a function. ;Still recur can't be used as a parameter, local or a refinement. ;This implementation is much more clean (no shitty compose/deep) and still very short. ;The collision of words is avoided by the use of singleton functions #[function!] ;I'm confident with this one. It could be the last one -_-; rfunc: func [[catch] spec [block!] body [block!] /local ctx args][ ctx: bind? first second throw-on-error [ ;* Temporary function created to retrieve parameters ;* and to get a new context for 'recur. ;* The context will remain alive (not GC'ed). func append copy spec /recur [recur] ] args: bind to-block form first ctx ctx ctx/recur: func spec reduce [ quote #[function! ['word] [throw/name second bind? word 'recur]] first args ;* may be 'recur if empty specs (still, it's ok) ] func spec reduce [ quote #[function! [args body][ while [true][set/any args catch/name [return do body] 'recur] ]] head remove back tail args ;* remove 'recur bind/copy body ctx ;* bound 'recur ] ] | |
Steeve: 5-Oct-2012 | ;Go back to recur as a function. ;Still recur can't be used as a parameter, local or a refinement. ;This implementation is much more clean (no shitty compose/deep) and still very short. ;The collision of words is avoided by the use of singleton functions #[function!] ;I'm confident with this one. It could be the last one -_-; rfunc: func [[catch] spec [block!] body [block!] /local ctx args][ ctx: bind? first second throw-on-error [ ;* Temporary function created to retrieve parameters ;* and to get a new context for 'recur. ;* The context will remain alive (not GC'ed). func append copy spec /recur [recur] ] args: bind to-block form first ctx ctx ctx/recur: func spec reduce [ quote #[function! ['word] [throw/name second bind? word 'recur]] first args ;* may be 'recur if empty specs (still, it's ok) ] func spec reduce [ quote #[function! [args body][ while [true][set/any args catch/name [return do body] 'recur] ]] head remove back tail args ;* remove 'recur bind/copy body ctx ;* bound 'recur ] ] | |
Ladislav: 5-Oct-2012 | Well, I do have a different suggestion, which might make sense.... | |
Ladislav: 5-Oct-2012 | The fact is that the CATCH/NAME+THROW/NAME pair is not ideal for this, but I do have a function which might be able to handle even the G/RECUR case. | |
Steeve: 5-Oct-2012 | Maybe I forgot a [throw] attribute somewhere | |
BrianH: 5-Oct-2012 | I haven't examined the code enough to determine if this would help, but one trick to avoid having to reserve a word to refer to your recursion function is to use an inline reference to the function value instead. That is a trick that has been used in some mezzanine functions, though I don't know if they're still in REBOL. Inline references to function values are not rebound when you bind the code block that references them. | |
Ladislav: 5-Oct-2012 | Regarding my G/RECUR note, this is a CATCH version I specifically had in mind: | |
Ladislav: 5-Oct-2012 | Rebol [ Title: "Catch" File: %catch.r Date: 5-Oct-2012/17:49:58+2:00 Author: "Ladislav Mecir" Purpose: { Catches local throw' Ignores non-local throws } ] ; Error definition system/error: make system/error [ throw': make object! [ code: system/error/throw/code + 50 type: "throw' error" not-caught: ["throw' not caught"] ] ] catch': func [ {Catches a throw' from a block and returns the value.} [throw] block [block!] "Block to evaluate" /local err disarmed ] [ use [throw'] copy/deep compose/only [ ; "localize" 'throw' in the block block: (block) throw': func [[catch] value [any-type!]] [ disarmed: disarm err: make error! [throw' not-caught] set/any in disarmed 'arg1 get/any 'value disarmed/arg2: 'throw' throw err ] get/any either all [ error? set/any 'err try block ( disarmed: disarm err disarmed/type = 'throw' ) disarmed/id = 'not-caught disarmed/arg2 =? 'throw' ] [ in disarmed 'arg1 ] [ 'err ] ] ] | |
Steeve: 5-Oct-2012 | About the #[function!] vs func equivalence. It's not. The first one is a singleton, meaning only one version exists in memory (not recreated each time) | |
BrianH: 5-Oct-2012 | You can build that singleton when rfunc is called initially, or if you only need one then you can use funct/with to make a static local var with that value. (Still haven't analyzed the source.) | |
Ladislav: 5-Oct-2012 | However, Steeve, you probably do not understand what the problem with the f: rfunc [x] [if x = 2 [g/recur 3 5]] code is. The problem in a nutshell is that the G/RECUR call uses G/RECUR calling convention and "expects" the G/RECUR call to be used; however, the CATCH/NAME+THROW/NAME pair does not respect that and actually would do the call of F/RECUR. | |
Ladislav: 5-Oct-2012 | (with a possibly incompatible calling convention) | |
Steeve: 5-Oct-2012 | This time it's really really my final version T_T - Both f/recur and recur allowed - Catch/throw interferences ok. NB: The code would be simpler in R3 since several workarounds are used to correct misbehaviors of object related natives of R2. Also the lack of the reflexive capability for a function to read its own context in a easy way is definitivly a huge miss. (On can't create anonymous functions without analysing their specs first. What a pain) One would need a reserved word holding the context (like SELF for objects). These shortcomings are making the code too much obfuscated and huge for my taste. I hope it will be corrected in R3.. rfunc: func [ [catch] spec [block!] body [block!] /local ctx args call-tail ][ ctx: bind? first second throw-on-error [ func spec: append copy spec /recur [recur] ] args: bind head remove back tail to-block form first ctx ctx call-tail: func ['word] compose/deep [ set/any [(args)] second bind? word throw/name (ctx) 'recur ] ctx/recur: func spec reduce [:call-tail 'recur] func spec reduce [ quote #[function! [ [throw] 'recur 'call-tail ctx args body /local ret ][ if get/any recur [call-tail :recur] set recur get in ctx 'recur while [true][ set/any 'ret catch/name [return do body] 'recur unless all [value? 'ret same? :ret ctx][ throw/name get/any 'ret 'recur ] set/any args second ctx ] ]] 'recur :call-tail ctx args body ] ] | |
Arnold: 7-Oct-2012 | VID question. Is it possible to combine more than 1 fontsize, color within the text on a element like a label? I want to emphasize a small piece of the text. | |
Arnold: 7-Oct-2012 | That is a idea. The text to emphasize is the text that you get to read. Then it disappear and you have to type it yourself. It is a progam from a schoolprogram for young children. I want to replicate it and maybe add a little fun for my daughter thinks it is boring as it is now. | |
Henrik: 7-Oct-2012 | it's also possible to simply add a pane of faces that construct the text in the necessary parts. with SIZE-TEXT you can then calculate the necessary size of each part and write a little routine to lay it out. it's a bit of work, though. | |
Arnold: 8-Oct-2012 | Henrik, my initial idea was that it should be possible to make such a text/label facet where the text and markup are stored in array/blocks. The markup could just be a referral to a markup defined elsewhere. Not that I am afraid of a little work but right now I think I can manage what I want using just a new textcolor ;) I named my Text+ field piep and calculated size-text piep to be 0x15. Doesn't look correct. Also "word' url" should be "word 'url" in render-rich-text /local declaration? | |
Henrik: 8-Oct-2012 | I usually use a test face first for SIZE-TEXT. It's important that the test face has the dimensions to at least contain the text, as you want it formatted. When you then use that face as an argument to SIZE-TEXT, it returns the face size. That face size can then be used to set the size of the real text face. | |
Sujoy: 10-Oct-2012 | so i copied the files over to a new directory, then when i try >> do %uni-engine.r >> uniserve/boot ...i get a bunch of errors saying cheyenne is not defined using the old (0.99) sources on the softinnov website, i can use the starter.r script just fine. However, i set up a simple service and a module to process tasks, but get: ** Script Error: Cannot use path on none! value ** Where: process-task ** Near: if shared/pool-max > shared/pool-count [ fork if verbose > 0 [log/info "launching new process"] ] | |
Sujoy: 10-Oct-2012 | the service is a simple test: install-service [ name: 'test port-id: 9000 module: 'my-module on-load: func[] [ do %scheduler.r scheduler/plan [every 10 s do my-func] scheduler/wait ] on-task-done: func[data] [print data] my-func: func[][ data: load datafile foreach [key value] data [ shared/do-task [value] self ] ] ] |
901 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 8 | 9 | [10] | 11 | 12 | ... | 643 | 644 | 645 | 646 | 647 |