« first day (1068 days earlier)      last day (2712 days later) » 

12:03 AM
@HostileFork Yes, thanks for your feedback on that. My client has models of machinery he builds in Solidworks and wants to be able to sell those parts to his customers through a web portal. I suppose there could be a list of the parts that are being displayed, and when a part is selected it could be highlighted so the customer is assured he is getting the right part.
 
@Respectech Much easier to have a list that you select from not on the aggregate model and then highlight the part.
 
I wrote a model viewer in Rebol by linking to OpenGL libraries. That's a little too low level for what I want to do for this customer, although he probably has the budget to pay for someone to do it if they are knowledgeable and willing.
@HostileFork Yes, that's what I was thinking.
 
12:22 AM
@Respectech might be worth speaking with these guys - p3d.in
 
12:38 AM
posted on October 02, 2013 by fork

[Bug] This is a follow-on to the general philosophy put forth in #2056. For starters TO STRING! QUOTE FOO: should just return "FOO" and not "FOO:" ... if you want the colon, that should come from requesting a MOLD or similar. All words should not include their word specifier when converted to strings. Another issue is regarding the current somewhat ill-defined behavior of TO STRING! for bloc

 
1:14 AM
@onetom I think I finally got the philosophy for TO and MAKE I was looking for.
They actually make sense now.
 
posted on October 02, 2013 by hostilefork

Per CC #2073, this implements newer simpler invariants for TO STRING!, and removal of the existing MAKE STRING! behavior for blocks in order to reserve it for a string creation dialect. Though it has nothing to do with reversibility...blocks with a single element value in them that can convert to string will work as if you'd passed the element alone: >> to string! [1] == "1" Multi-

 
If TO gets an any-block! as input but targets a non-block type, then it will only work if that block contains a single element that isn't an any-block!, and it will do what it would do if that element had been passed and not in a block.
This is the counter to the simpler behavior of TO targeting an any-block! with a non-block type as input, in which case you get a single-element block with that item in it. So there's symmetry.
That's the invariant that always holds, but as for the matter of value-to-value conversions, that's just some matrix of whether it's legal or not.
"Date from boolean? No, never. Date from string? Sometimes works. String from integer? Always works." So each entry in the matrix is basically "illegal", "some inputs", "always".
There could be a little red/yellow/green map of it for all the non-any-block! types.
And MAKE, well, it's different and can do some per-type interesting thing for that type. I guess I don't care if make date! [1 2 3] gives you 1-Feb-0003 or not, although that sort of ties the hands of such a construction dialect vs. make date! [day: 1 month: 2 year: 3] or something richer and more likely to be easy to extend.
But under this model, to date! ["12-Dec-2012"] would give you 12-Dec-2012 and to date! [1 2 3] would give an error.
@RebolBot
to date! to block! 12-Dec-2012
 
; Brought to you by: tryrebol.esperconsultancy.nl
; rebol.com/r3/docs/errors/script-bad-make-arg.html
>> to date! to block! 12-Dec-2012
*** ERROR
** Script error: cannot MAKE/TO date! from: [12-Dec-2012]
** Where: to
** Near: to date! to block! 12-Dec-2012
 
That would work under the new invariants.
Heya @jvargas, interested in your opinions on this TO/MAKE thing. I'm feeling happy about it.
 
1:54 AM
@RebolBot
to date! FIRST to block! 12-Dec-2012
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> to date! FIRST to block! 12-Dec-2012
== 12-Dec-2012
 
2:35 AM
@PeterWAWood I'm aware that will work, but I'm looking at methods of achieving longer chains of conversions that will keep working if they can... e.g. 10 == to integer! to string! to block! to string! 10 and such.
 
2:56 AM
That should be a good intellectual exercise. Coming up with functions that can convert between series of values and values without prior knowledge of the contents (as inferred with single value type series such as strings) is not going to be an easy task.
 
