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
lepinekong
@lepinekong_twitter
@ne1uno no finally it's just stupid me ;)
ne1uno
@ne1uno
ok, usully good idea not to blame the computer, but with alpha code you never know
lepinekong
@lepinekong_twitter
@ne1uno as for the other day's bug about stuffs above header I checked multiple times, it's really is !
Vladimir Vasilyev
@9214
@lepinekong_twitter I think you can report it in /bugs room to get a feedback, because Red should ignore preface on load, and I remember reporting that as my first issue, though it was concerned only with script interpretation.
lepinekong
@lepinekong_twitter
@greggirwin about what-dir I did think that it was current dos dir because there are system/options/script so it's a bit confusing to not have such info in system/options, but at least now I know I can use what-dir ;)
lepinekong
@lepinekong_twitter
@greggirwin what-dir is ok for getting script folder, but it doesn't give the script filename : this one doesn't seem to be in any script/options or script/path or it is none like system/script/path: none
hiiamboris
@hiiamboris

@9214

@hiiamboris the order of rebindings. Doc's approach is more robust, because he overrides /locals.

wow that was subtle! for a wiki ;)
thanks for clarifying that

Gregg Irwin
@greggirwin
@lepinekong_twitter, we'll certainly look at what tracing kind of info can be leveraged when doing scripts and loading modules. If you need control, in the meantime, just write a do-script function that takes the filename. With that you can store the path(s) in a stack, and load the file to get header info yourself.

@hiiamboris, a lot of our current wiki content is extracted from various chats and posts, links to things we don't want to forget, but not yet fully organized, fleshed out, or noted for where important info and gaps need to be filled.

@gltewalt, maybe we should start a wiki task list for to-do items? That can be the first item in its recursive wiki page.

On the closure article, we have a few people who could be a great brain-trust to explain the differences. @JacobGood1, @dander, @maximvl ? Including examples of how they differ in behavior would be great.
Jose Luis
@planetsizecpu
Is some one using notepad++ ? I installed latest v7.5.6 update last days. have you noticed about "Outer Space Message" ? I did, then wrote "Space Invaders", selected this text and pressed F1, then the message made visible :smile:
Toomas Vooglaid
@toomasv
I use notepad++. Version is 7.5.6, but didn't see the message.
Jose Luis
@planetsizecpu
@toomasv please, write Space Invaders, select the text and press F1
Toomas Vooglaid
@toomasv
Haa! They got me!
Jose Luis
@planetsizecpu
it is a nice message, do you think?
Toomas Vooglaid
@toomasv
It is, let them stay in peace!
Jose Luis
@planetsizecpu
let's hope it reaches the entire planet ;)
BeardPower
@BeardPower
@planetsizecpu The must be new in v.7.5.6 :)
Jose Luis
@planetsizecpu
@BeardPower yes I just noticed at changelog
It is a hook to make you visit their homepage :)
BeardPower
@BeardPower
@planetsizecpu IAT!
Jose Luis
@planetsizecpu
:smile:
lepinekong
@lepinekong_twitter
@greggirwin ok thanks. For me that kind of info is what really makes big difference between different languages .
Is there something equivalent to compose but for string for example to do something like this:
compose-string {zip.exe "(target-directory)(short-filename).zip"}
Gregg Irwin
@greggirwin
lepinekong
@lepinekong_twitter
@greggirwin :+1:
for script filename and path it's usefull not only for tracing but for generic programming, even old msdos has it:
@echo off
REM "c:\test\"
@echo on
echo %~dp0
@echo off
REM "c:\test\test.txt"
@echo on
echo "%~dpn0.txt"
hiiamboris
@hiiamboris
@lepinekong_twitter form rejoin compose ["zip.exe " (dirize target-directory) (short-filename) ".zip"]
Gregg Irwin
@greggirwin
@hiiamboris, I think you'll need to include some extra quotes, to get what @lepinekong_twitter is after. Not hard of course.
hiiamboris
@hiiamboris
true :)
Nenad Rakocevic
@dockimbel
@hiiamboris This is enough:
rejoin ["zip.exe " (dirize target-directory) (short-filename) ".zip"]
hiiamboris
@hiiamboris
true as well, since there's nothing that shouldn't be evaluated there ;)
Toomas Vooglaid
@toomasv
Can do w/o parens:
rejoin ["zip.exe " dirize target-directory short-filename ".zip"]
hiiamboris
@hiiamboris
you're all torturing the original idea :D
that was to throw in a lot of exprs, some to be evaluated, some not, some may be files, and get the string
Gregg Irwin
@greggirwin

you're all torturing the original idea

And now nobody will test composite. :^(

hiiamboris
@hiiamboris
@greggirwin actually I was wondering, what's the use case for it?
I mean, even in c++ they decided to hell with %d %s etc, let's just << everything into a stream
nedzadarek
@nedzadarek
@lepinekong_twitter compose-string {zip.exe "(target-directory)(short-filename).zip"} It reminds me of the Ruby's "2 + 2 #{2 + 2}"
Toomas Vooglaid
@toomasv
@lepinekong_twitter
composite works fine:
>> target: %. short: "myfile" composite {zip.exe :(dirize target)::(short):.zip}
== "zip.exe ./myfile.zip"
nedzadarek
@nedzadarek

@hiiamboris

actually I was wondering, what's the use case for it?

I guess text manipulation (1) and and calling external exes (2).
1) Ruby:

name = "Baltazar"
age = 999
puts "Hello #{name}. You have #{age} years."
puts "Random number #{rand 42 + 1000}"

It's very easy to write and read.
2) LIke @lepinekong_twitter wanted to call zip.exe with some arguments, in Ruby you can do something like this:

system "zip.exe #{target_directory}/{short-filename}.zip"
Vladimir Vasilyev
@9214
@nedzadarek and you absolutely can't do the same with rejoin?
nedzadarek
@nedzadarek
@9214 I can rejoin ["zip.exe " target-directory "/" short-filename ".zip"] but I prefer Ruby style.
nedzadarek
@nedzadarek
With mentioned composite I can do this: composite/marks {Some #{probe "interesting"} Red expressions like 3 + 2 = #{3 + 2}} ["#{" "}"]. @9214 wouldn't it be possible to have some special syntax like e"foo", """triple""" or "foo"e?
Well... no need to new syntax if nothing will change:
e: func [str] [composite/marks str ["#{" "}"]]
e"zip.exe #{target-directory}/#{short-filename}.zip"
I just like when a programming languages allow such little things!
Vladimir Vasilyev
@9214
@nedzadarek if you can fulfill your strongly opionated preferences by yourself with mezzanines, why push it into core language? I have yet to see a single need in string interpolation with Red.
9214 @9214 opinionated*
nedzadarek
@nedzadarek
@9214 I'm not good with mezzanines or "low level Red" but "syntax" like e"some string" is good enough.
Vladimir Vasilyev
@9214

@nedzadarek

I'm not good with mezzanines

But you just wrote one.

nedzadarek
@nedzadarek
Really?