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
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.
Free version is enough.
viayuve
@viayuve
i just want fast compilation :cry:
Boleslav Březovský
@rebolek
I don't understand.
viayuve
@viayuve
my one program compilation takes about 5 to 7 min
Boleslav Březovský
@rebolek
That must be a big program.
Anyway. compiler is written in Rebol, so it's interpreted. You can't expect it to run fast. Once it gets rewritten to Red and compiler could be compiled, then it should get faster.
viayuve
@viayuve
0.9.5 right ?
Boleslav Březovský
@rebolek
I guess so.
Rebootr
@Rebootr
@hiiamboris You're right! in the McAfee log I found this: BehavesLike.Win32.Dropper.th, GenericRXGX-HD!9F7841A16EA4
Vladimir Vasilyev
@9214
@Rebootr please report it as a false positive. We fight an uphill battle with AV vendors whose recognize Red as "generic malware", McAfee included.
GaryMiller
@GaryMiller
Couldn't you compress the .exe file before distribution to prevent it from being falsely identified as Malware.
Semseddin Moldibi
@endo64

my one program compilation takes about 5 to 7 min

@viayuve You might compile your program with -r if it is not necessary compile without it, it would be faster (if you don't have R/S in your code of course)

GiuseppeChillemi
@GiuseppeChillemi
This message was deleted
Ops... wrong group
No... right one !

@9214
Well, I have tried the SET words-block values-block solution with no success.

test: function 
[
    action 
    passed-args-block [block!]
]
[

        args-def: [
        add 
        [
            the-path [string!]
            key [word!]
            value [any-type!]
        ]

        del
        [
            the-path [string!]
            key [string!]
        ]
    ]

        function-words: extract select args-def action 2

        set function-words passed-args-block         

]

test 'add ["a-path" "a-key" "a-value"]


probe the-path 
probe key 
probe value
"a-path"
"a-key"
"a-value"
>>>

Words set into function seems to exists after function exit:

Vladimir Vasilyev
@9214
test: function [
    action arguments
    /local
        path key value
][
    table: [
        add [path key value]
        del [path key]
    ]

    set select table action arguments
]
nedzadarek
@nedzadarek
@GiuseppeChillemi I haven't followed the discussion but:
that's because function only collect set words (+ some exception) and [the-path key value] are words.
ps. if you want post simple code snippets that people would run in the repl then avoid unnecessary new lines (e.g. after function, after first ]. Your code might compile but it won't run correctly in the repl.
GiuseppeChillemi
@GiuseppeChillemi
@9214 is there any solution without enumerating words in the argument block ? I would have the table block as the only source of words.
@nedzadarek what Is the REPL?
Respectech
@Respectech
@GiuseppeChillemi REPL is the Red console. It is a generic term for a console that takes commands and executes them.
nedzadarek
@nedzadarek
@GiuseppeChillemi google is your friend: read–eval–print loop (source). Just like Red's console:
1) it reads what you type
2) evaluates it to some data
3) print that data to the user
4) go to 1 till you close the console
More in-depth information in the source.
Greg T
@gltewalt
@GaryMiller Yes, compressing it with upx tends to be a workaround
@viayuve Are you using -c option to compile as you work. It’s much faster than -r (release mode).
You should only need release mode when your ready to distribute the binary. Release mode might take awhile, but it’s a one time thing
GiuseppeChillemi
@GiuseppeChillemi

@nedzadarek

ps. if you want post simple code snippets that people would run in the repl then avoid unnecessary new lines (e.g. after function, after first ]. Your code might compile but it won't run correctly in the repl.

Those "unnecessary" new lines avoid me being confused. Words are isolated and clear and there are not so many symbols that my mind have to decode.