Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
Linker Storm
@linker_storm_twitter
Last stable Red version on Windows : 0.6.3
ne1uno
@ne1uno
@linker_storm_twitter try latest, the stable version is old. your code seems to work now
Linker Storm
@linker_storm_twitter
@ne1uno thanks, I give it a try
ne1uno
@ne1uno
it's going to be updated to 0.64 soon
Boleslav Březovský
@rebolek
soon ™
ne1uno
@ne1uno
sooner than real soon?
Boleslav Březovský
@rebolek
you can check it for yourself https://github.com/red/red/milestone/24
Linker Storm
@linker_storm_twitter
No luck... :
>> system
== make object! [
    version: 0.6.3
    build: make object! [
        date: 2-Nov-2018/9:01:00+01:00
        git: make object! [
            branch: "master"
            tag: #v0.6.3
            ahead: 1101
            date: 30-Oct-2018/7:30:29+01:00
 ...
>> b: [[1 2 3][1 2 3]]
== [[1 2 3] [1 2 3]]
>> unique b
== [[1 2 3] [1 2 3]]
Waiting for the 0.6.4 then, soon... :)
ne1uno
@ne1uno
sorry, I tried using an old gui from another branch a few days ago. it seems the cli console and new gui both are not doing unique as you would expect
NjinN
@NjinN
>> a: [1 2 3]
== [1 2 3]
>> b: []
== []
>> append/only b a
== [[1 2 3]]
>> append/only b a
== [[1 2 3] [1 2 3]]
>> unique b
== [[1 2 3]]
>> 
Linker Storm
@linker_storm_twitter
@ne1uno It's not really a problem because, waint for the 0.6.4, I will use the correct @greggirwin functions :
red/red#3195
Gregg functions
NjinN
@NjinN
It seem unique do not compare the value of tokens in block
Linker Storm
@linker_storm_twitter
@NjinN Yes, or at least compare a hash of each block
ne1uno
@ne1uno
I can't really tell what the resolution is from that bug report, it was closed.. Function unique not "uniqueizing" series with blocks as arguments red/red#1909
and if it is wont fix, why is the old gui [[1 2 3]]
Linker Storm
@linker_storm_twitter
@ne1uno Yes, but this one is opened and assigned : red/red#3195
ne1uno
@ne1uno
thanks, it still seems odd to have the inconsistent behavior and possible latent bug
viayuve
@viayuve
how to do this? add task 1, start a timer and when task is done stop a timer, auto or manual.
ne1uno
@ne1uno
@viayuve you can see parts of this from dockimbel forked pomodoro.red https://gist.github.com/dockimbel/aa1d5cec15f1eb4b11ece61dcebba22c
viayuve
@viayuve
@ne1uno thanks
viayuve
@viayuve
who was making red system programming book ? If its already being made than link please....
Simon
@simonmc_gitlab
Hello! In the Red/System specification, in the #import section, it is stated that this is not the same as dynamically loading a shared library from your Red/System code after your program has started. Is there a way to dynamically load a dll? If so, is it documented anywhere? Thank you for your help!
Boleslav Březovský
@rebolek
AFAIK, not yet.
lepinekong
@lepinekong_twitter
@ne1uno @viayuve for full version of pomodoro/countdown https://miniapps.red/doc/countdown/ (direct source link: https://github.com/lepinekong/miniapps/blob/master/countdown.red)
lepinekong
@lepinekong_twitter
By the way will change design of https://miniapps.red/ next year jekyll templates too ugly ;)
lepinekong
@lepinekong_twitter
call/wait/out doesn't seem to work on Windows 10 in that case (whereas directly in cmd prompt it returns something):
path: copy ""
call/output/wait {where curl} path
path

path: copy ""
call/output/wait {cmd /c "where curl"} path
path
Nenad Rakocevic
@dockimbel

@simonmc_gitlab

Hello! In the Red/System specification, in the #import section, it is stated that this is not the same as dynamically loading a shared library from your Red/System code after your program has started. Is there a way to dynamically load a dll? If so, is it documented anywhere? Thank you for your help!

You can load a library dynamically, but you need to rely on each platform's OS API (LoadLibrary on Windows, dlopen on others), then map function calls to the imported functions. We should add an abstraction layer for that at some point.

Nenad Rakocevic
@dockimbel

@lepinekong_twitter
where is a shell command, not an executable that can be called. In such case, use the /shell refinement, as the call docstring says:

path: make string! 100
call/shell/output "where curl" path

and eventually:

call/shell/error "where curl" path
;>> path
;== {INFO: Could not find files for the given pattern(s).^/}
lepinekong
@lepinekong_twitter

@dockimbel thanks, so I get error when calling from red:

c:\ > call/shell/error "where curl" path
== 1
c:\ > path
== {INFO: Could not find files for the given pattern(s).^/INFO: Could not find files for the given pattern(s).^/}

but in windows 10 cmd or in powershell I do get this:

where curl
C:\Windows\System32\curl.exe

Will try on Windows 8.

Semseddin Moldibi
@endo64
It could be a permission issue, even change-dir %/c/Windows/system32/ find read %./ %curl.exe returns none
Can you try in another (non-system) folder?
amreus
@amreus
On 64-bit Windows - since Red is 32-bit, System32 is redirected to Syswow64. Try change-dir %/c/Windows/Sysnative/ find read %./ %curl.exe
Max
@moliad
microsoft really know how to make judicious decisions when doing architecture . yes... storing 32 bit apps in a folder with 64 in and storing the 64 bit stuff in the paths with 32 in it... makes total sense. you'd think that they'd used the specific moment things went to 64 bits to cleanup the entire OS and force people to upgrade... meh.
lepinekong
@lepinekong_twitter
@amreus ah that might be the reason as I remember I did write the code originally on windows 8 32 bit while travelling :)
Now what do you mean by Sysnative ? I don't have any c:\windows\Sysnative on my Windows10 64bit so that this cannot returns error:
out: copy "" call/shell/output {change-dir %/c/Windows/Sysnative/ find read %./ %curl.exe} out
lepinekong
@lepinekong_twitter
@amreus in fact if you use find it defeat the purpose of using where: where is supposed to retrieve where curl is installed without even knowing potentially what folders could be.
amreus
@amreus
@lepinekong_twitter call/shell/output/error "c:/windows/sysnative/where.exe curl" path err
amreus
@amreus
You can check if Sysnative exists, for example:
either exists? %/c/windows/sysnative [
  call/shell/output/error "c:/windows/sysnative/where.exe curl" path err
] [
  call/shell/output/error "c:/windows/system32/where.exe curl" path err
]
And if on 64 bit windows, you need to translate System32 to Sysnative in the returned path if you want to use it in another system call
This message was deleted
lepinekong
@lepinekong_twitter
@amreus thanks tried this it works:
path: copy ""
err: copy ""
either exists? %/c/windows/sysnative [
  call/shell/output/error "c:/windows/sysnative/where.exe curl" path err
] [
  call/shell/output/error "c:/windows/system32/where.exe curl" path err
]
lepinekong
@lepinekong_twitter
This works:
cmd: {XCOPY "test\*.*" "target\" /H /R /S /E /Y /C /EXCLUDE:xcopy-exclude.txt}
out: copy ""
call/wait/output cmd out
but not with call/show or call/shell
GiuseppeChillemi
@GiuseppeChillemi
Is there a way to have a button which is kept pressed until the user clicks again on it ?
ne1uno
@ne1uno
you could create a toggle, not sure if a normal button could stay looking clicked
you could draw your own button