Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 06 09:22
    hiiamboris commented #4158
  • Oct 06 09:19
    hiiamboris commented #4158
  • Oct 06 09:09
    qtxie labeled #4045
  • Oct 06 09:09
    qtxie labeled #3964
  • Oct 06 09:07
    qtxie commented #4158
  • Oct 06 09:05
    qtxie unlabeled #4158
  • Oct 06 09:05
    qtxie labeled #4158
  • Oct 06 09:04
    qtxie commented #4158
  • Oct 06 08:55
    qtxie labeled #4275
  • Oct 06 08:46
    qtxie commented #102
  • Oct 06 08:45
    qtxie commented #102
  • Oct 06 08:43
    qtxie closed #4396
  • Oct 06 08:43
    qtxie commented #4396
  • Oct 06 06:25
    dockimbel closed #5220
  • Oct 06 06:24
    dockimbel labeled #5220
  • Oct 06 06:24

    dockimbel on master

    TESTS: adds regression test for… (compare)

  • Oct 05 18:37
    hiiamboris closed #5223
  • Oct 05 18:23
    Avishri99 opened #5223
  • Oct 05 17:44
    dockimbel commented #5220
  • Oct 05 17:43
    dockimbel commented #5220
Dave Andersen
@dander
My sense is that most people using the tools just don't want to be blocked because they can't load a document. Whether that is possible from the built in codec or a separate module is probably less important to a user of Red than whether they need to write their own parser or not. I understand that cleaning data is a big part of AI work too. That sounds like a great project
Gregg Irwin
@greggirwin
I should have said RFC3339, rather than ISO8601 above.
Nenad Rakocevic
@dockimbel
FYI, we have postponed the switch of View code to a submodule to tomorrow morning, as we are not fully ready yet.
GaryMiller
@GaryMiller
Apparently almost 62,000 Javascript users can't live without JSON comments! https://www.npmjs.com/package/comment-json
Nenad Rakocevic
@dockimbel

@GaryMiller

supports comments everywhere, yes, EVERYWHERE in a JSON file, eventually
Stringify the objects into JSON strings with comments if there are

So fully non-compliant with all the official JSON specs! :+1:

Nenad Rakocevic
@dockimbel
From what I can find online, there's 10M+ JS developers in the world, so:
>> to-percent 62e3 / 10e6
== 0.62%
Gregg Irwin
@greggirwin

@GaryMiller good find. Not sure we can say "can't live without". ;^) At a quick glance, 58K downloads of json-parser, which depends on it account for the vast bulk. Json-parser is deprecated. It also doesn't tell us how much it's actually used. Still, it's a metric. It would be good to know, for example, how many use it to keep comments, rather than just stripping them. Because I don't think we're going to keep comments, especially after looking at the results for how they do it. If you need commentary in JSON, that's fine. Include it as data. It breaks no rules, it round-trips by default, and can easily be ignore by processors. The argument against bloat there would only apply in data exchange scenarios, where it would still be a better solution than comments, because every JSON system would support it by default.

It would be great to extract some of this chat, so the rationale isn't lost.

