r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

Gabriele
15-Jul-2010
[17571]
The primary purpose of SAVE is to save scripts that are to later 
be processed by DO.

 - weird, i always use save and load to save and load data. but, even 
 if that was the case, save/all would work just as well, so this is 
 a silly argument.
Graham
15-Jul-2010
[17572]
Hmm... I recall saving rebol objects with save/all and not being 
able to load them again properly
Gabriele
15-Jul-2010
[17573]
but SAVE is not only for DED, THAT is my point.

 - in that case, SAVE/ALL is *BETTER* than SAVE. there is no argument 
 about that.
Graham
15-Jul-2010
[17574]
some problem with functions inside objects or something
Gabriele
15-Jul-2010
[17575x5]
If you write them out directly in that syntax, you are mixing paradigms.

 - that makes NO sense. I write them directly MANY times because it 
 saves useless evaluation of DATA
Brian: your #[function! ] example is something I have ALWAYS pointed 
out as a bug and you ALWAYS countered by saying it is a "security 
feature" which i still thing is a very stupid thing to do (doing 
that as a "security feature")
SAVE and MOLD are explicitly designed to be newbie-friendly

 - I though Carl had realized, that "newbie-friendly" is the worst 
 thing you can do to a language. I hope others realize this as well, 
 as soon as possible...
Graham: show me ONE example of something you can LOAD but then breaks 
when you SAVE/ALL it back.
SAVE is *not* able to serialize arbitrary REBOL data. that is a known 
problem that Carl did not consider important enough to address, since 
he prefers using dialects to interchange data instead of just moving 
around the internal representation a program may be using.
Ladislav
15-Jul-2010
[17580x2]
User friendliness
 is in the eye of the beholder. I consider this:

