« first day (1551 days earlier)      last day (2229 days later) » 

2:57 AM
https://github.com/red/red/pull/1023
GitHub
Red Pull Req—FIX: additional fix for issue #1020
qtxie
1422478538
 
 
6 hours later…
8:38 AM
@Morwenn @HostileFork Have you seen this before? Im currently trying to compile on linux.

thomas@thomas-mint ~/Desktop/RenCPP/rencpp $ make -m
[ 1%] Building CXX object CMakeFiles/RenCpp.dir/src/rebol-binding/c-do.cpp.o
In file included from /home/thomas/Desktop/RenCPP/rencpp/src/rebol-binding/c-do.cpp:51:0:
/home/thomas/Desktop/RenCPP/rencpp/src/rebol-binding/c-do.cpp: In function ‘REBCNT Do_Next(REBSER*, REBCNT, REBFLG)’:
/home/thomas/Desktop/RenCPP/rencpp/../rebol/../rebol/src/include/sys-core.h:371:38: error: cast from ‘REBVAL** {aka Reb_Value**}’ to ‘REBCNT {aka unsigned int}’ lose
Btw, its was a pain to get everything set up on my mint distro, but alas I figured it out.
 
9:21 AM
@iceflow19 I guess that that sizeof(REBVAL*) > sizeof(unsigned int) on your implementation. Are you using a 64-bit OS?
I think that @earl fixed 64-bit-related problems a while ago, but in the original code REBCNT is a 32-bit integer. If you use a 64-bit system, the size of a pointer will be 64-bit and casting it to a smaller integer type will not be allowed, hence your error.
 
 
3 hours later…
12:26 PM
@Morwenn Something to think about, though the feature was on the "let's think about this" side of the fence to start with...so if it makes things too much more complex we might should back down on it...
@iceflow19 Hm, hadn't seen that yet...and have built okay on 32 and 64 :-/ Travis tests are all passing as of latest: travis-ci.org/hostilefork/rencpp
@mydoghasworms for in its current incarnation is a rather poor construct that doesn't get much love, so probably not the best thing to bring up. In Ren Garden, I'm proposing thinking along the lines of for x [1 thru 10] [print x] and trying to do some more thinking along those lines to see what kind of a "number generating dialect" could be made.
 
1:00 PM
@HostileFork I was just reading one of your articles after contributing to that article and saw you had a much simpler and prettier example. Pity I can't remember where it was. Maybe it was your Rubol page?
Mm, no, just checked. Don't think it was that.
@HostileFork BTW, not sure you saw draegtun's comments, but apparently, on Code Golf, having more than one answer is totally acceptable. That one in particular we were discussing has 3 for Ruby already.
 
@mydoghasworms It's perfectly "legal", I just think sometimes people can hear you better the less you say. (A bit funny for ME to be saying so, though...)
 
"Sometimes"? That sounds like the minority of cases. Point taken. Make as much noise as possible. Gotcha. Thanks for the advice. c u l8r
 
And now...
 
Oh, please don't.
 
Don't what?
 
1:07 PM
I have somewhere to be.
Oh.
 
Demo video now online.
 
1:30 PM
@HostileFork I don't think that it adds that much complexity. I just have to check the responsibility of the class and how it's organized.
Because, if we want to use runtime's constructor in a language-agnostic way, we don't ant to write RebolRuntime { } or RedRuntime { }. So we will need a type alias somewhere.
 
@Morwenn Well it's good to be putting it all up for review. I started with a much clearer notion of what I wanted out of Value types than I did the larger ideas like Contexts or Engines or Runtimes. Now things have started to shake out that Context turned out to be a Value after all, and things seem to be edging toward the right places.
 
1:49 PM
posted on January 29, 2015 by Fork

For those who weren't sure exactly what a C++ binding for Rebol or Red would be 'for', I present here an overview... with a demo of Ren Garden... a GUI console with several novel features: https://www.youtube.com/watch?v=0exDvv5WEv4 Ren Garden has been built for Linux, Mac, and Windows, and variously for 32-bit and 64-bit architectures.  Though it's linked up with Rebol for now, it

 
@Morwenn Thanks, that looks really cool! Haven't watched the whole video yet. Will do so at home. Nice work!
@HostileFork I mean to reply to the vid. But nice work to you both!
 
2:16 PM
posted on January 29, 2015 by draegtun

[Reddit] REBOL and what could be (2009)

posted on January 29, 2015 by draegtun

[Reddit] Taking a new look at Rebol

 
2:30 PM
Great video @HostileFork
Would you like me to post to Rebol sub-reddit?
 
@draegtun Thanks! Sure...that's fine.
 
Anybody know how I can list (or navigate to) my previous posts in this chat?
 
> load to my last message
When you go at the top of the chat.
 