3:06 AM
@PeterWAWood My proposal is based on making it easy, precisely by only allowing TO conversion of blocks to values when they contain a single element that is not an ANY-BLOCK! type. This is symmetric with the proposal for TO BLOCK! which produces a block with a single element if the input was not an ANY-BLOCK! type. Thus, it works.
More complex behavior is delegated to MAKE, or other specialized service functions. Keeps TO simple and able to chain as above.
I like it better than just erroring out on TO conversions of blocks into narrower types, for this property of reversibility. It's the first time I've felt comfortable with the conversion logic. I'd reluctantly consider giving an error as a possible alternative, but the invariant it provides is not as nice, so that would be a pretty big bummer when we have something like this available.
All bets are off with MAKE, and that's okay, it's different... not a conversion.
 
 
2 hours later…
5:40 AM
@HostileFork thx for the ping, im curious about it too indeed. i will digest your comments on the way home later today.
 
 
9 hours later…
2:54 PM
@DocKimbel questions the usefulness of allowing a single-valued block to have a TO conversion allowing it to get back to that value, vs. erroring out. I've added an #ifdef ALLOW_ANY_BLOCK_TO_SCALAR_CONVERSIONS in case others feel the symmetry isn't buying anything.
The "mathy" argument is that we think TO BLOCK! x becoming [x] is good for scalar types. We are in essence saying something like "here's the integer 10, can you give me a block which... among all blocks... uniquely represents the conversion of integer 10?"
It doesn't give back [5 + 5] or [x x x x x x x x x x]. It gives us [10]. And I think that if we are willing to create such a one-to-one correspondence and say "that's the block that means integer 10" it's a bit of a shame to not provide the reverse conversion and say "here is a block I know to represent some integer value... you even gave it to me in a conversion. Can I have the integer?" And we say no, error.
That is my reasoning. But one reason I'm comfortable with making it an error is that if practice later suggested this was a mistake, and people were working around it, then bringing the behavior back would be easy enough and not invalidate code written under the erroring assumption.
 
@HostileFork This is a very slippery slope IMHO, where you can induce a wrong mental representation of what a series is in users mind. [10] is a block series of one element. That single element is the integer 10. "A block that represent an integer value" is where things (like "series! as a sequence of values") start to break down.
 
@DocKimbel I'm just reflecting back the behaviors. If TO BLOCK! 10 is not an error, then I don't see why the reverse shouldn't be. It's just an "If A then B. If not A then not B." type of argument.
I realize that Rebol wasn't created in an environment that held much regard for symmetries and formalisms... but I feel that this has led many more experienced programmers who spend time with "experimental" or "fringe" languages to take one look and run to spend time with more elegant things.
When you find a reason why every category of programmer would avoid a language, it's good to show a bit of effort in reopening the appeal to those categories.
 
3:09 PM
Strictly speaking, TO BLOCK! 10 should also raise an error for me. The fact that it is not, is simply because it's very valuable to have such conversion in practice, there's no over simple alternative (REDUCE [10] is costly in comparison). Once again: abstract rules vs pratical convenience.
@HostileFork The biggest category of programmers are not experts, but newbies.
 
25
Q: "A good programmer can be as 10+ times more productive than a mediocre one"

m3th0dmanI had read an interview with a great programmer (it is not in English) and in it he said that "a great programmer can be as 100 times as good as a mediocre one" giving reason for why good programmers are very well paid and why programming companies give many facilities for their employees. The id...

@DocKimbel Well then why not have blockify and then a /type refinement if you want a block of a different type? blockify x => [x] and blockify/type x paren! => (x). Then TO can error and be symmetric and everyone's happy?
9 times out of 10 the /type is probably not needed.
 
@HostileFork I agree on the principle of your proposition, but that sake of "symmmetry" is just making the cost higher in the end (adding yet another function), while not more helpful for most of users.
@HostileFork Anyway, I would rather adopt blockify than allow TO scalar! series.
 
@DocKimbel Well if things aren't perfect or symmetric that is fine within limits. You just have to explain why the design is how it is, so it doesn't seem like a completely random grab bag of choices.
 
@HostileFork Agreed, lack of explanation and documentation is the real core issue.
 
@DocKimbel Well, given your strong feeling on the matter, I've biased the #ifdef to 0 for the discussion going forward. So we will assume TO conversions of scalars to blocks works to make a block containing the single value scalar. But the reverse for single-elemented blocks containing a scalar does not for now. It's not symmetric, but it's defensible.
This means that blockify is now basically achieved via TO ANY-BLOCK! (scalar or string series), and that's just how you do it, but unblockifying is done by picking elements out not another TO.
 
 
1 hour later…
4:32 PM
room topic changed to [Rebol and Red]: R&R: One binary, no install! rebolsource.net/go/chat-faq [dialect] [interpreter] [json] [lisp] [rebol] [red]
 
