Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 20 2019 22:59
    @dockimbel banned @SmackMacDougal
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
Boleslav Březovský
@rebolek
Hm, it does, I guess. But if you're in console, it doesn't help you very much.
Max
@moliad
but constants don't really make sense in a console anyways ;-)
Boleslav Březovský
@rebolek
well for testing, they do
nedzadarek
@nedzadarek
@pimgeek nice visualisation - can we see it online?
Vladimir Vasilyev
@9214

@nedzadarek

Why do you think I'm using function by default?

Because you're naive enough to think that it can cover all cases properly, and take care of set and copy in Parse.

it's just they are less suited to more complex code.

Maybe the problem is in your code then? As you yourself so boldy affirmed: but It starts to depart from the Rebol's motto "Rebol against complexity"

Let's dissect your examples.

Straw man fallacy. Do you understand how ridiculous it is to "dissect" one-liners written for demonstrative purpose? They show an idea, not an implementation.

What if you have 10 or 20 words that have more than 4 characters in it?

Then you probably should reconsider your design approach.

whenever or not someone are changing some core functionality of the parse. It makes code less readable.

I have a hard time trying to follow this argument. Purpose of bind is evident here, and you can change "core functionality of Parse" from Red, because it's a parsing engine written in R/S.

Yes, it's that easy.

If you try to discredit me, at least do so properly:

