Giter Club home page Giter Club logo

Comments (5)

Olical avatar Olical commented on May 28, 2024

Hey there! Sorry for the mess, I need to migrate Conjure since nfnl should make it far easier for people to contribute.

You shouldn't need the Aniseed macros at all and your client will be relying on the compiled Lua output of Conjure, the macros are only there at compile time in the Conjure source. From your code's perspective they shouldn't exist and you shouldn't need them.

This error is because you're concatenating a nil with .. in your calls to conjure.log/append. I recommend using conjure.aniseed.string/join to join strings together which will handle nils no problem. I personally would replace EVERY use of .. with a call to my join function because .. has been the source of MANY bug reports in the past where a nil slips through.

from conjure.

Risto-Stevcev avatar Risto-Stevcev commented on May 28, 2024

Thanks for the suggestion, the issue though is that line 499 in conjure/lua/conjure/log.lua -- it looks like it's because I have a local definition of comment-prefix. What do I need to do to fix it without using aniseed?

I tried poking around in the code but I'm not familiar enough with fennel/aniseed/lua/neovim-scripting to figure out how to set it. It looks like it needs a tset, looking at the macro definition here, but I couldn't figure out where the definition for sym is coming from, so I just got stuck here.

I really love the library btw! I think this sort of thing is the right kind of approach to repl-driven development, especially since it lets you add custom clients. If I can get the nodejs repl working, I think it's not that hard to create a netrepl sort of thing where it can also eval into any context, browser, cordova, over the network, etc, by proxying to a websocket.

from conjure.

Olical avatar Olical commented on May 28, 2024

Ah I see! So let's demystify it a little, these blocks are all identical at runtime:

(module my-thing)
(def comment-prefix ";; ")
(local module {})
(tset module "comment-prefix" ";; ")
module
{:comment-prefix ";; "}

The def / defn macros just make the Lua module system look prettier and make it so you don't have to jump around the file to see if something is exported or not basically. Sorry that it makes it confusing to follow, it's simpler than it seems at runtime but the macro is pretty terrifying to make that happen.

from conjure.

Olical avatar Olical commented on May 28, 2024

I'm going to close this one because I think there's enough information to unblock, but please re-open if you have any questions! Aniseed->nfnl conversion (which is just plain fennel, no magic macros) is the next big change I'll make to Conjure after clojure-dap is in a nice spot.

from conjure.

Risto-Stevcev avatar Risto-Stevcev commented on May 28, 2024

Thanks for the help, that worked -- I think just exporting comment-prefix fixed that error. I did start making some progress, but I got stuck with something with node I think, because I could get a send/receive sort of thing with a linux pipe but node wasn't sending anything back. I don't think I should be blocked anymore. I'll play around with it some more to see if I can get a minimal debug-able example working as a template.

from conjure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.