Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 20 22:20
    hiiamboris commented #5045
  • Jan 20 22:19
    hiiamboris commented #5045
  • Jan 20 21:22
    gurzgri opened #5045
  • Jan 20 19:12
    dockimbel labeled #5044
  • Jan 20 19:12
    dockimbel labeled #5044
  • Jan 20 19:12
    dockimbel assigned #5044
  • Jan 20 18:13
    hiiamboris commented #5044
  • Jan 20 18:09
    hiiamboris opened #5044
  • Jan 20 15:22
    endo64 opened #5043
  • Jan 20 14:47
    greggirwin commented #5015
  • Jan 20 13:06
    dockimbel commented #3340
  • Jan 20 13:06
    dockimbel commented #3340
  • Jan 20 13:01
    qtxie commented #5015
  • Jan 20 11:55
    hiiamboris commented #5015
  • Jan 20 11:43
    hiiamboris commented #5015
  • Jan 20 10:15
    qtxie commented #5015
  • Jan 19 23:23
    hiiamboris commented #4109
  • Jan 19 23:23
    hiiamboris commented #4109
  • Jan 19 22:48
    endo64 commented #5042
  • Jan 19 22:41
    endo64 opened #5042
Dave Andersen
@dander
@dirtbagger It would probably be helpful to look over this reference for differences before you start. And would be very helpful if you record any new things you find there as well!
Gregg Irwin
@greggirwin
Thanks @dander, yes, more info is always good.
Gregg Irwin
@greggirwin

@JacobGood1, thanks for those links. We have various elements of debugging to address: language (errors), instrumentation/tracing (runtime), and environment (tooling). @maximvl did some CL-like experiments, which were pretty cool, showing how Red can be adapted at the user level for some things. Tooling is probably the easiest thing to address, because we can build them as needs arise, and use the future plugin system in the console and full IDEs. e.g. a 5-minute object inspector:

debug-obj: function ['obj [word!] "Ref to object"][
    o: get obj
    spec: copy [across]
    repend spec ['h3 rejoin ["Editing: " obj] 'return]
    foreach word words-of o [
        repend spec [
            'text form word
            to set-word! rejoin ['f- word] 'field 'data o/:word compose [
                (to set-path! reduce [obj word]) face/data
                probe o
            ]
            'return
        ]
    ]
    probe spec
    view spec
]
o: object [x: y: 0]
debug-obj o
o2: object [x: y: z: 1]
debug-obj o2

Instrumentation is an interesting area I'm keen on (think DTrace), and Red's dynamism is great and terrible for some of these issues. e.g., it's not just a compiler optimization switch we can flip. We also constantly push and pull, on the design side, about what needs to be in R/S for performance, and what can be built at the user/mezz level. Also figuring out what hooks are necessary in order to facilitate probing and AOC type features, without going full MOP on people. I'm not saying MOP is bad, not at all, just that it's not part of Red's design today.

It all raises questions about debugging in general, and that one size does not fit all. Sometimes you're debugging a function, working in the REPL, sometimes an application, other times a complete system.

JacobGood1
@JacobGood1
You should always be working in a repl =P
luce80
@luce80
@JacobGood1 So much true...I hope to see an editor that let's you debug a selection of code and/or that let's you isolate all but a new function (or even a line) you are creating, and let's you debug only that. Or does it exist already?
P.S. have you seen this ;) ?
Rudolf Meijer
@meijeru
@greggirwin debug-obj is a nice quickie, but when I called it with an expression evaluating to an object, rather than with a word referring to an object (which admittedly I should not have done), it showed a confusing error message. I will report on this in red/bugs.
Jose Luis
@planetsizecpu
Why not a switch? I used a very effective debugger for many years, you selected the point where you wanted to start
debugging with the debug-on keyword and the point where you should end the debugger withdebug-off.
Then you compiled the program in debug mode, so when it was executed it worked normally, and, when program arrived at
the debug point, a window opened where you could see the source code and the debuger awaited confirmation to execute
each instruction, step by step, also check the status of the variables or continue the normal process by closing the
debuger. I saved many hours looking for hidden faults, but it is just a idea.
Vladimir Vasilyev
@9214

selected the point where you wanted to start debugging

I hope you realize that in Red this "point" cannot even exist in a textual program at the time of debugging (e.g. code generation). Traditional breakpoints are extremely limited, and cover only a naive, static subset of the language.

