World: r3wp
[Core] Discuss core issues
older newer | first last |
Graham 5-Nov-2008 [11269] | instead of 'truncate, how about 'peel ? |
PeterWood 5-Nov-2008 [11270] | If you are removing characters from both ends of a string 'strip would appear to be a more precise description. |
Graham 5-Nov-2008 [11271] | Hmm. You can strip the inner lining of something, but normally you only peel the outer layers :) |
PeterWood 5-Nov-2008 [11272] | If that's you definition of stripping it's no wonder you live in NZ. |
Graham 5-Nov-2008 [11273x3] | However, my preference is to add some dialect to trim ... |
rather than to keep adding words | |
Strip mining? | |
PeterWood 5-Nov-2008 [11276] | Stripping paint? stripping wallpaper? |
Graham 5-Nov-2008 [11277x3] | strip a joint ... = remove the contents |
so, peel has a more restrictive meaning being a subset of strip. | |
I hope we are both joking here :) | |
Rebolek 5-Nov-2008 [11280x2] | 'trim is not good fo this? |
>> trim/with "[Something]" "[]" == "Something" | |
Graham 5-Nov-2008 [11282x2] | it would have to be trim/head/tail/with to avoid removing characters inside ... |
but certainly I forgot about trim/with ! | |
Rebolek 5-Nov-2008 [11284x2] | Hm, it doesn't work |
>> trim/head/tail/with "[Some[]thing]" "[]" ** Script Error: Invalid path value: with ** Near: trim/head/tail/with "[Some[]thing]" "[]" | |
Gregg 5-Nov-2008 [11286] | I'm not a big fan of the -n syntax to mean "from the end", but that's just me. It's convenient to type, but doesn't provide meaning. My BOUNDS/RANGE dialect supports .. notation via tuples so you can't use negative numbers. For the trim/strip stuff, I ended up with a bunch of related funcs (begins-with?, ends-with?, enclose, etc.), and it works for more than single chars. Not as simple as a standalone func, but more robust and flexible for the general case. |
Graham 7-Nov-2008 [11287] | Why can't we have functions that return a value to the calling function, but then continue to do something else ? Is this because we lack multithreading? |
PeterWood 7-Nov-2008 [11288] | If you're not looking for further return values, you could approximate this behaviour by using call or launch. |
Graham 7-Nov-2008 [11289x2] | too expensive |
but yes, that is what we have to do at present | |
Pekr 8-Nov-2008 [11291] | Graham: how could single threaded code return, and yet continue to execute recent function? What usability case do you have in mind here? |
Graham 8-Nov-2008 [11292] | web servers |
BrianH 8-Nov-2008 [11293x2] | Would reentrant functions with static variables do? |
For that matter, do you mean continue to do something else while the calling function is also doing something with your return value (multitasking) or do you mean picking up where you left off, later (generators)? | |
Graham 8-Nov-2008 [11295] | the former |
BrianH 8-Nov-2008 [11296] | For REBOL 2, multitasking means multiprocessing, sorry. |
Henrik 12-Nov-2008 [11297] | Is there a way to read out the uptime for a rebol process inside rebol? |
Pekr 12-Nov-2008 [11298] | I think not. The only way might be to set start: now at the beginning, and then read it out somehow. If the process crashes though, you are lost. You could write it to log from time to time, to see, what was happening and when .... |
Henrik 12-Nov-2008 [11299x2] | I'm writing a simple log from Cheyenne to see if I can catch a bug in the HTML dialect, but it could be useful to read out something like system/uptime without relying on someone making a timestamp at startup beforehand. |
Added to RAMBO. | |
Pekr 12-Nov-2008 [11301] | maybe now/uptime ? |
Henrik 12-Nov-2008 [11302] | That would cause overhead to such an important function. |
Sunanda 12-Nov-2008 [11303] | Does Cheyenne create any files at startup? If so, you could get their current timestamp and subtract. |
Henrik 12-Nov-2008 [11304] | It wouldn't work if I were to calculate uptime per process. |
amacleod 24-Nov-2008 [11305] | How do I download an .exe file and save it locally preserving the icon data. If I download a file trhough my browser the Icon downloads too. How do I do this with rebol? Do I read-thru and write to save it? I seem lose the icon this way. THe windows default .exe icon shows. |
[unknown: 5] 24-Nov-2008 [11306] | icons are usually included in the exe file. |
amacleod 24-Nov-2008 [11307x2] | I got it... I forgot to write binary (write/binary). |
Is it possible to use get-modes on files on a server? ie. Can I extraxt the creation date from a file on a web site.? | |
Graham 24-Nov-2008 [11309] | info? http://...../file |
Joe 26-Nov-2008 [11310] | get-modes tcp:// 'interfaces lists the different nics eth0 eth1 but not the different ips in one nic, e.g. eth0:0 eth0:1 . Any idea how I could make the smtp send command use one specific ip ? thanks |
Gabriele 26-Nov-2008 [11311x2] | Joe, if I understand what you mean correctly... I think REBOL can't do that. |
you might be able to use iptables (or equivalent) to do something like that, by basically doing a sort of nat. | |
Pavel 26-Nov-2008 [11313x2] | What is a difference between block, hash, list how to use them properly, what is an advantage and payof of each one? This is not properly described in documentation IMHO, exist some good resource of knowledges? |
Is an additional structures (for hash and list) accessible somehow, can be similar structures defined in clean rebol or native only? | |
Sunanda 26-Nov-2008 [11315] | A hash is a block optimsed for 'find A list is a block optimised for 'insert and 'append Hash is very likely to be replaced by something else in R3 A note from Gregg about using list: http://www.rebol.org/ml-display-thread.r?m=rmlQFPC |
Pavel 26-Nov-2008 [11316x2] | THX for info |
And the 2nd question? Anybody? | |
Graham 26-Nov-2008 [11318] | native |
older newer | first last |