Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 17 22:15
    hendursaga starred gilch/hissp
  • Jan 16 22:31
    gilch closed #142
  • Jan 16 22:31

    gilch on master

    Reword "Extra `)`" error messag… Allow ! to stack Extra! Extra!… Merge pull request #143 from gi… (compare)

  • Jan 16 22:31
    gilch closed #143
  • Jan 16 22:31
    gilch commented #143
  • Jan 16 22:27
    gilch opened #143
  • Jan 16 22:26

    gilch on extra-extra

    Reword "Extra `)`" error messag… Allow ! to stack Extra! Extra!… (compare)

  • Jan 16 08:20
    gilch commented #142
  • Jan 16 04:18
    gilch opened #142
  • Jan 16 02:53
    gilch commented #139
  • Jan 16 01:51
    gilch commented #139
  • Jan 16 01:08
    gilch commented #139
  • Jan 16 01:08
    gilch commented #139
  • Jan 16 01:07
    gilch commented #139
  • Jan 16 01:02
    gilch commented #139
  • Jan 16 00:59
    gilch commented #139
  • Jan 15 23:41
    gilch commented #139
  • Jan 15 23:38
    gilch commented #139
  • Jan 15 23:26
    gilch commented #139
  • Jan 15 22:52
    gilch commented #139
gilch
@gilch
See the ;;;; COLLECTIONS section.
[\"a\",\"b\"] also works, but single quotes are easier.
gilch
@gilch
(list '(a b)) would also work, but beware of munging when using symbols as strings this way.
You might expect (list '("a" "b")) to also work, but that has to compile the quotes in to distinguish them from identifiers, resulting in ["('a')", "('b')"].
The right way to do that is (list `(,"a" ,"b")).
gilch
@gilch
Unlike the collection atoms, you can interpolate runtime values this way.
If you're doing anything complicated, like nesting these, or using them in macro templates, the overhead of managing the unquotes and the extra set of parentheses can make this difficult.
In that case, I'd recommend using helper functions.
gilch
@gilch
If you like Python's default collections, that would mean the entuple, endict and enlist helpers demonstrated in the quick start.
You could also define an enset in a very similar way to enlist.
If you'd rather have collections that work more like Clojure, I'd recommend installing pyrsistent and using their helpers.
gilch
@gilch
They implement the appropriate collection protocols, so they mostly just work with other Python libraries, and in case they don't, you can thaw.
Kyle I S Harrington
@kephale
one thing i keep seeing over and over, i think it is coming from using nested macros "SyntaxError: Bad space: '\t'"
a minimal example is:
this throws the error
(.upper (let (mystr "asdf")
          (operator..add mystr "ghj")))
this doesnt:
(.upper (let (mystr "asdf") (operator..add mystr "ghj")))
gilch
@gilch
Tab characters are not allowed for indentation in Lissp. Use spaces.
Kyle I S Harrington
@kephale
ah ok, i was just using the default behavior of emacs and dont really care about the difference
great that it is an easy fix
gilch
@gilch
I suppose I could make that error message clearer.
Tabs are allowed in strings, they just aren't whitespace.
Kyle I S Harrington
@kephale
is there a technical reason?
gilch
@gilch
Standard tab stops are technically supposed to be equivalent to 8 spaces, when used as indentation. But you more often see them set to 2 or 4, and 1 or 3 is not that rare either. Because indentation is so important for legibility in Lisp, and for Parinfer to work, bad tabstop settings can cause a lot of issues.
Kyle I S Harrington
@kephale
i see
so legibility/parainfer, and not something like reader macro clashes or things along those lines
gilch
@gilch
Especially when working on teams, where members might be editing using different software.
Disallowing them altogether prevents all these issues, and also eliminates a bunch of special cases tooling would otherwise have to deal with.
You can see the regex for tokenizing Lissp in hissp.reader.
gilch
@gilch
It would not be technically difficult to match \s+ as whitespace, instead of the current [ \n]+.
But disallowing tabs for indents was intentional.
Kyle I S Harrington
@kephale
ok, to be clear i don't care at all, but default emacs config (at least on ubuntu) seems to use tabs. so to me it just seems like another config hurdle for new users
gilch
@gilch
Default emacs config is pretty dated. It's probably still using the traditional 8-space tabstops. Parinfer might be using 2 spaces.
I should make the error message clearer, and maybe give it a mention in the docs, since standard practice for most other languages is to treat tabs as whitespace.
Kyle I S Harrington
@kephale
that would be good
i'm still not 100% sold but again i'm pretty indifferent once i change my settings
i understand your reasoning, and maybe it lines up with the forced indenting style of python
but since tooling isnt provided for hissp or default configurations
it does seem like an extra hurdle for new users
gilch
@gilch
Looks like Parinfer is configurable, so it might depend on which plugin.
gilch
@gilch
I agree it's a hurdle for new users. I still don't think that allowing tabs is worth it, as it is just a config change. Once and done. Once Lissp is more stable, maybe it can have dedicated tooling that handles this. Then they just install the plugin for their editor and it configures that for them.
gilch
@gilch
I'm hoping to get the next release out some time this weekend. At the rate I'm going, I feel optimistic.
Kyle I S Harrington
@kephale
huzzah!
gilch
@gilch
I've accomplished my issues for the 0.2.0 release. I still need to review and merge the copy edit, then I just have to build, manually test, and release the new package.
I can probably get that done tomorrow.
Kyle I S Harrington
@kephale
:confetti_ball:
gilch
@gilch
pip install hissp
@/all Hissp 0.2.0 is up on PyPI.
Kyle I S Harrington
@kephale
:thumbsup: awesome
gilch
@gilch
Hissp has officially hit 100 stars on GitHub!
Kyle I S Harrington
@kephale
nice!