Yah but that only works for a few days, thanks @Morwenn
 
But it may lead you to the transcript if your previous message is too old.
 
2:34 PM
Is there a search from the transcript?
I mean one that spans days!
 
@MarkI Yes, the search is historical...it does miss some things
 
At least, when it tells you to use the transcript, click on "transcript" to get your latest message.
 
@HostileFork Done. Also posted to Rebol Google+ community as well :)
 
Hope to see people get excited and involved...
Perhaps the project warrants the $500 GUI console bounty... :-P rebolforum.com/…
2
 
@Morwenn That's great, thanks @Morwenn, that worked. I can now get to my last post. But then I am stuck on how to look for my previous post to that, the "load to my last message" link is no longer there on the transcript ... Am I missing something?
 
2:39 PM
@Morwenn Yes I am using a 64 bit OS, but I thought I compiled it as a 32 bit binary.
 
@iceflow19 I can't tell for sure (not compiling in 64-bits), but that's my guess.
 
The irony is that when I compiled r3, it didn't complain about it. Only in RenGarden it was an issue.
 
Too bad. Even though it pointer to an error in a Rebol file (probably in a header).
 
posted on January 29, 2015 by draegtun

[Reddit] RenCpp + Ren Garden (Rebol/Red GUI Console)

 
I just pulled up my VM, Im going to check over things one more time, to see if I didn't miss something.
 
2:52 PM
No doubt it is such a stupid message that no-one needs me to link to it when I apologize for it, but I still want to apologize. I said at one point that '++' before any number is guaranteed to cause a syntax error. This is completely bogus of course, as is painfully obvious to any simpleton. I meant to say '0+' followed by any of the number-prefixed types except slash-date and percent (integer, decimal, pair, tuple, dash-date) will get you a 'invalid <type>' syntax error.
For context, I consider this to be important as it shows that the language can be extended within those types without sacrificing backwards compatibility.
And $0+ works for an 'extendable' money subtype as well.
Where is the core-tests suite?
 
@HostileFork Thanks!
 
There are past debates you can go read to try and decide what side of the fence you are on about whether the test design (diff-based) is "flexible" or "confusing".
 
Does it help if I hate diff?
 
It helps guess which side of the fence, yes.
 
3:06 PM
@HostileFork Where do these debates live?
 
I got it to compile by manually adding -m32 as a flag in the cmake file. Is there a way to do this from the commandline?
 
gtg, bbl
 
Feb 27 '14 at 21:54, by earl
We don't have the test suite coverage we'd like to have, so for now some areas are more amenable to "easy fixes" than overs. Obvious in hindsight, this is more clear for those of us regularly working with the test-suite.
(Click on the date to read in context.)
 
3:32 PM
@HostileFork Thanks again.
 
Well I got it to compile, but now it wont run because it cant find qt. Even though I went so far as to even add the qt binaries to the workbench folder
 
Are the Qt binaries compatible with your compiler?
 
Yes I was using the 32 bit binaries
 
Eh, 32-bit is not the inly source of incompatibility. If you have GCC 4.7 and Qt binaries compiled with GCC 4.9, then they may not be compatible.
 
3:49 PM
I have GCC 4.9
thomas@thomas-mint ~/Desktop/RenCPP/rencpp/examples/workbench $ gcc --version
gcc (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
I guess that the latest Qt binaries have been compiled with GCC 4.9.1, so there shouldn't any problem since they are ABI-compatible...
Nobody likes C++ when it comes ABI and linkage.
@iceflow19 If there is a way to do this from the command line, I have yet to learn it.
 
@Morwenn Which only reiterates why I like msbuild better. O wait did I say that out loud...
 
@iceflow19 I like template-only library. You only have to include them (ok, it might be horribly slow to compile).
 
4:09 PM
Anyways Im going to give up for now.
 
 
1 hour later…
5:34 PM
@iceflow19 Can you get an ordinary Qt example to build?
 
 
2 hours later…
7:15 PM
@Morwenn @iceflow19 cmake -DCMAKE_CXX_FLAGS=-m32 ...
(Just plain -DCXXFLAGS=... -DCFLAGS=... -DLDFLAGS=... should work as well. Also: setting CXXFLAGS/CFLAGS/LDFLAGS environment variables.)
 
Of course, you're right :)
My only bit of cmake-fu is somehow behind me.
 
7:32 PM
:)
 
@HostileFork in ren garden if a make something then control z it I cannot redo it(C-S-z)? where C = control S = shift z = z
 
@JacobGood1 There is basic redo and undo if you haven't committed an evaluation. Yet there is no "magic redo" as yet, because all the console content is held in the textedit. There would have to be buffers kept outside of that to do it.
 
ok I was just wondering
 
