Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ven
    @vendethiel
    alright, np :-)! See you
    Irakli Gozalishvili
    @Gozala
    @Nami-Doc feel free to post here & I'll reply later
    ven
    @vendethiel
    guess I'll try to come to gitter more often, I'm mostly on IRC
    Irakli Gozalishvili
    @Gozala
    or create an issue and I'll respond there
    ven
    @vendethiel
    I try to avoid creating issues for questions haha. Good night!
    for later: so yeah as I said, this macro works fine, but I'm trying to generate it from a list of operators (swap + with others). I'm not sure how to do that? I'd like to call something like (generate-compound-assign + - *) (or maybe with quotes) and have it like that
    Irakli Gozalishvili
    @Gozala
    @Nami-Doc you can define generate-compound-assign macro that will produce defmacro forms like the one we talked about earlier
    ven
    @vendethiel
    The question is: how? How can I create such macros, concat the symbols, etc?
    ven
    @vendethiel
    macro generating macro I've done already, but never in wisp, and as I said, no clue how to concat symbols and thing
    Irakli Gozalishvili
    @Gozala
    @Nami-Doc something along this lines should work
    (ns hello.world
      (:require [wisp.sequence :refer [list concat]]))
    
    (defmacro defoperator
      [op seed f]
      `(defmacro ~op
         ([] ~seed)
         ([x] (list '~f ~seed x))
         ([x & etc] (concat (list '~f x) etc))))
    
    (defoperator +! 0 js/plus)
    ven
    @vendethiel
    oooh, much thanks!
    seems like I could use that. Though that's a bit limitating
    actually, err, doesn't seem to work
    I don't really what your code is supposed to do
    it just kinda looks like (lambda (& arg) (apply + 0 arg)) :o).
    (and a big part of my question was how to concat symbols, because that looks like a power I'd love to abuse :P)
    Frank Xu
    @frankyxhl
    Hi,@Gozala. Amazing job! I want to try wisp these days. I wonder what's your development environment when you write wisp code? like SLIME for Emacs, Cursive for IntelliJ Idea.Thank you.
    ven
    @vendethiel
    I don't think there's something as good. I think you should try something that has a good clojurescript support
    Frank Xu
    @frankyxhl
    Thanks.I will find it later.I'm using cheerio.But I don't know how to escape the parentheses after $.How to write this code in wisp?
    var cheerio = require('cheerio'),
        $ = cheerio.load('<h2 class="title">Hello world</h2>');
    
    $('h2.title').text('Hello there!');
    Frank Xu
    @frankyxhl
    I got it.Pretty Simple.
    (.text ($ "h2.title") "Hello there!")
    ven
    @vendethiel
    well :)
    Aleksei Mironov
    @alexmironof
    This message was deleted
    Aleksei Mironov
    @alexmironof
    Hi! Is there a way to use Javelin with Wisp?
    I am using Meteor.js and there is meteor-wisp package.
    I want to try Javelin with Meteor (I like the spreadsheet like data bindings), will it compile seamlessly with Wisp?
    ven
    @vendethiel
    I'm not sure we have that much interop with cljs
    Aleksei Mironov
    @alexmironof
    Thanks! Yeah I see, I just got an answer from Javelin dev, he says that I can use Mori for those missing parts :)
    Aleksei Mironov
    @alexmironof
    btw is homoiconically means that we can have more cljs data structures native in Wisp?
    Irakli Gozalishvili
    @Gozala
    @kefirchik At the moment arbitrary clojurescript code won't compile via wisp compiler, although with some tweaks it's was easy enough to reuse cljs code. So I don't think javelin will work out of the box, unless there is js version of it in which case I don't see any problems
    @kefirchik homoiconicity does not necessary imply that, although plan always was to support most data structures that are in clojure(script). Actually all standard ones with exception of (value to value maps) are there although they do compile into different (more native to JS) representations
    ven
    @vendethiel
    mmh.
    (still looking for a way to concat symbols !)
    Irakli Gozalishvili
    @Gozala

    @vendethiel sorry I thought I replied that. You could contact them as follows

    (symbol (str (name 'foo) (name 'bar)))

    Although that assumes you don care about symbol namespace.

    Rui Carmo
    @rcarmo
    hey there. build status is failing, want me to try updating deps and having a go at it?
    Irakli Gozalishvili
    @Gozala
    @rcarmo that would be great, please do!
    @rcarmo I’d be also ok with ditching node@0.8 I think
    Adam Avramov
    @egasimus
    @gozala Hey, this Gitter thing is pretty cool :)
    Adam Avramov
    @egasimus
    anyway, yeah, my situation is a bit more complicated than could fit in 160ish characters
    Irakli Gozalishvili
    @Gozala
    @eivindj sorry I’m at the meeting right, now I’ll ping you once I’m out
    Rui Carmo
    @rcarmo
    Hey @Gozala! :) I'm kind in the middle of a few things now, but will try updating deps when I need to do something relaxing (yeah, I know... by the way, get much sleep lately?)
    Irakli Gozalishvili
    @Gozala
    @rcarmo yeah it’s not that bad actially, my time constraints are actually more related to the the day job :)
    @egasimus ok so I’m aronud
    @egasimus and yeah macro imports is the absolutely a think that has being p1 for me for quite some time. I had a work in progress patch to get there but it’s not done yet I’m afraid.
    @egasimus that being said some ppl suggested to point a compiler to files with macro definitions to incorporate those during compilation
    @egasimus implementing that should be quite easy I think
    @egasimus what some ppl do I think is create custom scripts that import compiler + macros they want and in that case macros will be available for the scripts it’s going to be compiling
    @egasimus to implement proper macro import, some changes to the anaylzer and compiler are required.
    Irakli Gozalishvili
    @Gozala
    1. Namespaces support right now is kind of really weak, so that needs to be fixed & I have some patch laying around that I think does that, but was breaking a test that I did not had time to digg into.
    1. Once namespaces are there, analyzer will need to handle imports (currently it does not do that), by which I mean it needs to actually read imported modules and register encountered macros.
    1. Once thos two pieces are in place macro expander code will just need to take macro namespaces into account.
    @egasimus if you’ll have intereset on hacking on any of these I’d be happy to help as I can.
    Irakli Gozalishvili
    @Gozala
    In terms of when I’ll be able to do it myself, I’m afraid I don’t have an answer, but as things look right now I don’t imagine soon.