Jose Luis
@planetsizecpu
I know, and there maybe also events code running ... bigger challenge, just a idea, as I said.
Vladimir Vasilyev
@9214
Not to mention dialects, for which debugging and error messages should be, ideally, domain-specific. Which means that Red should provide some "debugging framework" to build on top of.
JLCyclo
@JLCyclo
@luce80 For debugging a script step by step, try https://github.com/red/community/blob/master/tools/rdbstep.red
I will update this script to manage breakpoints in a way not to simulate automatic step commands until a breakpoint.
Gregg Irwin
@greggirwin
@meijeru, yes, lit-word args deserve a good article written about them, their exceptional flexibility, and the pitfalls that come with it.
@JLCyclo thanks for the reminder about that. I get an error just putting it in the console. Need to read up.
Type help or h or ? for help at the prompt (rdbstep)
*** Script Error: stepnext does not allow string! for its redsrc argument
*** Where: stepnext
*** Stack:
Will try to make time to check it out in the near future.
JLCyclo
@JLCyclo
In the header of rdbstep.red, there is some help
Usage: "From REPL : do/args %rdbstep.red <Red Script>"
How do you run the script rdb.red ?
Gregg Irwin
@greggirwin
I copied the source to the clipboard and did do read-clipboard in the console. Standard practice for me, when playing around. Will download and run standalone in the future.
Gregg Irwin
@greggirwin
@packetrhino if you'd like to be in the loop on any Expect related chat, let me know. I've done some reading today, and remembered a couple related projects I've done. One is send-keys, which is a Windows-only GUI lib for keystroke pumping. Another was an old Install Helper app that launched apps, watched for dialogs and interacted with them, etc.
packetrhino
@packetrhino
@greggirwin yes please do keep me in the loop
JacobGood1
@JacobGood1
@9214 and an easily extensible ide for those dialects
Rudolf Meijer
@meijeru
I have downloaded the latest red.exe for Windows (22-Sep-2019, sha: 7daa2dd5) and compiled the console (yielding gui-console-2019-9-22-34786.exe) but, strangely, when I ask for about, it gives me Red 0.6.4 for Windows built 20-Sep-2019/18:03:51+02:00 commit #04daa5e, which is a much older version. What am I doing wrong? Also, I can't see a commit with sha: 7daa2dd5 anywhere.
So far, one explanation seems to be that red-latest-exe has not been updated.
Gregg Irwin
@greggirwin
What OS? I don't see a 7daa2dd5 for any of the SHAs on the download page.
04daa5e is from 20-sep.
Nenad Rakocevic
@dockimbel
@x8x ^---
Rudolf Meijer
@meijeru
@greggirwin I am on W10. 7daa2dd5 is part of the filename. Is that not the sha of the latest commit going into the latest .exe?
Rudolf Meijer
@meijeru
@x8x Progress site is again not up to date: latest commit on red/red/master (23 hours ago) does not show up.
Rudolf Meijer
@meijeru
Also, date of start of week is not shifted to 23 sept
FLuX
@x8x
Checking..
FLuX
@x8x
progress is fine, will have to investigate some JS timeout issues, JS is a mess..
Rudolf Meijer
@meijeru
:+1:
Rudolf Meijer
@meijeru
I am looking for the Wiki entry that lists the functions that still have TBD in their specs. It was recently made but not findable from the Wiki main page. Help!
Vladimir Vasilyev
@9214
@meijeru here.
Rudolf Meijer
@meijeru
Thanks to Ian Nomar for making this. I did an exhaustive scan of the pre-defined functions, and the only one he missed is request-dir which has a /multi refinement to be defined.
Gregg Irwin
@greggirwin
@meijeru I thought that signature part came from the build webhook, but can't find the details right now to verify. @x8x? :point_up: September 23, 2019 12:29 AM
FLuX
@x8x
All is good now, small issue related to the git submodule experiment.
Gregg Irwin
@greggirwin
Thanks for jumping on that @x8x!
Rudolf Meijer
@meijeru
I confirm. Thanks!
FLuX
@x8x
@meijeru Thanks for watching our back and reporting! Much appreciated :smile:
Gregg Irwin
@greggirwin
@meijeru on red/red#4047 the behavior is easy to reason about, but you're correct that it's not documented. It is by design however, as there is explicit integer handling logic. @gltewalt, would you please add an example to the image! docs?
Oldes Huhuman
@Oldes
@greggirwin I must disagree again with you. I consider @meijeru issue to be a bug. Sorry.
@greggirwin regarding your ask on chat comment... I don't like it either.. it is easy to lost info in these chats and quite often there is no response, like in this another buggy case
Gregg Irwin
@greggirwin
If someone says "Is this intended?", it's a questionable ticket. If we chat, and agree it's ticket-worthy, then we put it in a ticket. That simple.
If it's a bug, then it's either a design bug, and should be addressed as such, or a genuine bug, in which case we need to determine the correct/expected behavior.
Rudolf Meijer
@meijeru
I can reformulate it as a genuine bug by saying: since it has not been documented anywhere and is not obviously by design (at least not to me), I say there should be an error message that it is forbidden. That may then be dismissed by the Red team with proper justification and motivated interpretation of what it does.
I don't buy the argument of explicit integer handling, because one integer could also be interpreted as four bytes (RGBA).
Nenad Rakocevic
@dockimbel
FYI, we have a WIP red/red#4049 on changing the underlying pair! type to use float32! components instead of integer!. As using floats for pairs is not always desirable (because of side-effects in float handlings), we are considering keeping the pair! as is, and introducing a new similar 2D type, but relying on floats. The hard part, as usual, is coming up with a proper syntax for such type (in addition to a proper name). So we are proposing coordinate! for such new type name and using the same syntax as pairs, but with mandatory decimal markers, e.g. 1.0x2.0. Such type would allow also an optional third coordinate. Would such syntax be acceptable?
Respectech
@Respectech
Would it be possible to also allow 1.x2. as