Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Gregg Irwin
    @greggirwin
    The delete issue may be OS specific. On Windows you can't have a dir and a file with the same name. But on other systems, case sensitive differences may allow it.
    Oldes Huhuman
    @Oldes
    >> dir? %"r:\Temp\"
    == false ;<---- not recognized as a DIR...
    ;... but accepted by READ
    >> read %"r:\Temp\"
    == [%0600fd54-a93d-491e-8817-cbb2795e263e.tmp %0ada0c50
    Gregg Irwin
    @greggirwin
    Simple I/O converts to local file format when reading.
    Oldes Huhuman
    @Oldes
    So is it a bug or a feature?
    Gregg Irwin
    @greggirwin
    dir? checks for slash at tail (which my local version obviously extends to backslash as well ;^).
    It's a good question. :^)
    hiiamboris
    @hiiamboris
    / is not a backslash ;)
    Gregg Irwin
    @greggirwin
    ...whatever do you mean? (thankful for editability to look less stupid)
    hiiamboris
    @hiiamboris
    :D
    I don't know why dir? should not support \ as well.
    Since it accepts a file! it should work with files of any format.
    Oldes Huhuman
    @Oldes
    I think that the reason is, that it's expecting that file! is normalized like in Rebol:
    >> %path\
    == %path/
    And that in url! the backslash is not for dirs.
    hiiamboris
    @hiiamboris
    Never seen a backslash in an url..
    Gregg Irwin
    @greggirwin
    This is the bug/feature question, and how mezzanines like dir? track with underlying I/O API use. e.g. in R2 it asked the OS if the thing was actually a dir, not just a string that looked like one.
    If you don't tell Red it's a local file, should it assume so?
    Oldes Huhuman
    @Oldes
    The source of the issue is, if Red should normalize slashes or not. Now it does not:
    >> %aa/bb\cc
    == %"aa/bb\cc"
    hiiamboris
    @hiiamboris
    No it should not. Normalization only when loading a file value seems to me like strange special case.

    R2:

    >> append f: %a "\"
    == %a\
    >> load mold/all f
    == %a/

    initial value lost in translation...

    hiiamboris
    @hiiamboris
    On dir? - if we make it accept \, we will want the same for split-path, clean-path and others, increasing overall complexity and pushing the problem around
    gltewalt (The other Greg)
    @gltewalt:matrix.org
    [m]
    A type is not necessarily dependent on its lexical representation, at least right now.
    Gregg Irwin
    @greggirwin
    I agree with @hiiamboris. It helps for Red to be more strict about file forms, so translations to OS forms are more explicit and files are truly passive, not lossily adapted. But we know that at some point a file has to be read from the OS, and necessarily use its conventions. So then the question is pass-thru behavior and overall consistency.
    @gltewalt:matrix.org forms define types when loaded, but rules can be broken.
    gltewalt (The other Greg)
    @gltewalt:matrix.org
    [m]
    Yes, with to
    Gregg Irwin
    @greggirwin

    per :point_up:

    >> ? any-type!
    ANY-TYPE! is a typeset! value: [datatype! unset! none! logic! block! paren! string! file! url! char! integer! float! word! set-word! lit-word! get-wor
    
    >> help-string any-type!
    == {ANY-TYPE! is a typeset! value: [datatype! unset! none! logic! block! paren! string! file! url! char! integer! float! wo...
    >> print help-string any-type!
    ANY-TYPE! is a typeset! value: [datatype! unset! none! logic! block! paren! string! file! url! char! integer! float! word! set-word! lit-word! get-wor

    So this may not be help's fault. @hiiamboris @qtxie worked on a console issue recently, which I thought was resolved, but the above is from a fresh build here.

    red/red#4809 is what I'm thinking of.
    hiiamboris
    @hiiamboris
    I also noticed the output is too small often, but didn't report it.

    >> probe help-string any-type!
    {ANY-TYPE! is a typeset! value: [datatype! unset! none! logic! block! paren! string! file! url!^/}

    this looks like help issue to me

    Gregg Irwin
    @greggirwin
    OK, I'll take a look.
    gltewalt (The other Greg)
    @gltewalt:matrix.org
    [m]
    While you're taking a look, add in a help/buffer
    Gregg Irwin
    @greggirwin

    What do you mean @gltewalt:matrix.org ?

    The issue is letting the truncator act on typeset values, which will never be outrageously large.

    PR submitted to fix help.
    gltewalt (The other Greg)
    @gltewalt:matrix.org
    [m]
    I mean give folks the equivalent of what/buffer for help
    Gregg Irwin
    @greggirwin
    You mean like help-string?
    gltewalt (The other Greg)
    @gltewalt:matrix.org
    [m]
    It isn't obvious that help-string is a thing folks can use. (At least last time I looked)
    Gregg Irwin
    @greggirwin
    Both what/buffer and help-string are not really meant for normal use. Help in general is console oriented, so the goal is to present information in the console. We did add the ability to get those formatted results for tools to leverage.
    gltewalt (The other Greg)
    @gltewalt:matrix.org
    [m]
    Ok
    Maciej Łoziński
    @loziniak
    Hi! I've got a garbage collector crash:
    root: 7669/106222, runs: 4, mem: 7618812
    *** Runtime Error 1: access violation
    *** in file: /mnt/share/prj/x3m/wallet2/allocator.reds
    *** at line: 461
    ***
    ***   stack: red/update-series F45D5B1Ch 2867320 1103392
    ***   stack: red/cross-compact-frame F4760004h 084C4648h
    ***   stack: red/collect-frames 1
    ***   stack: red/collector/do-mark-sweep
    ***   stack: red/collector/do-cycle
    ***   stack: red/alloc-series-buffer 48 1 0
    ***   stack: red/alloc-series 48 1 0
    ***   stack: red/alloc-bytes 48
    ***   stack: red/binary/do-math 7
    ***   stack: red/binary/xor~
    ***   stack: red/actions/xor~*
    (Another thing being that there is no allocator.reds in this folder anway)
    >> about
    Red 0.6.4 for Linux built 18-Jan-2021/10:06:33+01:00 commit #de5c05e
    hiiamboris
    @hiiamboris
    need a way to reproduce it ;)
    Maciej Łoziński
    @loziniak
    It can be hard, probably no way to separate it into minimal case, as this is GC. And my code is not public :-(
    Boleslav Březovský
    @rebolek
    I recently had GC doing recycle very hard for almost three minutes and no crash! :-)
    hiiamboris
    @hiiamboris
    When GC crashes it is no guarantee that GC is to blame. Something else may have corrupted the memory.
    Gregg Irwin
    @greggirwin
    @hiiamboris is your memory marker experiment something @loziniak could use locally?
    hiiamboris
    @hiiamboris
    Not if he cannot reproduce it himself ;)
    And it's 1.5 years old already...
    Gregg Irwin
    @greggirwin

    I thought he meant he couldn't minimize it for us to test.

    Time flies.

    Maciej Łoziński
    @loziniak
    For now I'll probably leave it, because after some updates to the code the error disappeared. However, it may come up later. Thank you, guys!

    I thought he meant he couldn't minimize it for us to test.

    That's because I assumed it's GC bug. As hiiamboris mentioned ↑, it's not necessarily the case.