Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Daniel Rodríguez Rivero
    @danielo515
    Hello
    Is anyone using livescript-next ?
    Any idea how can I use it to compile my source files ?
    Cerem Cem ASLAN
    @ceremcem
    I'm still using 1.4
    Daniel Rodríguez Rivero
    @danielo515
    Hahaha, actually I'm using livescript 1.5,but I was asking about a side project that transforms livescript ast to babel ast
    So you can take advantage of all the babel ecosystem
    I've been able to write a simple compiler, but there should be a better way
    They have instructions for running code, but not for compiling code
    The only reference to compiling is a single line about their api, which is what I'm using to build the dummy compiler
    ven
    @vendethiel
    @ceremcem I'm not sure I'd say I'm "actively working on types". I think we're going to tank @rhendric's branch, because my idea is somewhat stuck in limbo
    (requires heavy amount of backtracking)
    (sorry, I hadn't opened gitter in ages)
    Daniel Rodríguez Rivero
    @danielo515
    Hello, can someone tell me how can I make a function that returns an object ?
    Actually an array of objects
    The only body of the function is the array return
    Cerem Cem ASLAN
    @ceremcem
    seriously? did you take a look at livescript.net for that?
    ven
    @vendethiel
    listar, [], whatever floats your boat
    Cerem Cem ASLAN
    @ceremcem
    @vendethiel I thought you proceeded very well on types. I feel a little bit guilty because of being out of the development effords
    ven
    @vendethiel
    I think we're going to go with @rhendric's implementation of my earlier proposal, though
    I liked the last syntax I proposed, but... the backtracking isn't worth the gains. sigh
    Daniel Rodríguez Rivero
    @danielo515
    seriously? did you take a look at livescript.net for that?
    Yes, seriously
    I opened an issue in fact and seems to be a bug
    Its not possible
    Cerem Cem ASLAN
    @ceremcem
    LiveScript 1.4.0 - use 'lsc --help' for more information
    ls> x = -> {hello: \there}
    [Function: x]
    [Function: x]
    ls> x!
    { hello: 'there' }
    ls>
    what part may I misunderstand?
    Daniel Rodríguez Rivero
    @danielo515

    what part may I misunderstand?

    Sorry, not concrete enough I think:

    x = -> 
       * a: 1
          b: 2
       * a: 2
          b: 6
    I want to return an array of objects
    Cerem Cem ASLAN
    @ceremcem
    x = -> 
      hello = 
        * a: 1
          b: 2
        * a: 2
          b: 6
    
    x!
    Daniel Rodríguez Rivero
    @danielo515
    Yes, that is wat I did
    But it makes no sense to declare a variable that is not going to be used in any way
    Cerem Cem ASLAN
    @ceremcem
    or, absolutely:
    x = -> 
      return 
        * a: 1
          b: 2
        * a: 2
          b: 6
    
    x!
    Daniel Rodríguez Rivero
    @danielo515
    I didn't know you can use return, my bad
    Daniel Rodríguez Rivero
    @danielo515
    Hello people
    One small question
    How do you write something similar to JSDocs in livescript ?
    I want to extract documentation from my comments
    Cerem Cem ASLAN
    @ceremcem
    I think there is no way unless a little hack is introduced:
    hello = (x) -> 
        ``
        /**
         * Create a point.
         * @param {number} x - The x value.
         * @param {number} y - The y value.
         */
        ``
        x * 2
    Daniel Rodríguez Rivero
    @danielo515
    But what does that produce ? A function with that string literal inside right ?
    I don't mind to use something different from JSDOCS as long as I can produce documentation from code
    Cerem Cem ASLAN
    @ceremcem
    hmm, I thought you need to use JSDocs... ok
    you are okay with anything that gives you the documentation
    Daniel Rodríguez Rivero
    @danielo515
    Yes I am, but I don't know which tools are available for LS
    Maybe if JSDOC could be configured to decide which comment token to use...
    but anyway, is there a tool for LS ?
    Cerem Cem ASLAN
    @ceremcem
    I'm not using those type of tools, so I don't know. But I'm pretty sure that JSDocs can be used as is
    Daniel Rodríguez Rivero
    @danielo515
    Ok thanks, I'll give it a try !
    Daniel Rodríguez Rivero
    @danielo515
    At the end I had to write a custom JSDOC plugin to make it understand ls files
    Daniel Rodríguez Rivero
    @danielo515
    Here are the requirements to make it work