« first day (2188 days earlier)      last day (1592 days later) » 

4:11 AM
@giuliolunati That is actually intended behavior. Remember: return is not a keyword. It is not provided by MAKE FUNCTION!, rather it is provided by FUNC. So it doesn't exist until the function starts running.
ADAPT runs before the RETURN: MAKE FUNCTION!. (Technically this is not happening; but you are given the illusion it is; what happens is cheaper.)
If you want ADAPT to not run the code you're going to have to use EXIT.
(which is what RETURN, in theory, does.)
 
 
2 hours later…
6:24 AM
@HostileFork I need prelude code returns value -- it's possible?
 
6:40 AM
Oh, sorry: exit/with
 
 
6 hours later…
12:17 PM
0
Q: Trouble with 'export word in module

giuliolunatiLet's mod.reb: REBOL[Type: module Name: mod] export: add 1 2 Let's test.reb: import 'mod Running r3 test.reb, got: ** Script error: add has no value ** Where: do module catch case load-module apply for-each case import do either either either --anonymous-- ** Near: ...

 
 
2 hours later…
2:23 PM
@HostileFork Silly me, I had tested the created r3 for the mold .5 bug, not r3-make. r3-make really molds .5 as -N.aN9998.
 
2:49 PM
@giuliolunati exit/with/from is probably what you need. Use a frame you get with context-of a function at.
@ingo Well good if the bug is not in the current build. I'd give reasonable odds of it being alignment-related and fixed in that.
@giuliolunati function ARG . OK time to find the autocorrect disable (I type way too much programming jargon)
 
@HostileFork funny thing, the same r3-make mold .5 to -N.aN on one machine, and to "2.1e-311" (truncated value) on my other machine. Currently I'm recompiling.
 
@ingo Is one hardware float and the other software float?
 
3:10 PM
@HostileFork no, they're both raspberrypi B+, just different Linux versions.
 
@ingo Weird. Well glad you are testing on these configurations...
 
@HostileFork sadly I don't have much time for testing. But then, I need https on one of these boxes.
 
3:28 PM
@ingo If you only have one instance of the problem and can tweak the source to be 1 divided by 2, or something, whatever it takes to get it to work...we can change it.
 
3:40 PM
When using the current r3 as r3-make that error goes away. Now I am at "res has no value" on both.
Which comes from handling the close event, which in turn is handled whlie the state is 'inited (which isn't handled by close).
Now, why the state is still inited in the close event handling ...
@HostileFork ^ see above.
Sorry, have to go now, see you.
 
 
1 hour later…
4:45 PM
@ingo Let me know if there's anything specific I can do to help...debugging the HTTPS code is not the most fun thing in the world, but much of it is in user-space...
red> :foobar = 'thing
 
; Brought to you by: try.rebol.nl
== false
 
red> :foobar = :barfoo
 
; Brought to you by: try.rebol.nl
== true
 
It seems to me that if you can get a void that comparing for equality/inequality like that is okay.
 
5:03 PM
>> 1 > "Hello"
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-invalid-compare.html
    *** ERROR
** Script error: cannot compare integer! with string!
** Where: >
** Near: > "Hello"
 
>> sort [1 "Hello"]
 
; Brought to you by: try.rebol.nl
== [1 "Hello"]
 
>> sort ["Hello" 1]
 
; Brought to you by: try.rebol.nl
== [1 "Hello"]
 
5:06 PM
So which is it: can you or can't you compare an integer with a string?
 
5:22 PM
SORT is a special case as it never fails no matter how incompatible the data types are. Though it may fail to sort them "properly" - for fun, try this in various Rebol versions - you'll get a different, though consistent, result in each:
sort/compare [1 2 3 4 5] func [a b][false]
 
@Thackeray Hey there, noticed you doing some Q&A. Welcome.
I don't know what the right answer w.r.t. sorting is, but, I don't really favor the idea of there being natives with behavior a user could not write. I might want something that behaves like sort but just a little bit different... and so if there's not enough specification to make something that behaves exactly like sort, that's not good.
Lots of comparison issues, e.g. #2259
>> [1 2 3] = probe load/header/type {123^/[REBOL [title: "embed"] 1 2 3]^/123^/} 'unbound
 
; Brought to you by: try.rebol.nl
[make object! [
        title: "embed"
        name: none
        type: none
        version: none
        date: none
        file: none
        author: none
        needs: none
        options: none
        checksum: none
    ] 1 2 3]
== false
 
That's from a commented out test. And it's one of those bad-idea looking things. Why not be able to make a PORT! that creates a limited window of a view into a FILE! or something, and then you can load from that PORT!.
 
5:38 PM
SORT's behavior is undefined / implementation specific for incompatible datatypes. As soon as you use a SORT/COMPARE then you (if you have unconstained key fields) have to write considerable datatype coercion code to ensure incompatible comparisons do exactly what you want....That is mainly a good thing: A bare SORT is enough for most default cases. When you have a complex scenario involving SORT/COMPARE, you'd better do the data analysis rather than rely on non-portable defaults.
 
@RebolBot do/2
load "<h1>test</h1>"
 
; Brought to you by: try.rebol.nl
== [<h1> test </h1>
]
 
Hm. BrianH seemed to think that would be <h1> "test" </h1>...wonder if that was specific to an HTML-loading codec? <-- @rgchris
@Thackeray All things being equal, it seems best to avoid non-portable defaults or ill-defined things. So if there's a really good reason to not define a sort order between types, I'd think we need an essay for why that's better (comparing it to the idea that, for instance, every type user-defined or otherwise gets a UUID and that's used to resolve contention...)
The problem is, that if you don't provide an exposure of the comparison, someone just winds up writing my-lesser: func [a b] [:a = first sort reduce [:a :b]] :-/
 
6:09 PM
My-lessor would at least be consistent for any specific version of Rebol. Not sure there is much call for a complex set of rules that would be portable between Rebol variants. That would not help us when data is exported in, say, JSON, to an non-Rebol system. Sort order in those cases is a task for the application designer, not the language creator.
 
@HostileFork I don't think that should be. I believe loading markup in that way should be explicit: load/type "<h1>test</h1>" 'markup which incidentally doesn't seem to work in either Rebolsource R3 or Ren-C.
 
What we need at the moment is a way to have modules behaving well enough that they can be used to build isolated contexts that operate under r3-legacy rules...so that the whole system doesn't have to be running under r3-legacy.
And that is a good test of the general feature which modules should be able to let people do.
But there's a lot of code, and the code comes from an era of not-particularly-generalized design. Plus a lot of code about checksums, embedding, and things that are not core to the binding. The actual binding is very little of it.
 
 
1 hour later…
7:24 PM
>> load "[rebol [] 1 2 3] = [1 2 3]"
 
; Brought to you by: try.rebol.nl
== [1 2 3]
 
That's not good.
red> load "[red [] 1 2 3] = [1 2 3]"
 
; Brought to you by: try.rebol.nl
== [[red [] 1 2 3] = [1 2 3]]
 
 
1 hour later…
8:39 PM
@HostileFork My bad, I think it automatically selects the 'markup decoder when it loads a file with %.html extension. I was confusing it with your string example in the previous message.
 
@rgchris Hazily I seem to recall deleting the C HTML codec, believing it to be a poor choice for something to be writing and maintaining in C.
 
I find LOAD/MARKUP to be a cheap and cheerful tool for scraping HTML content. It would likely be better to have something written in PARSE, however we still don't have a way of doing codecs in Rebol code.
 
As far as I can tell, there's no streaming or otherwise sophisticated aspect to "codecs"
 

« first day (2188 days earlier)      last day (1592 days later) »