8:14 PM
@HostileFork been programming in rencpp for about 2 hours... no crashes =)
 
@JacobGood1 Good to hear, though they're in there. :-) Keep notes on behaviors and things that need fixing, and when it does crash try and remember what you did to reproduce it! Issue tracker here: github.com/metaeducation/ren-garden/issues
 
** User error: "length? is now length" haha love it
 
I'm being coercive for starters but what is really needed is to get the module system tidied up so you easily switch in legacy behaviors and it doesn't have to be such a big deal.
 
8:34 PM
@HostileFork question... say I define a function like

>> fn: func [x] [x: compose [(1 + 1)]]
== #[function! (x) [...]]

>> source fn
fn: make function! [[x][x: compose [(1 + 1)]]]

but if I invoke this function will the function still be calling compose, or would it "remember" that there is a block there like it does when local is not declared?
If local is declared does each function have its own "memory"
Also, is there some function that would show the "current source" of a function... maybe how it is currently represented to the repl/reader
I meant to put local up there ack
 
@JacobGood1 Invoking FN will be calling COMPOSE.
 
@JacobGood1 source is the "current source". Any composes that happen as active parameterizations to the function generator will run each time the function generator runs. Often times that only happens once, but it can happen in a loop too. foo: function compose [x [string!] (reverse [[integer!] y])] [...]
And as earl says, once a compose is inside the blocks for the spec or body of the function, it will be run on each invocation. (assuming you execute the code path where the compose is)
 
even in the case of func?
 
FUNC and FUNCTION are largely similar; they are both function generators. FUNCTION just pokes around looking for SET-WORD! instances to automatically make local for you. (And has a couple other features)
 
>> fn: does [a: []]
== #[function! () [...]]

>> a
** Script error: a has no value
** Where: do -unnamed-
** Near: do [a]

>> fn
== []

>> a
== []

>> fn: does [a: [1 2]]
== #[function! () [...]]

>> a
== []
 
8:42 PM
@JacobGood1 I am not interested in names.
 
this crap is strange to me
 
Just remember that a block is "inactive until activated"
 
I understand that
I messed up
What is odd is the global a that gets created then, after being created, it cannot be overwritten in another func... it is as if it is no longer global
 
Yes it can, but you have to call the func.
 
AGH
i meant to do that
im too off the cuff
i really do understand blocks... i promise...
 
8:56 PM
@HostileFork alright, sorry for all the spam, here is the odd part of rebol...

>> fx: func [] [a: [1] append a 2]
== #[function! () [...]]

>> fx
== [1 2]

>> fn: func [] [a: [1 2] append a 3]
== #[function! () [...]]

>> fn
== [1 2 3]

>> fx
== [1 2 2]

>> fn
== [1 2 3 3]

>> fx
== [1 2 2 2]
== [1 2 3 3 3]
fn ^
 
5
Q: Why do function "have memory" in REBOL?

CaridorcIn rebol I have written this very simple function: make-password: func[Length] [ chars: "QWERTYUIOPASDFGHJKLZXCVBNM1234567890" password: "" loop Length [append password (pick chars random Length)] password ] When I run this multiple times in a row things get really confusin...

 
Yes, when you are looking at the structures in the code they are like literals. So a block literal, that is nonetheless still mutable.
 
@JacobGood1 ^^
 
@RebolBot
pfunc: func [spec body] [
    make function! protect/deep copy/deep reduce [spec body]
]

foo: pfunc [] [
    stuff: "**"
    append stuff "**"
]

foo
 
; Brought to you by: try.rebol.nl
; rebol.com/r3/docs/errors/script-protected.html
    *** ERROR
** Script error: protected value or series - cannot modify
** Where: append foo
** Near: append stuff "**"
 
9:02 PM
@JacobGood1 ^-- PFUNC shows the flexibility that one could apply protection on the spec and body prior to calling MAKE, and then force you to realize you had to make a copy. I think the benefits to new users could be high enough to make this the default, with FUNC/MUTABLE (MFUNC?) to be the unusual case.
 
@HostileFork I actually think that you are right
defaults should be different but that is imo
 
However, it's a little bit tenuous, because they'll still have to deal with the "reality" when not writing code inside of a function.
 
brb
 
9:46 PM
@HostileFork StackOverflow just notified me of your mentioning me about RenCpp. Sounds interesting. I assume I'll be able to process REN data with C++ with it?
I admit I don't do any C++ coding but we have considered writing a REN parser for our crappy PHP framework (Yii) here at work.
Actually, I'd like a JavaScript REN parser and then replace Yii with something written in Rebol.
 
 
1 hour later…
10:48 PM
posted on January 29, 2015 by AdrianS

