
LFGo – Lisp-Flavoured Go - marzz0
https://bitbucket.org/ktg/lfgo
======
zaphar
If this has macros it gives people "generic" programming in Go at the cost of
having to write it all in a lisp dialect. I wouldn't personally mind it but
some might :-p

~~~
yarrel
"Macros are supported via Racket's macro system define-syntax, define-syntax-
rule and defmacro."

So yes. :-)

------
jgalt212
As an aside, seeing more bitbucket hosted libraries on HN lately. This is a
good thing. I am a fan of the github product, but I am bigger fan of not
putting all your eggs in one basket.

~~~
jxm262
I have repo's on github, bitbucket, and gitlab :)

------
alpb
I wish there were actual examples doing some I/O or http server where error
handling comes into picture (which IMO the primary thing that messes up the Go
code syntactically by repeating the "if err != nil {" block).

------
krat0sprakhar
So basically the crux of this is 100 lines of a macro[0]. Am I reading this
right?

[https://bitbucket.org/ktg/lfgo/src/a7f71aec7d29d00100f2d21c2...](https://bitbucket.org/ktg/lfgo/src/a7f71aec7d29d00100f2d21c262e877082ec0155/lfgo.rkt?at=master&fileviewer=file-
view-default#lfgo.rkt-52:147)

~~~
oh_sigh
The macro is really a bunch of case statements, so they can be interpreted
independently.

------
scrupulusalbion
This and Lisp-flavored Erlang make me wonder how far one could take the idea
of a Lisp syntax atop some other language. As a half-joke, I wonder if one
could make a Lisp-flavored C work; should I fear or be slightly bemused at the
idea of a Lisp-flavored COBOL?

~~~
ktg
Author here. L++ (Lisp-flavored C++)
[https://bitbucket.org/ktg/l](https://bitbucket.org/ktg/l)

------
carlhu
Does this racket-based transpiler provide a REPL?

~~~
giancarlostoro
I was wondering something similar, can I just use Dr Racket for this? :)

~~~
baldfat
I would say yes since Racket is a Programming Language for making Programming
Languages :)

------
henryscala
It looks similar to the oden language.

[https://github.com/oden-lang/oden](https://github.com/oden-lang/oden)

~~~
eatonphil
And Gisp.

[https://github.com/jcla1/gisp](https://github.com/jcla1/gisp)

------
giancarlostoro
I am surprised that I didn't think about this till now but Go has simple
enough syntax to where Lisp could be translated into Go code, and I wonder why
Haxe doesn't translate into Go with that same thought. Go definitely has
plenty of libraries at it's disposal standard library wise.

------
oofabz
Is the name a pun on LFO (low frequency oscillator)?

~~~
bojo
More than likely along the same lines as Lisp Flavored Erlang -
[http://lfe.io](http://lfe.io)

------
qz_
But.. why?

------
c3534l
Oh god. They basically just took Go and added unnecessary parenthesis. This is
the worst way to make Go LISP-like.

~~~
iagooar
In my opinion, people who complain about Lisp's parentheses are usually the
ones that have absolutely no idea about Lisp, nor have they any experience
with it. Once you get "into" Lisp, you do not see it as a bunch of parentheses
anymore, so focusing on this aspect suggests that the person who does it, does
not really have much previous experience with Lisp.

~~~
chriswarbo
Plus the fact that a decent editor will handle the parentheses for you.

When programming in Lisp, I use Emacs with paredit (for inserting and
manipulating parentheses, quotation marks, etc.) and have the default colour
for parentheses be very similar to my background colour, so I can focus on the
symbols and their indentation instead. The exception is when the cursor is
next to an open/close parenthesis, in which case the matching parenthesis is
highlighted.