Oldes Huhuman
@Oldes
Rationale is, that although it is quite easy to add few lines into existing parser, there is no will to do it and you will rather let people to write own parsers if they need it and do two load passes. But can we just move into something else? I really don't want to ready anything about JSON anymore.
GaryMiller
@GaryMiller
True, but if one developer pulls it down with NPM to our server our other 2,999 developers don't have to. So I should correct myself and say at least 62,000 shops that develop in Javascript instead of individual developers. But I know too that not all shops have 3,000 developers. Where I see comment used a a lot is in NOSQL database which are called document databases and basically just large JSON collections distributed across multiple servers. They are commonly versioned which means that new JSON data comes and other JSON data goes from version to version. Usually its safer to comment obsolete JSON data for a while until you're sure you won't need to rollback to an earlier version.
Stan. S. Krupoderov
@iNode
@9214 "quantity isn't quality" - I can agree there, why one would write or use another JSON parser(s) if original one is good enough? Definition of "good enough" may differ of course as in this case. And/but having a number of compeeting libraries may make some sense from "evolution" stand point of view in case if community is quite big and have a lot of spare resources. But it's hardly applicable for Red community and we need more focus there. So duplicate libraries are waste at this stage and proposal to have your own parser when original one is present it is proposal to waste community time. And I'm OK with the point to save core team resources on some "minor" things, from their point of view, but it shouldn't be hidden under "we want to follow the spec in this case".
Vladimir Vasilyev
@9214
@Oldes it's quite easy, technically, to jump from the roof. You know why very few actually do that? Same reason we weight in on JSON comments - it has long-stretching consequences. I think everyone agrees that Red should have an RFC-conforming codec, but whenever or not it needs a JSON5 one is an open question, to answer which we need some first-hand experience.
Oldes Huhuman
@Oldes
My experience was, that I took the first JSON file I found and it failed to load... as a someone who is not following JSON development I was not awared, that comments are not legal anymore and though that it is a Red bug. That's all... and now I can jump elsewhere.
Gregg Irwin
@greggirwin
I declare the JSON comment case...closed. <bangs gavel>
Vladimir Vasilyev
@9214
Actually, two interesting points:
  • Original JSON file that spawned this thread was used, as far as I can tell, to train GANs, and comments in it are a hacky way to manually patch model's options, or debug leftovers.
  • It got replaced by YAML.
GiuseppeChillemi
@GiuseppeChillemi
Developers should receive the reason for the failure to avoid such flow of thougths. Other tools loads this JSON file - > RED does not - > RED codec is buggy. My intuition tells me in such situation it is common to exchange a good compliant implementation for a buggy one: if everything else loads the file and a good tool does not, then the good tool become the bad one. This let me think about people following rules in a territory where people do the opposite: good guys become bad guys and vice versa ! I see a pattern... I could call it an inversion of perceived law
Gregg Irwin
@greggirwin
Red clearly tells you the offending JSON is invalid @GiuseppeChillemi.
hiiamboris
@hiiamboris

wow such a hot debate..

@dockimbel

@hiiamboris About your Red stack related post :point_up: September 10, 2019 9:59 AM:

I don't understand your point here. The stack is a working place for Red functions, so it's heavily used in many different places, as a lot of processing happens on the stack.
You are making a generality from a specific case (and you've picked up one of the worst). Fortunately, it's not that bad, even though the current stack handling is not fully satisfying.
I don't see how that would be helpful. Which problem are you trying to solve with that?

The point is that when I make Red function calls from R/S, I have to make sure my stack layout is correct. But I have no means to test for that correctness. Okay, sure, I can write a ton of asserts, but this approach has some shortcomings..

Anyway, it was just a vague idea born from pretty brief R/S exposure, that I wanted to share with you. If you say this problem is uncommon, I trust your judgement :)

