AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 4382 |
r3wp | 44224 |
total: | 48606 |
results window for this page: [start: 34301 end: 34400]
world-name: r3wp
Group: Core ... Discuss core issues [web-public] | ||
Gregg: 4-Jan-2010 | I think that's the point Steeve. Looking for new ways to express things, that may be useful, and may inspire more useful adaptations. | |
Anton: 4-Jan-2010 | Bolek, that's very interesting for me because I was searching for just such a declarative dialect for sound generation and music composition. | |
Rebolek: 4-Jan-2010 | Pekr, vectors are really great. But they need few improvements and bugfixes here and there. I wrote a document what doesn't work and should some time ago (has been two years already? I think so). I haven't looked at them recently, so maybe they're improved already. I should check my R3 AIFF/WAV loaders/savers wheter they work as they have been the best test for vectors I had. | |
Pekr: 4-Jan-2010 | High priority for Vector says - Basic vector! conversions and ops ... dunno how Carl sticks to the published project plan though ... | |
Rebolek: 4-Jan-2010 | Pavel, yes it is. But you can say that binary! is subset of vector! - 8bit unsigned vector. With vector! You can generate for example 16bit signed stream and then just add WAV/AIFF header. So vector! is superior to binary! from this point of view. | |
james_nak: 5-Jan-2010 | Smart guys. This may seem elementary but I need to check if certain ports are open on a windows machine. For example, port 8881. I use something like error? try [close open to-url "tcp://:8881"] (building these strings with various port numbers). My problem is I don't know how to check if it is working. I turn on the firewall and it doesn't seem to make a difference. Perhaps my thinking is all wrong and all I am doing is checking within the firewall. Any thoughts? | |
Graham: 5-Jan-2010 | if you want to check if there is a server port listening then you can do open tcp://localhost:8881 and if you want to see if that port is open to the outside, then you need to use another PC to probe that port address | |
Graham: 5-Jan-2010 | how about attempt [ print i close open join tcp://server: i append opened i ] and do without the p, and the all .... | |
james_nak: 5-Jan-2010 | Thanks Graham and Sqlab. One step further if you please. What would you suggest the steps would be to test the code. Right now when I run the test I get no opened ports. I've turned the firewall off and on but the results are the same. I've been studying the nettools.r code and thinking that maybe I'm not thinking this right. What I want to know is if a certain port will allow it to be open so that this particular application has can use.it. What is happening is customers are installing the app and having trouble because these certain ports are unavailable. What I wanted to create was a quick and easy pre-install test to verify these ports were open. This partly due to the fact that they way the software was written it doesn't tell you that a closed port is the problem. It simply stops worting. I appreciate the feedback you have given. | |
Dockimbel: 5-Jan-2010 | Cheyenne has such opened listen port detection capabilities (added recently), you can extract the code from the SVN repo (search for 'list-listen-ports function) : http://code.google.com/p/cheyenne-server/source/browse/trunk/Cheyenne/misc/win32.r Linux and OS X versions are also available in %misc/unix.r and %misc/macosx.r | |
Graham: 5-Jan-2010 | If the firewall is off, but no one is listening ... then you'll get a closed port same as if the firewall is on, and someone is listening... | |
Claude: 5-Jan-2010 | what about R3 status ? make uptodate R2 is very fine but i would prefer a R3 version with GUI and ODBC or MYSQL ..................; | |
BrianH: 5-Jan-2010 | The R3 GUI is still in development. The database model hasn't even been designed yet. You can make wrappers for ODBC and MySQL if you want to write the extensions - Robert has already started doing so for SQLite. Once device extensions are supported, we can start to get to work on the database model. | |
Claude: 5-Jan-2010 | thank you for your effort on R3 and R2 | |
Claude: 5-Jan-2010 | i am just like an end user on R3. and for me i am not a guru like you and others !!!!! | |
Claude: 5-Jan-2010 | i just want to see more info and screen on the new GUI of R3 (i am very curious :-) ) | |
BrianH: 5-Jan-2010 | There will be no miracle that will bring the GUI or database to the first R3 release - they just aren't done yet, and can't be done with the level of community involvement that the alpha releases have engendered. Too many critical people are waiting for a beta or full release before they will even start to get involved. Fortunately we are on the rapid release model, so there is no such thing as a "final" or "full" feature set, just the feature set of a particular release. | |
Graham: 5-Jan-2010 | and this is in the wrong group ... | |
Janko: 8-Jan-2010 | it would be very helpfull if rebol could let you define functs that would warn you if you used or defined any global words .. I suppose my programs are 100% more uncertain because I forget to include some of the words I defined in words as local. If some 'funcstrict' for example would warn me of any such mistake I would sleep much better. Other but worse option is that there would be some lint like tool that would look at code and warn you of these | |
Dockimbel: 8-Jan-2010 | AFAIK, static code analysis cannot be used on REBOL source code to infer the runtime behaviour accurately , word! values can be constructed and dynamically bound at runtime. Same reason why REBOL is not compilable. | |
Janko: 8-Jan-2010 | I imagine when you now set some word in some function it looks at /local words and it it's there it creates a local word, if not it just sets a word (globaly).. let's say that there is funcstrinct that in second case just throws an error (probably something like that could be made in rebol itself) | |
Janko: 8-Jan-2010 | Doc .. thanks a lot for that query word ... it' awesome to see on a page what all got set in the process.. this will help me the to make code more strong A LOT! Doc.. how does the runtime binding to function local words work? func is probably not a mezzaine or something where we could peek into what it does with /local words ? Henrik: I need to learn more about them and how to use them .. are there any good docs to read about what contexts are used for maybe? | |
Dockimbel: 8-Jan-2010 | Janko, a function is a context! value like objects. You can use the following mental analogy to see how it is related : foo: func ["for demo" a [integer!] /local b][...] would be *roughly* equivalent to constructing an object like that : foo-def: make object! [ hidden-ctx: make object! [a: none local: none b: none] body: [...] spec: ["for demo" a [integer!] /local b] ] The body is bound to the 'hidden-ctx context at function creation. When calling 'foo, the interpreter will set the 'hidden-ctx object words values according to passed arguments and refinements and then DO 'body. There's no differences on how REBOL treats "arguments" and "local words", it's part of the illusion. The /local refinement is used by *convention* only, to set "local words", you could just decide to use any other refinement for the same job. Here's an example : >> a: func [/local b][print b] >> a/local 5 5 Additionnaly, when you apply the ordinal natives on a function! value, you get : >> first :foo == [a /local b] ;=> the hidden context words >> second :foo == [...] ;=> the function body block >> third :foo == ["for demo" a [integer!] /local b] ;=> the original spec block | |
Janko: 8-Jan-2010 | huh.. plenty of info, might need some time to process this to get all that you two meant . but I did already know first :foo second: foo stuff (I was playing with rebol to js compiler) and I did know that context is object | |
Janko: 8-Jan-2010 | if function uses objects and bind internally or something like that, then objects in rebol and bind should be cheap right? and then an object is cheaper than function ? | |
Dockimbel: 8-Jan-2010 | Object! and function! have different creation and usage semantics, AFAIU, they share a common internal parent datatype, context!. So, context! (which is not directly accessible) should be "cheaper". Objects and functions have different purposes, so this might be like comparing apples and oranges...in a closed blackbox. | |
Dockimbel: 8-Jan-2010 | BIND on a block! does a full recursive traversal of the block! and for each word! found, does a fast lookup in the target context (probably hashed). So the cost is directly proportional to the size and depth of the argument block!. | |
Terry: 8-Jan-2010 | Is it just me, or does anyone else find JOIN and REJOIN cumbersome? | |
Steeve: 8-Jan-2010 | Terry, show use case you think is cumbersome and we'll show you a simpler way (i hope) | |
Terry: 8-Jan-2010 | $varA =<<<VA \'hello\'s {Worlds \'; VA; $varB =<<<VB 'and {so "on'; VB; $n=<<<HD <button onclick="alert('$varA ');">CLICK ME</button> $varB HD; echo $n; | |
Terry: 8-Jan-2010 | so.. the result is a button that alerts.. \'hello\'s {Worlds \'; ...and prints... 'and {so "on'; after the button | |
Terry: 8-Jan-2010 | no comments.. that's functioning php.. and if you don't escape it, it doesn't function as JS | |
Steeve: 8-Jan-2010 | Terry, i don't think your output must be { \'hello\'s {Worlds \'; ...and prints... 'and {so "on'; } And yet, that's what you show us actually | |
Gregg: 8-Jan-2010 | Now, that's norribly naive, and doesn't work because of that. e.g. it needs a space before the $ marker, so a var at the beginning of the text gets missed. | |
Steeve: 8-Jan-2010 | I say it again, you didn't give us the real output. Doing some assumptions, i got this. varA: { \'hello\'s ^{Worlds \';} varB: { 'and ^{so "on'; } print rejoin [{<button onclick="alert('} varA {');">CLICK ME</button>} varB ] <button onclick="alert(' \'hello\'s {Worlds \';');">CLICK ME</button> 'and {so "on'; So where is the burden ? i don't see one | |
Terry: 9-Jan-2010 | Steeve, it's cumbersome.. I spend more time joining and escaping than anything else. | |
Steeve: 15-Jan-2010 | is that less readable than a comnination of any/all/case/if ? And you can align your code. CASE hase the most readable structure for complex tests Why should have demonstrate such obvious thing ? ;-) fail: [none] case [ not mark: find myline "text" fail 4 <> length? mark fail ... ] | |
Steeve: 15-Jan-2010 | and most of the time, it's the fastest way of doing tests | |
Steeve: 15-Jan-2010 | Back in time digression... I have often noticed that it is unemployed as a method for complex testings. In general it's faster and more easily readable than a serie of nested if / else. But to do such, the programmer must know how testings can be complemented and other simplification technics. The novice programmers (whatever the language) often find it difficult to do it correctly. This is probably a gap in computer education. We don't learn anymore the basics of Boolean algebra. At least for me it is an important criterion to determine the general level of someone in computer sciences. If I see too many nested if / else in a program. I think the personn lacks of solid foundations in programming. | |
Maxim: 15-Jan-2010 | and either in a compose is very powerfull... cause it allows conditional serie content creation). ; when false, an empty block is returned and compose ignores it. draw-blk: compose [ (either gfx? [ [pen black circle 30x30 ][ [ ] ])] this example is simple but when creating very complex draw blocks on the fly, I often have a few cascaded compose blocks, and in some cases, the resulting draw block is an empty block even if it takes 100 lines to get to that. the language will skip the nested composes if an outer condition is false, so in fact, its VERY fast. | |
Maxim: 15-Jan-2010 | and if you optimize you can do other stuff, but it gets unreadable real fast. | |
Steeve: 15-Jan-2010 | It's not really my point here. There are advanced technics in Rebol to optimize the code. I don't blame anyone to not know them all (me neither). I was comparing nested (messy) testings structures vs. flat (readable) structures. And the reason why people use the bad way and not the right way ;-) | |
Maxim: 15-Jan-2010 | to have conditional data creation code INSIDE the data is not something you see in other languages. its usually a mess of conditionals which try to cover all possible permutations, as you explain... here, there is no need since the data's structure itself will represent all conditions naturally and directly. changing the structure of the data doesn't require code rewriting cause they are one and the same. | |
Maxim: 15-Jan-2010 | these are the tidbits we learn along the way. there seem to be a few common milestones.... when you get to "grasp" that words aren't variables... that is usually one of the first big ones... and the big one is when you understand what/how binding really works. | |
Maxim: 15-Jan-2010 | realizing that a block can hold [ a a a ] and yet each 'a is actually a different value. ;-) | |
Gregg: 15-Jan-2010 | And in this case, it's easy to try and see if you like it. length??: func [series [series! none!]] [ all [series length? series] ] | |
Maxim: 15-Jan-2010 | also as a general learning experience.... code written by Carl and study it. its very had to read, cause Carl optimised the word count so its ridiculously compact.. but there are a lot of little coding gems in some of the patterns he uses. and it helps a lot to understand some of the ideas behind many functions which might look obscure or rarely used. | |
Davide: 15-Jan-2010 | I personally prefer when a function accepts none value and doesn't stop with an error but returns none. The code is more compact and I can write error handler only If I really need it. | |
Maxim: 16-Jan-2010 | Thru the years I have come to the same conclusion as Henrik. I have much less error trapping than I used to. I'd rather have the crashes and fix them. f | |
ChristianE: 20-Jan-2010 | I guess additional refinements to a function as fundamental as INSERT are a no-go for performance reasons. Probably ALTER/INSERT or ALTER/ONCE though: >> alter/once [] flag == [flag] >> alter/once [flag] flag == [flag] See the dance REBOL/View's FLAG-FACE is doing to achieve something like that (and a little bit more): flag-face: func [ "Sets a flag in a VID face." face [object!] 'flag ][ if none? face/flags [face/flags: copy [flags]] if not find face/flags 'flags [face/flags: copy face/flags insert face/flags 'flags] append face/flags flag ] | |
Maxim: 20-Jan-2010 | I'd call the function include... and it could work on strings too, doing a find | |
ChristianE: 20-Jan-2010 | INCLUDE in R3 is not a global word, in the code im currently writing >> include package/changes 'weight reads very nice. Sadly, it's signature wouldn't be compatible with EXCLUDE, which only allows series and sets as it's second argument. The two refinements /INCLUDE and /EXCLUDE though would make ALTER more usefull. | |
ChristianE: 20-Jan-2010 | Yeah, it is a common idiom. But some symmetry to REMOVE FIND FLAGS FLAG would be nice, and I don't expect Carl or anyone to be willing to replace REMOVE FIND by another native or mezzanine. That wouldn't be worth it. For now, I've decided to go with >> union package/changes [weight] >> exclude package/changes [address] since speed is really nothing to worry about in my case now. | |
Gregg: 21-Jan-2010 | I would still like to set up metrics to see what funcs are used most, for both development and production (i.e. profiling), and set up a rating system. There have been some ad hoc analyzers in the past, but no reference system. Yes, Graham, I know. I should just do it. :-) | |
Pekr: 21-Jan-2010 | Graham - we should stick it into REBOL3 channels and post to Carl via all possible channels. R3 "developments" once again completly sucks... | |
Graham: 21-Jan-2010 | The lack of carry thru from Carl just totally sucks ... and is extremely disincentivizing | |
Janko: 21-Jan-2010 | --- ok.. moving here from !REBOL3 talking about a sandoxed execution option and option to somehow separate native Rebol pure and unpure functions | |
Janko: 21-Jan-2010 | for example you know join will just "calculate" result and you can't screw up anything existing with it... where append can , or set can even more | |
Graham: 21-Jan-2010 | well, you can scan the incoming function and disallow 'set | |
Janko: 21-Jan-2010 | I will give another example where I claim doing a dialect for it all is useless option. So you have a rebol server that holds a big block of users in ram you send it 2 functions a filter >> function [ U ] [ all [ greater? U/age 20 lesser U/age 30 equal? U/gender 'female ] << and a mapping function >> function [ U ] [ uppercase rejoin [ U/name " " U/surname ] ] << server will accept the code and collect items where first returns true then process them vith mapping function join them with reducing >> function [ U ACC ] [ rejoin [ ACC ", " U ]<< function and return the result. | |
Janko: 21-Jan-2010 | - the point here being that all functions used rejoin greater? equal? lesser? uppercase? are pure functions and can't screw up anything whatsoever - second point is that to do this via dialect you would have to recreate whole rebol in rebol which is very very suboptimal (why do we have an interpreted lang then??) - so if you could sandbox execution of functions , for example by only allowing pure rebol functions this would be solved | |
Graham: 21-Jan-2010 | No you don't ... only one person has to do it and shares it with everyone else. Thank you very much. | |
Janko: 21-Jan-2010 | Graham: I don't know what you meant with that scentence. If I came out as arrogant or attacking you in my writing above, I can say I *really* didn't mean it. I am just trying to get my message accross, which I am not so good at since english is not my native lang, it's 1:25 in the night here and I am a little nerwous since I told someone I will finish something before tomorrow and I am chatting here instead of doing it :) | |
BrianH: 21-Jan-2010 | That's the difference between sandboxing and going side-effect-free. | |
Janko: 21-Jan-2010 | yes, that would be even 10x better :) if runtime could wrap something and not allow it mess anything whaterver it calls! | |
Janko: 21-Jan-2010 | so you are saying something like this could be possible in R3.. well you have my and Sunanda's vote for that :) (we talked in !REBOL3 earlyer) | |
Janko: 21-Jan-2010 | aha, but wouldn't that be recreating rebol in rebol. and chance is that that rebol will behave a little different than normal rebol in some edge cases | |
BrianH: 21-Jan-2010 | Well, in R3 we don't have pointers or pointer arithmetic, you can't just reference arbitrary memory, all data has to be either literal or returned from a function. Words aren't bound by default, they are bound by the LOAD and DO mezzanine code, which can easily be replaced for your sandboxed code. The code can run in an isolated module with careful control of its imports. | |
Graham: 21-Jan-2010 | I'd like users to construct their own sql as well and send it to the server ... but I don't | |
Graham: 21-Jan-2010 | If I new enough about sql .. I could scan their query and check for safety | |
Janko: 21-Jan-2010 | Maybe something related .. why google is using Lua : http://google-opensource.blogspot.com/2010/01/love-for-luajit.html http://article.gmane.org/gmane.comp.lang.lua.general/62321 >>Our Lua usage isn't too widespread at the moment; it's really one infrastructure project in particular that uses Lua to allow user-defined functions to run within a tightly controlled container. Lua was the best choice, because of its low overhead, fast execution, and the ability to set limits on execution time.<< | |
Janko: 21-Jan-2010 | I embedded lua and nekovm when I was working at some game to make levels scriptable instead of data driven. It was really nice way to make games, and if I could I would much rather use rebol. rebol is the data and dialect language which is main point of embedding dynamic languages in the first place | |
BrianH: 21-Jan-2010 | And these embedded dialects could even resemble a subset of the DO dialect. | |
BrianH: 21-Jan-2010 | It will be a little tricky if you want to support get-word and lit-word parameters. It might be at the same scale as APPLY in R2. See the source of APPLY for details. | |
BrianH: 21-Jan-2010 | Take a look at the new functions in 2.7.7, particularly APPLY and CLOSURE. | |
BrianH: 21-Jan-2010 | And how would the pipe know to send to the second parameter, when the first and third also allow block parameters? REMOVE-EACH is just another function - the meaning of its parameters is specific to that function. | |
Gregg: 23-Jan-2010 | Janko, Ladislav did the most extensive CURRY I know of, though Joel Neely also did one, and a number of us have rolled simple versions here and there. http://www.fm.tul.cz/~ladislav/rebol/curry.r | |
Maxim: 24-Jan-2010 | where name is the name of the variable which stores the xml and your-xml-data is, obviously, your xml file content. you might also need to url-encode the xml-data so it gets read properly at the other end. | |
Terry: 24-Jan-2010 | and then chokes.. im thinking it the rest header is lacking somehow.. but if it's asking for just xml, where would I shove it? I would think the rebol custom 'post' would do that.. but yeah, probably needs the Content-Type: "application/xml" .. ? It's this kind of verbose nonsense that should have been left behind in the last century. | |
Maxim: 24-Jan-2010 | for example, I did an interface for the meetup.com site in an hour, but their API docs are VERY well done and its really simple. | |
Maxim: 24-Jan-2010 | -you open a tcp listen port -edit the hosts file so your remote server points to 127.0.0.1 -and then just print out the data which the client would have sent to the server. this works for just about every networked application I have tried and is a very powerfull way to learn how to build custom clients in rebol | |
Graham: 24-Jan-2010 | decimal! and integer! where the latter specifies the number of decimal places | |
Maxim: 24-Jan-2010 | I've done my own, and its similar, in size and functionality... not much to do... the scientific notation is a pain to manage. | |
Henrik: 24-Jan-2010 | Yes, agree. I'm helping building a rather large app, where this is important and when things like this aren't trivial to solve... But what ever happens, I think we need a function like this in R3 and R2-Forward. | |
BrianH: 24-Jan-2010 | The disadvantage to that is that it makes the FORMAT function more complex, and thus slow. | |
Gregg: 24-Jan-2010 | It's just chocies. Format, as it stands, isn't something I'll use. And if someone shows me a case where the overhead has a noticable and visible impact on their code, I will refactor a custom version for them. :-) I'm open to discussion, scenarios, and the backs of envelopes. Where is FORMAT likely to be used, how often will it be called, and how slow is too slow? | |
BrianH: 25-Jan-2010 | It will tell you evaluations and series created, which is a bit more cross-platform reliable than time. Don't know how fast your CPU is. | |
Steeve: 25-Jan-2010 | SPEED? sould be ehnanced to output system informations (like the CPU, frequency and OS) | |
Henrik: 25-Jan-2010 | Graham, wouldn't it be more appropriate to simply never output scientific numbering and then create a scientific formatting function? | |
amacleod: 26-Jan-2010 | Ok, I see...its a combo of string and decimal.. | |
james_nak: 26-Jan-2010 | Graham, here's the issue: I have some vid objects such as ua-fname: field. They follow a pattern in that the "ua" stands for "User Add" and the rest corresponds to the actual field name in the DB. The function I am writing is created in a way to be very generic and knows how to handle an insert into the DB based on a few parameters. What I am looking for is a way to "create" a name by joining "ua-" and field name which refers to the actual vid gadget. | |
james_nak: 27-Jan-2010 | Graham, you are the man. That works perfectly. Thanks for the info and saving me a ton of time. That's one of those "How in the world did you know that?" things to me. I guess that "do" says "What does this mean to me?" - the "me" being Rebol . I appreciate your help (once again). | |
Gregg: 27-Jan-2010 | Has anyone extended the FOR* funcs to have special handling options for the first and last elements? Gab's power-mezz, and an idea from another template generator made me think of how I do that today. Here's the basic idea: | |
Gregg: 27-Jan-2010 | forskip+: func [ "Like FORSKIP, but with local FIRST? and LAST? support." [throw catch] 'word [word!] {Word set to each position in series and changed as a result} skip-num [integer!] "Number of values to skip each time" body [block!] "Block to evaluate each time" /local orig result ][ if not positive? skip-num [throw make error! join [script invalid-arg] skip-num] if not any [ series? get word port? get word ] [ throw make error! {forskip/forall expected word argument to refer to a series or port!} ] orig: get word use [first? last?] [ first?: true last?: false body: bind/copy body 'first? while [any [not tail? get word (set word orig false)]] [ if tail? skip get word skip-num [last?: true] set/any 'result do body set word skip get word skip-num first?: false get/any 'result ] ] ] | |
BrianH: 27-Jan-2010 | FIRST? seems like HEAD? with an assumed parameter, and LAST? seems like SINGLE? with an assumed parameter. | |
BrianH: 27-Jan-2010 | SINGLE? is in R3 and will be in 2.7.8. | |
Gregg: 27-Jan-2010 | And LAST? wouldn't be like SINGLE? in the context of FORSKIP with a bump value other than 1. | |
BrianH: 27-Jan-2010 | Much of the R2/Forward stuff has been incorporated into 2.7.7 already, and most of the rest (except maybe 3 functions) will be in 2.7.8. | |
Graham: 27-Jan-2010 | I've been writing stuff using R3 functions ... and it seems a waste of my time to rewrite for R2 | |
BrianH: 27-Jan-2010 | The R2/Forward functions that are unlikely to be incorporated in R2 directly are APPEND, REMOLD and LIST-DIR; the first two because they demonstrate the problem with adding too many options to a function, and the latter because it isn't good enough yet, even in the R3 version. |
34301 / 48606 | 1 | 2 | 3 | 4 | 5 | ... | 342 | 343 | [344] | 345 | 346 | ... | 483 | 484 | 485 | 486 | 487 |