Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Cerem Cem ASLAN
    @ceremcem
    for example, if the underlying library would throw an exception when a string is passed instead of a number, then I don't do the type checking, that's unnecessary
    sourcevault
    @sourcevault
    do you example in your code where you do type checking ?
    Cerem Cem ASLAN
    @ceremcem
    ah, you mean that by "validation"
    sourcevault
    @sourcevault

    The way you use LS is more hardcore then me, I just like the clean syntax , never used unless <~

    both ~> --> seem to always create extra functions in each file, and performance benchmarks for me at least ended up showing inline lamdas are just faster.

    anyway
    sourcevault
    @sourcevault
    This bit :
    (req, meta, data) ->
            unless req.req
                @log.err "No request is required, doing nothing."
                debugger
                return
    
            # normalize parameters
            if typeof! data is \Undefined
                data = meta
                meta = {}
    sourcevault
    @sourcevault
    .. using functional guards ..
    hop = require "hoplon"
    
    send-response = hop
    
    .ar 2,(req,meta) ->  send-response req,{},meta
    
    .arwh do
      3
      (req) ->
        if req.req then return true
        log.err "No request is required, doing nothing."
        debugger
        false
    
      (req,meta,data) ->
    
         # < main core logic goes here

    ofc, its going to use a extra while loop , because its not Erlang where its built into the compiler.

    but when you have a function with complexity , it becomes a non-issue.

    Cerem Cem ASLAN
    @ceremcem
    an extra while won't hurt in much cases, but I think I should understand how hoplon behaves to see above code clearly
    Cerem Cem ASLAN
    @ceremcem
    backcalls (<- and <~) are handy when rest of your code takes in place within the callback. See gkz/LiveScript#1085
    I almost never use --> and ~~>, considering possible performance impacts
    sourcevault
    @sourcevault

    I almost never use --> and ~~>, considering possible performance impacts

    👍🏼

    LS could have allowed a macro binder to expand -->,~~> based on your requirements
    both infile and in global LS config
    sourcevault
    @sourcevault
    # LS global config file
    
    l = require "lodash"
    
    module.exports =
    
        "~>":_.curry
    sourcevault
    @sourcevault

    an extra while won't hurt in much cases, but I think I should understand how hoplon behaves to see above code clearly

    I though providing a example from your own code I could have made it easier 😂.

    Clearly the docs are not clear enough.

    while loops don't interfere in your tightloops when your code is functionally lazy.

    but yes, if you use functional tools in imperative style, be ready to get hit with performance penalty.

    sourcevault
    @sourcevault

    I have been doing multi directory compilation of livescript files.

    It slows down quite a bit.

    lsc needs a compilation flag that says if you would want to ignore time-stamp that are more recent that your final changes - like makefiles.

    Cerem Cem ASLAN
    @ceremcem
    What are you using for compilation tool? Bare lsc?
    sourcevault
    @sourcevault
    yes
    lsc -bco dist src
    @ceremcem SALAM ! 😃
    is there a good wrapper ?

    makefile have this feature where they compare the timestamps of the compiled file, and the source file.

    if the source file has CHANGED after the compiled file destination, then only it compiles

    I faced this problem 4-5 years ago, I had a extremely large directory with many folders with lsc files
    I wanted to create a npm module to handle the situation, but it never got around to it.
    Cerem Cem ASLAN
    @ceremcem
    hi! :)

    is there a good wrapper ?

    I'm using Gulp+Browserify without any issues. It never compiles a file that is compiled beforehand.

    like gcc <-> Makefile relationship, there should be lsc <-> Somethingelse
    sourcevault
    @sourcevault
    are you using Gulp+Browserify for lsc though ?
    sourcevault
    @sourcevault
    it seems you are
    Cerem Cem ASLAN
    @ceremcem
    yup
    what is your context?
    are you developing a web application or something else?
    sourcevault
    @sourcevault
    node.js app
    it seems ... how would you insert random paths into your gulp file ?
    for example in the case of lsc
    lsc -bco dist src
    - lsc -bc test
    Michał Majchrzak
    @m_a_j_ch_rz_a_k_twitter
    Hello, does anyone have a example of LiveScript with React/Vue/Riot/etc ?
    Michał Majchrzak
    @m_a_j_ch_rz_a_k_twitter
    so LiveScript is dead?
    There is no one here?
    Cerem Cem ASLAN
    @ceremcem
    hi

    so LiveScript is dead?

    no, it does what it offers. so, it stays quiet. some new ideas are discussed in github issues, but no one (thankfully) is in a rush

    there are pretty much examples on the internet. what did you exactly stumble on?
    sourcevault
    @sourcevault

    so LiveScript is dead?

    Microsoft and typescript are going to die before livescript, inshallah.