GiuseppeChillemi
@GiuseppeChillemi
@greggirwin does RED tell you the reason ?
Gregg Irwin
@greggirwin
@GaryMiller thanks for the use case info.
@GiuseppeChillemi do you mean "Your JSON contains comments, which are not valid."? No, because then our codec would become massively bloated with every possible invalid construct someone could come up with.
That could be another external utility though.
Oldes Huhuman
@Oldes
@greggirwin funny thing is, that Red actually don't load the file because other reason than comment:
load/as  {
  "name": "debug_002_RRDB_ESRGAN_x4_DIV2K"
  , "use_tb_logger": true
} 'JSON
*** User Error: {Invalid json string. Near: {^^/  "name": "debug_002_RRDB_ESRGAN_x4_DIV}}
*** Where: ???
Vladimir Vasilyev
@9214
Well, what do you know. There's a missing pair of wrapping {...}.
GiuseppeChillemi
@GiuseppeChillemi
@greggirwin Just remember that our mind tend to fill the uncertainess with its own explanation when no other explanation is provided. Sometime this could put you off track. However, if the combination of error cases is low (< 20 ?) explaining would be good. Otherwhise (cases >20) no explanation or generic one, or divided in classes of error, is advised.
GiuseppeChillemi
@GiuseppeChillemi
@9214 However, I have not followed the debate on the reason why LOAD will not have an /option refinement to pass a block of options to the internal specific data parser/codec. Has this happened here ?
Gregg Irwin
@greggirwin
Load spec blocks are a conversation for a later time.
Gregg Irwin
@greggirwin
@Oldes as @9214 said your example is malformed. If I remove the comments from the original URL-sourced data, it loads fine. So it is the comments.
Oldes Huhuman
@Oldes
:point_up: September 18, 2019 11:20 PM there is no comment.
Gregg Irwin
@greggirwin
Yes, and your content is malformed.
load/as  {{
  "name": "debug_002_RRDB_ESRGAN_x4_DIV2K"
  , "use_tb_logger": true
}} 'JSON
Oldes Huhuman
@Oldes
Ok.. I really have to end with this. Good night.
GiuseppeChillemi
@GiuseppeChillemi
Good night Oldes, do not despair! We are humans. Our difficulties let us all exchange opinions and evolve. It's falling down and emitting strange sounds we learn to walk and talk.
Koba-yu
@koba-yu

Though I have not read and understood all discussion here(Sorry, not have enough time and knowledge for me), I just want to comment
VS Code treats JSON and JSON with Comments as different languages.

https://drive.google.com/file/d/1rH2lXn1Nms_BDHamyNFMOBin7hgf-ufK/view?usp=sharing

Maybe this is one practical choice example that JSON and JSON with Comments are different.
If Red distinguishes them in the same way, JSON codec(if it is not JSON with Comments codec) does not allow comments is understandable.

Gregg Irwin
@greggirwin
Thanks for the info @koba-yu.
Koba-yu
@koba-yu
@greggirwin Thank you for your reading!
packetrhino
@packetrhino
Question: is anyone familiar with the "expect" program that was based on TCL? Is there an equivalent for Red, at least under Linux/Unix systems?
Gregg Irwin
@greggirwin
There is no Excpect for Red...yet. I have Exploring Expect on my shelf, and have thought about implementing it at times. Step 1, I think is a CLI dialect that offers interrogation and feedback for itself, and sub-commands it may launch.
xqlab
@xqlab
@dockimbel maybe I was too hasty. I was thinking about something like a load-json: function with the optional refinement. But even with load/asis a solution possible. Offer a json-comment field under system\options, that can contain the wanted comment ways.
xqlab
@xqlab
from IParser (HAPI FHIR Structures - DSTU3 3.8.0 API)
   getHandleComments

    boolean getHandleComments()

    Whether to parse or ignore comments - either reading or writing

    setHandleComments

    IParser setHandleComments(boolean value)
Gringo
@15926222352
I now want to develop a DAPP in EOS block chain don't know if the community have the programmer would like to help me develop the DAPP I would like to pay with RED TOKEN
Gringo
@15926222352
Red team you should let the Red Community Token can play out the value of ICO for one year I didn't find Red scrip have any real value can not correctly reflect value
Boleslav Březovský
@rebolek
@15926222352 please, don't post same messages into multiple rooms. Thanks!
Gringo
@15926222352
@rebolek ok
Rudolf Meijer
@meijeru
I am using the Red progress site (https://progress.red-lang.org/) to stay abreast of developments. Until recently, it tracked all branches of the red/red repository on Github, but the latest activity on refactoring the lexer is not appearing there. Can @x8x, who I think is behind this site, explain?
Or is the site using a fixed list of branches?
Gringo
@15926222352
There will be language development in red DAPP programmers? I want to use red token to pay for development costs. Thanks
Gringo
@15926222352
Red language project team should organize more activities for example use red language as the foundation of application development or DAPP game development contract
@dockimbel
Petr Krenzelok
@pekr
I don't want to re-open the JSON codec, but codecs in general. As Gregg pointed out, we might have several codecs, given their size it might or might not be an ideal solution. Given the Redbol dynamic nature, I can imagine codecs having some /parsefunction and/or local storage of available parsers in a block. Imagine if some standard develops, and you might welcome versioning, it could be codec/parsers: [1.0 [.....] 1.2 [....]]. Any such storage is dynamically extendable, sortable, searchable, as it is a block or a map.