>> block: [none #[none] true #[true] 0.1 0.10000000000000002]
>> print mold/all block

[none #[none] true #[true] 0.10000000000000001 0.10000000000000002]
>> print mold block
[none none true true 0.1 0.1]


as a problem for me, trying to give me wrong informations, as well 
a a problem for a beginner, who may not even be able to find out 
the informations he obtained were wrong
CureCode #1634, add a "me too", if you like
Maxim
15-Jul-2010
[17582]
Gabriele, I also always use /ALL, when molding.    as I stated, I 
was playing devil's advocate, in which case I helped improve the 
case for SAVE/ALL being better.


 but I'm not sure its a good thing to break the symmetry between mold/all 
 and save/all.  


IMHO if we change one, we should change both.  IMO this is a better 
solution.


but this doens't change the fact that MOLDing is severely limited 
in many ways.
BrianH
15-Jul-2010
[17583x3]
Gabriele, that "security feature" argument was always more of a "look 
on the bright side" thing, not really countering the argument that 
it may be a bug. However, more functions are usable in R3 after being 
built with #function! ...] than were with R2 - apparently references 
to the "global" environment are bound, and then the function-local 
environment. I have yet to figure out how, but I'm working on it; 
a clue is that there is no real "global" environment. That means 
you lose the security benefits of the non-feature in R3, so enjoy 
the get-path and SELECT security enhancements that more than compensate 
for such things.
Ladislav, you, Gabriele and I are not the kind of users that MOLD 
is trying to be friendly to. Try newbies.
Apparently the particular "global" context bound to serialized functions 
in R3 is the system context, not the user context. Or maybe it's 
the exports context - hard to distinguish them right now, since system 
and exports is currently the same object (it's a work in process). 
So that makes serialized functions minimally useful in R3, instead 
of not useful at all as in R2. Interesting.
Ladislav
15-Jul-2010
[17586x2]
Try newbies

: unless I find out you are right, I do not have any reason to believe 
you (I remember, that I was a newbie once too)
The trouble is, that the situation is worse, as far as I am concerned. 
To me, MOLD is quite "hostile" actually
BrianH
15-Jul-2010
[17588]
You are the type of programmer who will look up the IEEE754 standard 
to determine math behavior, or will write in C if necessary. You 
are not MOLD's target market :)
Ladislav
15-Jul-2010
[17589x2]
Wrong, I *am* MOLD's target market currently, without having any 
other choice: console forces me to read that nonsense
That is why I wrote #1634
BrianH
15-Jul-2010
[17591]
You are misunderstanding the difference between a "market" and a 
"target market". That ticket was a good idea though.
Gabriele
16-Jul-2010
[17592x2]
Brian: I insist that the "newbie" argument is silly at best, dangerous 
for the language at worst.
i also think that mold/all would be better for newbies than simple 
mold, but i guess that's a matter of opinion, since nodoby did any 
experiments with a group of newbies.
Graham
16-Jul-2010
[17594]
I think as a newbie I try mold .. when it doesn't work, i ask here 
and the gurus say, use mold/all :)
Henrik
16-Jul-2010
[17595]
rather than newbie, I use "the principle of least surprise"
Anton
16-Jul-2010
[17596]
Yep, I also think the "newbie" argument is bogus.
Carl
16-Jul-2010
[17597]
Oh my, more stuff to read!
Ladislav
16-Jul-2010
[17598]
Carl is trying to "undefine" ODD? EVEN? and COMPLEMENT for floating-point 
pairs. I guess, that nobody would really miss these functions for 
FP pairs. I even think, that ODD? and EVEN? are not used (of little 
use) for decimals as well. Any different opinions?
Carl
16-Jul-2010
[17599x4]
I think that I had some code somewhere that once used odd or even... 
but it's not important, because it is so rare, a person can convert 
to integer first if they want.
So, no problems. Added ROUND, which is more interesting.
Regarding all the above discussion regarding MOLD... there is an 
assumption, once that I do not believe.


The assumption is this: that any function of REBOL could ever produce 
the perfect output storage format for all data.


Or, stated another way: part of the design of building all applications 
that store persistent data is to build the storage formatters (savers) 
and storage loaders.


I don't think there's any way around this, because storage formats 
have specific requirements, such as speed of loading, indexing keys, 
resolution of references (words or other), construction of contexts, 
etc.
once = one, TTF (typing too fast)
Ladislav
16-Jul-2010
[17603x2]
Yes, I do agree with you, that is why I restricted my notes (or at 
least tried to) to just script preprocessing.
...and in that case we have the LOAD function, and its counterpart 
should be the SAVE/ALL function, not the SAVE function (that is essentially 
what I wanted to underline/document somewhere)
Carl
16-Jul-2010
[17605x3]
Yes, a good point.  But, and furthermore, even using LOAD instead 
of LOAD/all can be a problem for users due to its method of removing 
the outer block. An odd problem.
The biggest problem with programmers is that they expect programming 
to be symmetric in all dimensions, but it's not even symmetric in 
it's simplest of elements.


Language (that is "expression") is not based on a pure math, nor 
is the world in general.


And, as in the world of thermodynamics (which covers most things), 
many processes are not reversible.


The oil flows from the well into the ocean of the Gulf. The process 
does not work in reverse.
it's = its, TTF
Pavel
17-Jul-2010
[17608]
When trying to code D.J.Bernstein hashing function: forall key [hash: 
hash * 33 xor first key] I found that this simple notation is faster 
than traditional C like: forall key [hash: xor~ add shift hash 5 
hash first key]. (Note for real use it is necessary to shrink hash 
to 4 bytes.) seems shift and additioin is not faster than multiplication 
under Rebol?
Anton
17-Jul-2010
[17609]
The overhead of the Rebol interpreter is much greater than those 
fundamental instructions, so any savings in the fundamental instructions 
are swamped by the overhead of processing the rebol words.
Maxim
22-Jul-2010
[17610]
can anyone explain this strange lexical analysis error to me?:

>> +10: "test"
** Syntax Error: Invalid time -- +10:
** Near: (line 1) +10: "test"


+ is a valid word character symbol and +10 is not supposed to a valid 
integer (as opposed to -10)... but why does it see a time! type?
same on R2 & R3
PeterWood
22-Jul-2010
[17611]
Because of this ?

>> +10:23

== 10:23
>> type? +10:23

== time!
Maxim
22-Jul-2010
[17612]
but why is + associated to time?  10:23 is lexically valid there's 
no need for + there, or is there a situation where it is required?


I know that + is required when its preceded by a date... but on its 
own, this looks like it should be changed.

funny since I'd say that +10:23 is the Invalid time string.
BrianH
22-Jul-2010
[17613x2]
+ is a special-cased word character symbol, not a regular one. It 
+ is at the beginning of a sequence of numbers, it is treated as 
part of a number. If a number has a : in it, it is treated as a time.
It + is -> If + is
PeterWood
22-Jul-2010
[17615]
Also note:
>> -10:23
== -10:23
>> type? -10:23
== time!
Maxim
22-Jul-2010
[17616]
ok ... did a bit more inspection in the mean time and I get it now. 
 might be nice to put this somewhere in the datatype documentation...
BrianH
22-Jul-2010
[17617]
Yup, same reason. There was a lot of blog/ticket-comment/chat about 
this recently for R3, and what was revealed applies to R2 as well. 
Though the precedences and rules have been tweaked for R3.
Maxim
22-Jul-2010
[17618]
Am I wrong in remembering a version where +10 was an invalid token?
BrianH
22-Jul-2010
[17619]
There is a CureCode ticket requesting that documentation, though 
it is syntax documentation, not datatype.
Maxim
22-Jul-2010
[17620]
yeah, but my associative mind needs to know syntax related information 
based on a datatype, not the other way round  ;-)