posted on October 03, 2013 by hostilefork

Very simple change implementing the idea that things like TO LOGIC! 0 are TRUE, while things like MAKE LOGIC! 0 remains false. The converse is that TO INTEGER! TRUE or TO INTEGER! FALSE return errors, while MAKE INTEGER! TRUE returns 1 and MAKE INTEGER! FALSE returns 0. Does not remove the true? or found? mezzanines, as consensus on that did not seem to have been reached, and @earl believes

 
@RebolBot
print delta-time [repeat x 10000 [y: to block! x]]
print delta-time [repeat x 10000 [y: reduce [x]]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> print delta-time [repeat x 10000 [y: to block! x]] print delta-time [repeat x 10000 [y: reduce [x]]]
0:00:00.019345
0:00:00.018605
 
@RebolBot
print delta-time [repeat x 10000 [y: to block! 10]]
print delta-time [repeat x 10000 [y: reduce [10]]]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> print delta-time [repeat x 10000 [y: to block! 10]] print delta-time [repeat x 10000 [y: reduce [10]]]
0:00:00.018585
0:00:00.016934
 
4:36 PM
@DocKimbel "REDUCE [10] is costly in comparison" ... well, not necessarily.
 
5:07 PM
Hello, @graph...
 
posted on October 03, 2013 by hostilefork

Implementation of CC #2023... a seemingly uncontroversial change which allows set-words as arguments to COPY and SET in PARSE. This is beneficial for the locals-gathering constructs like FUNCTION and CLOSURE. function foo [] [ parse "Rebol" [copy name: to end] ] This allows FUNCTION to find name and make it /LOCAL instead of leaking into the global context. The old behavior continues

 
@RebolBot
insert/only [] []
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> insert/only [] []
== []
 
Okay, that's wrong.
 
5:26 PM
posted on October 03, 2013 by fork

[Bug] The /ONLY refinement is supposed to be able to append "blocks as blocks". That should include empty blocks.

 
5:37 PM
@BrianH So it seems to me that insert/splice [] "abc" should make [#"a" #"b" #"c], or maybe not. I don't know. Just thinking about it.
@rgchris can we change it to say Pull Request (Rebol), and add the pull requests for Red too?
 
@HostileFork It is, there is and additional block series required in case of REDUCE. Also for the speed measurements, the slowness of the interpreter is getting in the way. Implement a blockify that takes only one argument (instead of two with TO), and I bet it will be faster than REDUCE.
 
5:53 PM
@DocKimbel Not arguing it wouldn't, just pointing out that in particular TO BLOCK! isn't particularly speedy vs reduce, so the performance argument doesn't necessarily apply here to promote to BLOCK! of scalars.
 
Hmm, actually REDUCE [10] is a bit meaningless as it doesn't create a [10] from 10.
 
Well, I just threw it in there, I meant it for "x" I was just testing that case.
 
6:17 PM
@HostileFork that seems like a rarely needed operation. I've never seen code that requires it, since the series-like behavior of strings makes blocks of characters less necessary, and kind of a bad idea most of the time. In contrast, the current default behavior of INSERT is needed most often.
 
posted on October 03, 2013 by fork

[Comment] Implementation seems simpler than I thought. Believed to be accomplished with https://github.com/rebol/rebol/pull/165

 
@BrianH Well I was just wondering if you went to explicitly /splice something and it was a string value not inside of any block, if it looks wrong to say append/splice [] "abc" => ["abc"] ... because no "splicing" really happened. We are expecting /splice to be used in some pretty rare conditions where you usually would know very much what you were doing, e.g. append/splice [a b c] 'd/e/f => [a b c d e f], so given that you know very much what you're doing why not "splice" strings?
 
6:39 PM
@DocKimbel - can you briefly refresh my memory on the rationale for why Red/System doesn't like to use binary! for one byte, two byte, and four byte expressions of hexadecimal literals?
To Do on Rebol3 Community Development
There are a lot of outdated pages on the web, and a lot of people who enjoyed Rebol in the past that have been lost track of over the years. An outreach should be started to try and reconnect, get...
✍ 1 comment
^-- A little effort here might pay off, and I haven't really heard reports of people taking initiative on this.
@GrahamChiu Any response from Allen Kamp?
 
@HostileFork this seems rare enough that I wouldn't add this into APPEND and INSERT themselves. Also keep in mind that port actions have to be implemented by port schemes, so every extra option you add to such actions will add complication to code often written in Rebol. This seems like a job for a wrapper or value transform function, if it ever gets used at all. I mean the strict splicing you're proposing here, not the balanced splicing-when-appropriate that these functions should do by default.
@HostileFork literal integers, remember. If it uses binaries, they become literal binaries, which would then need to be converted to integers later. Those conversions have overhead you might not want for a low-level language like Red.
 
6:56 PM
@BrianH But Red/System is compiled. Why would it matter?
It matters if you have some operation FOO that wants different semantic meaning for a binary from an integer parameter. But do those exist in Red/System? What are they?
 
7:12 PM
@BrianH Modify_Blockx appears unused, and Modify_Block is what's used instead. Is there a point to its existence?
 
@HostileFork unless the compiler includes an optimizer that can resolve conversions internally, that overhead will still happen at runtime. AFAIK that doesn't happen in Red or Red/System.
@HostileFork don't know.
 
@BrianH what is a good example of a function that gives an error when you use two incompatible refinements together?
 
@HostileFork I am a little busy at the moment, so can't search the code for one. I know such functions exist, but IMO it's a sign of bad design to make a function where that kind of thing happens. Actually, that's why some functions ignore certain refinements when other refinements are specified, because it usually violates the errors-are-your-friends principle to trigger errors for that.
 
@BrianH, you asked " I was just wondering if the method you're using could somehow EXPAND_SERIES_TAIL the object series all of the slots in one go" - I just updated the PR #153 to expand the object in one go similarly as Carl did. There are no test regressions in Linux 0.4.4
 
If you can find a way to think of the behavior that makes it not an error, and the error itself isn't more useful, the errors-are-your-friends principle says that you should pick the non-erroneous interpretation.
@Ladislav nice! This doesn't seem to me like the type of code that would break on one platform and not another. Is that right? Do you need to test on other platforms?
 
7:29 PM
@BrianH Unfortunately, there is a problem! When I merge the code with 64-master and build R3 0.4.40 (64-bit Linux R3) or 0.3.3 (64-bit Windows R3), the interpreter crashes during startup.
 
@Ladislav yeah, 64bit. Haven't had time to review the 64bit code yet. Is your fix using the right datatypes for its variables?
 
Actually, I think I am using the right types for 64-bit code at present.
 
Does the 64bit Windows version build in MSVC using @earl's CMake support?
I can't check anything with GCC at the moment, just MSVC (in VS2012) on Windows and LLVM on OSX.
 
Hi. Do you know if Red has something like Rebol's '?' or 'help'?
 
Actually, I don't yet know how to build on OSX. I have XCode and its command line tools on my work computer.
 
7:42 PM
Can I learn something about functions and types from the interpreter?
 
@RebolBot do/red
probe :print
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> probe :print
make native! [["Outputs a value followed by a newline." value [any-type!]]]
== make native! [["Outputs a value followed by a newline." value [any-type!]]]
 
@SoleSoul Not necessarily pretty, but you can see that print is a native that takes one argument called value that can be any-type!.
 
@HostileFork Thanks! not bad. Infinitely better than nothing :)
 
8:00 PM
@BrianH 64-bit Windows version is Saphir, but is a bit ahead of the Saphir published
(we tried to merge 64-bit Linux and build the program also on Windows)
 
Still using GCC on Windows at Saphiron?
 
@BrianH Yes, it was a bit of a nightmare for Cyphre to find a gcc that would build a 64-bit R3
 
@Ladislav the sooner the CMake stuff works, the better. I want my modern IDE support.
 
It is crazy that the append obj crashes, while almost identical code in Merge_Frames does not cause problems
 
Well, if it's almost identical then the almost gives you a place to start looking.
 
8:28 PM
@Adrian Thanks for the link, Adrian. It would be a good place to start, but would also need to be able to have the model interact with things like selecting a part from a web form.
 
8:42 PM
@Respectech I'm guessing that the author of the site would consider some customization/consulting work because it doesn't seem that the site has seen too much action recently.
 
8:54 PM
@HostileFork Simply because using a series (with the underlying memory cost) is overkill when we just want writing an integer in base 16 instead of base 10. I never liked that Rebol wasted resources for representing 32-bit hexadecimal values. In addition to that, the binary! literal syntax is quite verbose to what other languages are proposing for representing the same thing.
 
@DocKimbel But for Red/System why does it matter, as it is not interpreted?
 
@HostileFork It will be JIT-compilable. Red/System is meant to be wrote from within Red programs, so the cost will be paid at runtime too.
 
Do the integers remember their width, or you have to know that elsewhere? e.g. FF and FFFF both just become integer! ?
 
@HostileFork Yes, the current compiler just converts it once for all to integer.
I am willing to offer a better option in the (close?) future by introducing a hex! datatype, or at least a mean to simply LOAD/MOLD an integer to hex form.
 
It seems like finessing binary to make it more efficient for short widths would be a better idea.
 
8:59 PM
Make short binaries like tuples?
 
@HostileFork There's a semantic mismatch for me representing scalar values using series.
Binary! is an arbitrary long sequence of bytes. I just want a to be able to write/print a 32-bit integer using hex form.
 
32bit?
 
@BrianH 64-bit in R3 if you prefer. But having just 32-bit covered would be already a win.
 
@Adrian I put in a request. We'll see what he says. Thanks for the lead!
 
@DocKimbel no, that was more of a question about Red. Does Red have 32bit integers or 64bit?
 
9:10 PM
@user1821956 In this time zone, Ubik is a programming language. But we call it Rebol. Please see our FAQ, and welcome to StackOverflow. 20 points to chat isn't hard to get...
 
@BrianH 32-bit only for now. We'll add 64-bit integers support, but it's low priority for now.
 
Will you be adding them as the integer! type or will you have different types for the different sizes? Or will you have the different types as primitives in Red/System and only have 64bit integers as the Red integer! type, with the smaller types available as vector elements?
 
9:27 PM
posted on October 03, 2013 by fork

[Comment] Nevermind...got confused because insert is returning the tail, and so what you're seeing is the empty outer series. Ignore this.

 
9:37 PM
Greetings @ConradFrix, SO veteran! Know anything about Rebol or Red?
 
10:04 PM
@hostileFork sorry no. I was trying to lurk. Guess I should have hit the transcript button
 
@ConradFrix Well, it's interesting and fun enough that we're addicts. Happy to talk about it. When no new people to teach the language are around, we just yap about development discussions on the interpreters/compilers themselves.
@RebolBot
print [{"I'm here too,} reverse {xirFdarnoC@} {!!"}]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> print [{"I'm here too,} reverse "xirFdarnoC@" {!!"}]
I'm here too, @ConradFrix !!
 
So we have the bot for demo'ing little snippets or principles.
 
10:28 PM
@DocKimbel My recent discovery that refinements are a way of making locals, and that /local is just a convention, has caused a little bit of doubt surrounding the idea that refinements that aren't used are false. :-/ So for instance instead of writing foo: func [value /local x y z] [ .. ] you could write foo: func [value /x /y /z] [ .. ]
When used this way, initializing to false seems a bit weird.
 
posted on October 03, 2013 by hostilefork

This implements the simplifying principle that splicing of any-block types for operations such as INSERT, APPEND, and CHANGE only happens if the block types match. Otherwise you have to ask for it explicitly: >> append [a b c] [d e f] == [a b c d e f] >> append [a b c] 'd/e/f == [a b c d/e/f] >> append/splice [a b c] 'd/e/f == [a b c d e f] For the moment, /splice overr

 
 
1 hour later…
11:29 PM
posted on October 03, 2013 by earl

As reported in CC#851, currently, a catch/quit incorrectly disables other (outer) error handlers, such as try or attempt. The underlying cause is the catch/quit implementation incorrectly overwriting the error handler stack. See the commit message for more details on the fix. This fixes CureCode issue #851.

 
11:49 PM
@BrianH ... there is a Do_String in the core which runs when the DO native is given a string. It has binding logic that does not go through LOAD. Should it be the case that the core's DO only handles already bound code via LOAD, turning DO into a mezzanine that calls some more foundational native (DO-BLOCK)... ?
I've already wondered if we could hook the console to have a custom function you give the command line to, so if you wanted something other than DO (or augmented) you could have that.
 
@HostileFork I thought about moving the console to the user-level for that. Would also have the advantage of enabling a wider range of people to work on console improvements.
 
@earl Sounds worthwhile. I'm just wondering specifically about this sort of orphan binding code that happens when you type into the command line which is in C vs. LOAD
 

« first day (1068 days earlier)      last day (2712 days later) »