>> f: function [][
[        callback: func [event match? rule input stack][
[            also yes if all [match? find [set copy] first rule][
[                append words rule/2
[            ]
[        ]
[    
[        probe unique also words: [] parse/trace [a b c][
[            ahead [copy a [3 word!]] 
[            ahead [set b skip]
[            copy c [2 skip]
[            set  d to end
[        ] :callback
[    
[        unset words
[    ]
== func [/local callback words][
    callback: func [event match? rule input stack] [also yes if all [match? find [set copy] first rule] [append words...
>> reduce [:a :b :c]
== [unset unset unset]
>> set [a b c][1 2 3]
== [1 2 3]
>> f
[a b c]
>> reduce [:a :b :c]
== [unset unset unset]

Above works as expected, contrary to your claim.

If you are going to say

Oh, no, I'm not going to say anything. Seeing how you don't have anything constructive (or original) to add to this discussion, I'm rather disinterested in continuing it. Arguing for the sake of arguing is solely your prerogative.

Boleslav Březovský
@rebolek
I think that the discussion can be less personal.
Vladimir Vasilyev
@9214

@pimgeek

is there anything in Red like (let ... ) in the Lisp language?

let: func [environment body][
    do bind copy/deep body context environment
]

set [a b][1 2]

let [a: 3 b: 4][
    probe a + b
]

probe a + b
nedzadarek
@nedzadarek

@9214

Because you're naive enough to think that it can cover all cases properly, and take care of set and copy in Parse.

No, read the next sentence...

Straw man fallacy. Do you understand how ridiculous it is to "dissect" one-liners written for demonstrative purpose?

I'm sorry. I should have used different word. I guess "examine" should be better.

Then you probably should reconsider your design approach.

https://github.com/red/red/blob/master/runtime/allocator.reds#L466

Purpose of bind is evident here,

Yes, it's easy to understand. You know why? Because it's just one line. When you write more line you will start to understand this.

and you can change "core functionality of Parse" from Red, because it's a parsing engine written in R/S.

Not sure why mentioned R/S but I agree, I can change (at least some part) parse.

If you try to discredit me, at least do so properly:
Above works as expected, contrary to your claim.

So, do you expect to destroy some words from some other context? Well, I'm not sure why you corrected it. I'm really confused about this code. We were talking about "local words in the function" (how to make it local) and your function changes/delete those words (and it shouldn't do this)

Oh, no, I'm not going to say anything. Seeing how you don't have anything constructive (or original) to add to this discussion, I'm rather disinterested in continuing it. Arguing for the sake of arguing is solely your prerogative.

I'm sorry. I believe in my arguments but I cannot explain it clearly to you. It might be my knowledge (language and/or programming).
I respect you for your knowledge and willing to help others so I, as you said, I don't want to waste your and mine time.
I'm fine If you don't want to answer to this post.

GiuseppeChillemi
@GiuseppeChillemi
I would try to create self generating code from "specs", either as function, or objects or parse code to create a DSL.
Could I define an object and then make it even if not defined at code start ?
Could I do the same with a function ?
Is there any code I could not create dynamically in RED ?
Boleslav Březovský
@rebolek

Is there any code I could not create dynamically in RED ?

No.

@nedzadarek @9214 I think that there's a misunderstanding. There are no "local words in the function" in Red/Rebol. There are only words that belong to some context and that's what some people don't understand and some people can't explain. But only patient explanation can bring understanding, restlessness is just a distraction. There should be some Zen of Red guide that can calm everyone down.
GiuseppeChillemi
@GiuseppeChillemi

@rebolek I ask again, because I had no answer to this gitter question:


In RED Blog I have read :

Still some features are not yet implemented:

building a function at runtime (requires the ability to JIT-compile source code)

Boleslav Březovský
@rebolek
@GiuseppeChillemi that's a statement, not a question. It's not implemented, yes.
GiuseppeChillemi
@GiuseppeChillemi
@rebolek It's me who has written this the gitter question and I was asking if this affirmation is still valid.

It's not implemented, yes.

Do you mean "yes, you can't build a function at runtime, this affirmation is valid " ?

Boleslav Březovský
@rebolek
Yes, you can't build a function in Red/System at runtime, this affirmation is valid.
It's really low priority.
It would be nice to have, but compiling is so easy that it's really not a problem.
GiuseppeChillemi
@GiuseppeChillemi
@rebolek Excuse my ignorance: what does mean "building a function at runtime ?" could you make an example ?
Vladimir Vasilyev
@9214
How can @rebolek make an example if it's not implemented?
Boleslav Březovský
@rebolek
@GiuseppeChillemi it means building a Red/System function at runtime. Are you using Red/System?
GiuseppeChillemi
@GiuseppeChillemi
@9214 No
Pardon
@rebolek No
Boleslav Březovský
@rebolek
Then you should forget about it and enjoy the world as it is.
GiuseppeChillemi
@GiuseppeChillemi

@9214 I tought that "building a function at runtime" was something related to code like

a: func [] []

In RED

But built with COMPOSE
Boleslav Březovský
@rebolek
Nope, this is only related to Red/System.
GiuseppeChillemi
@GiuseppeChillemi
Ok, so I can leave without it (by now !)
Vladimir Vasilyev
@9214

Jeez... you link a 7 year old blog post about Red compiler and ask if it's possible to create function's at runtime in compiled code - the answer is no, because that would require just-in-time compilation, and current compiler is ahead-of-time one. In general, current compiler cannot support dynamic code.

You can build functions at runtime in interpreter though, that's what func, function and other function constructors do all the time.

Boleslav Březovský
@rebolek
@9214 please...
Vladimir Vasilyev
@9214
You can create them, but you can't modify their specs, because that would require JIT compiler too.
GiuseppeChillemi
@GiuseppeChillemi
Actually I discovered that I can't use a SELECT in place of functions arg block or code block, selecting them form another block which acts as a library. This because after the first run the associated code is maintained and no more selection is possible.
This is the reason why searching for documentation on functions I tought that post was still valid, even after 7 years.

@rebolek

@9214 please...

:-))))

Vladimir can answer in any way he wants to me. I have started to get used and apreciate the good thing of him (talking personally)

Boleslav Březovský
@rebolek
@GiuseppeChillemi of course the docs are still valid, but you need to differentiate between Red and Red/System. If you can post some examples of your code, it would be really helpful.

@GiuseppeChillemi

Vladimir can answer in any way he wants to me.

Great :smile:

GiuseppeChillemi
@GiuseppeChillemi
@rebolek his personality and knowledge makes him the great person he actually is and he does not need to change to "sweeten the pill". I have learnt to read what he writes and not anymore the sound that make his words in my head.
@9214 , @rebolek
So RED/System functions are different from RED functions. The first ones are not so flexible like the last.
Boleslav Březovský
@rebolek
Yup, there's some subtle difference.
nedzadarek
@nedzadarek
@rebolek I don't think I confused someone like him.
Well... do you have better short phrase to describe this?
Rebootr
@Rebootr
Good night. When I try to start red-064.exe, after a while compiling the console closes. While compiling, I looked at the %ProgramData% directory, and a dll and gui-console.exe was created. As soon as the gui-console file has been created, it is deleted and the screen closes, with no error or warning message. Anyone have any idea what's going on? The version red-063.exe works normally.
hiiamboris
@hiiamboris
@Rebootr could be a malicious prank of some "antiviral" software
nedzadarek
@nedzadarek
@Rebootr I don't have such problems. I assume you are on windows. Could you start the console (cmd) and run it from there? You may see some errors this way.
pimgeek
@pimgeek
@nedzadarek it's not synced with the cloud 😅 but possible, I can used thebrain cloud service to publish my local data online. But the cloud service is way too expensive. I plan to develop my personal customized publishing site, as well as a desktop client. 😊
Can I use the red language to manage a sqlite3 database? If I can do that, it will be cross-platform 😊
nedzadarek
@nedzadarek
@pimgeek I see. Well, I'll be waiting for it.
viayuve
@viayuve
how many core red uses when compiling.
Boleslav Březovský
@rebolek
Red does not compile, compiler is written in Rebol. And it's single threaded application.
viayuve
@viayuve
rebol pro sdk :(
Boleslav Březovský
@rebolek
No, you don't need SDK license for compiling.