Initial release of RenCpp and Ren Garden Posting this on behalf of Fork who hasn't been around here for a while and says he's lost his credentials. "For those who weren't sure exactly what a C++ binding for Rebol or Red would be 'for', I present here an overview... with a demo of Ren Garden... a GUI console with several novel features:      https://www.youtube.com/w

 
11:15 PM
@earl thanks for that post, self modifying code is awesome I am just having a hard time finding a use case(just as I did when I first started lisp programming)
@HostileFork rencpp is a great prelude to your book that you are making about rebol =)
 
@JacobGood1 In short, you love the power, but you don't know what to do with it :p
 
Well, it is hard to find good examples because things like this come up in very specific circumstances while coding. In the land of lisp, you dont really need macros until you need macros... lol
so people usually show crappy examples like defining your own if statements and such
 
By the way, speaking of reflection... does any has good examples where reflection in a programming language is useful?
 
I used it in dart to do cool things
 
I am following a C++ mailing list about the future about the language. Everybody agrees that C++ needs reflection, but nobody what it should really look like. Before standardizing a reflection facility, we'll need use cases.
I assumed that users of a homoiconic language would know more about reflection use cases :)
 
11:26 PM
@Morwenn Would you like to see my indecipherable Dart code or should I just try and explain why it was useful?
 
@JacobGood1 A "simple" explanation may be good enough :p
 
note: it was not as useful in clojure(lisp) since the main data structure was a map... maps are "auto reflective" lol
ok ill do my best
Do you know what mixins are?
 
More or less.
Consider it to be less, just in case.
 
class A with B{...} A inherits all the functionality from B so basically multiple inheritance
in dart that is valid syntax
 
So it inherits the functionality without actually being a subclass?
 
11:29 PM
yes
 
Any other notable difference?
 
it cannot have a constructor or be part of a hiearchy
the mixin cant
B cant
 
A or B?
Oh, ok.
 
Though later on they say those features will be added in later
 
So it looks like a class but with restrictions and another purpose (like interfaces).
 
11:31 PM
exaclty, however, in dart every object is an interface
 
Ok.
 
and forgive my typos and spelling I go fast and dont care
as long as you understand lol
not writing some publication you know
anyway, it was because of these limitations that reflection became useful
B has no constructor but what if I wanted B to have a flippin constructor?
I create a method in B called _initB
I then reflect over B and look for any method with _init in front of it
 
Ok, so here is the introspection at least.
 
and I invoke that method upon instantiation of A
so I could ahve a crap ton of mixins
and all of them, as long as they make _initWhatever, can have constructors
 
But the decision to invoke them or not is eventually left to A.
 
11:36 PM
yes so A extends from some base class that always invokes these inits... so now as long as they are in the "init bass class" then all the mixins have cons
That was not all I did but maybe it has convinced you?
 
It reminds me of one use-case that I had in C++ to implement "concept-based polymorphism" in a collection class.
But it is pretty tricky to explain. I am kind of sad that C++ may have introspection capacities before having code generation ones...
 
I still need to learn c++
but yea, reflection is far more useful if you can manipulate what you are reflecting over
 
Of course.
 
have you been learning rebol?
 
In short, what I tried to create was a collection of Base where you can store instances of classes that don't inherit from Base but have function with the smae signature than the virtual functions of Base.
I have learnt the syntax of Rebol and some of its underlying principles, but I have yet to need to something with it.
 
11:42 PM
ah, yes reflection would be nice there
 
Currently, it looks like sequence<BaseClass, Adapter<BaseClass>>. My goal would be to generate Adapter<BaseClass> with reflection by inspecting BaseClass.
 
@Morwenn A canonical baseline example is pretty-printing of enums (and conversely, parsing of strings into enums).
 
I wrote a function in rebol called thread which does this...

>> thread 22 [ add 1 add 2 add 3]

== [add add add 22 1 2 3]

I would like to be able to make it slap a do on the left side...
 
@earl Pretty printing does not require code generation, so there have already been some proposals for C++ (pretty printing is always something good to have). Parsing of string into enums would be great too :)
 
I was talking about reflection :)
 
11:49 PM
Just watched the RenGarden video. Very cool Brian and Morwenn!
 
@earl do you know a way to make thread more efficient? I would like every invocation of thread to do something like this...

>> fn: func [x] compose [(thread 'x [add 2])]
== #[function! (x) [...]]

>> source fn
fn: make function! [[x][add x 2]]

it would be nice if I could ignore writing compose [blah blah] and have thread just spit out the code, would there be a way to use rebol's "function memory" to do this?
 
@JacobGood1 Not sure I really understand what you want, sorry.
In the above example, THREAD could indeed just directly spit out the body block which is then used to create the function:
fn: func [x] thread 'x [add 2]
 

« first day (1551 days earlier)      last day (2229 days later) »