8 ms·
> you will end up needing something that is only available for the most popular 5-6 languages The thing that is the Special Sauce for Racket is it's macro syst
by baldfat 9y ago
> you will end up needing something that is only available for the most popular 5-6 languages
The thing that is the Special Sauce for Racket is it's macro system. You can build your own language for specific things easily or you can extend Racket with a library also much easier then the other 5-6 languages.
Racket really has a chance of being the Python of functional(ish) languages. The ability of the community to produce a great ecosystem is all right there baked in. http://jeapostrophe.github.io/2013-07-22-123list-post.html http://jeapostrophe.github.io/2013-07-22-123list-post.html
I also think the documentation is all in one place. The library Scribble makes it simple for everyone to document your macro/library simply and uniformly. I really have high hopes for Racket over the next 5 years.
- irahul 9y ago> The thing that is the Special Sauce for Racket is it's macro system. You can build your own language for specific things easily or you can extend Racket with a library also much easier then the other 5-6 languages. Compare the raw format: https://stripe.com/docs/api/curl#metadata https://stripe.com/docs/api/curl#metadata with Python: https://stripe.com/docs/api/python#metadata https://stripe.com/docs/api/python#metadata How are macros going to give me a better solution that the one which exists, is tested and have been used by others for some time? Besides, macros are a meme. What difference are macros going to make when wrapping a api? Can you show me an existing lisp/clojure wrapper which is more expressive than python/ruby?
- bad_login 9y agoThe example you give doesn't have boilerplate so macro can't do more. Macro can help for two things: - reduce boilerplate - add new function to your language (often specific and limited in context of use [racket's macro a suposedly composable]). Example: racket match, clojure.async.
- irahul 9y ago> Macro can help for two things I know what macros are and what macros can do. The parent poster made a comment that somehow macros can help overcome non-existence of wrappers in Racket. We both agree that macros won't help in this case, and my personal opinion is macros are a meme. They help some in very limited circumstances yet they are touted as a productivity multiplier. A pattern match over if-else doesn't really buy much. It's nicer, sure, but not by much.
- bad_login 9y agoThe specific problem of wrapper around HTTP API have been resolved with WSDL (https://www.w3.org/TR/wsdl https://www.w3.org/TR/wsdl) assumming the use of WSDL the only thing a macro could do is equivalent of what an external program that generate a python file implementing the WSDL could do. I have written a php parser with the racket LLAR macro and it doesn't add more than an external tool like bison. Reducing boilerplater could make your code less buggy (bugs you catch with your eyes) and could make the meaning of the code more clear. Racket match is realy nice but it will shine if: - You use a lot of immutable datasctructures. - Explore shallow tree like data structures. > and my personal opinion is macros are a meme As far i has understand macro is already in use as Annotations for java. In php, programmers developped complex frameworks that generate code (Symfony for instance) before running the user's code even if it isn't a macro per-se it share the same goal. And i could have mention c++ template, so i don't think macro are a meme they already exists and there is a demand for it.
- irahul 9y ago> assumming the use of WSDL the only thing a macro could do is equivalent of what an external program that generate a python file implementing the WSDL could do. I am not assuming the use of WSDL and macros still don't do much. > Reducing boilerplate could make your code less buggy (bugs you catch with your eyes) and could make the meaning of the code more clear. Macros aren't required for reducing boilerplate and don't necessarily reduce boilerplate compared to a non-macro solution in an expressive language. I read almost all of racket's documentation cover to cover and learnt Clojure about 5 years ago. There are a lot of good things to say about them but as far as expressiveness go, but I didn't found them anymore expressive than Ruby or Python. > Racket match is realy nice but it will shine if: > - You use a lot of immutable datasctructures. > - Explore shallow tree like data structures. The things you pointed out are non-macro things. I like match, especially when it's well integrated in the lang. viz f#. I just don't like the difference that being able to cook up your match using macros makes a huge difference when it comes to programming productivity. > i don't think macro are a meme You misunderstand my point. Code generation with or without macros is useful. That's not a meme. "Macros are a secret sauce" is a meme.
- DigitalJack 9y agoI don't think the point was necessarily that you can always do better with lisp (with or without macros). A best case solution, regardless of language, can't be improved by definition. The point is that you can adapt lisp to an equivalent best case solution. And if you like to program with lisp, that's a win. If you don't like lisp, then it doesn't matter.
- bpicolo 9y ago> has a chance of being the Python of functional(ish) languages I love lisps, but I don't think racket comes anywhere near the accessibility level of python. I'm not convinced a functional language (in the style that current functional languages take) can in general. Imperative python is extremely easy to grok.
- bigtunacan 9y agoMy personal experience is the opposite. I have found Racket to be much more approachable and easier to follow than Python.
- baldfat 9y agoJohn Carmack on his 10 year old son's first program. > I’m still taking a little heat from my wife for using an obscure language instead of something mainstream that is broadly used in industry, but I have nothing but good things to say about using Racket and DrRacket for a beginning programmer, and highly recommend it. https://groups.google.com/forum/#!topic/racket-users/yjRuIxypUQc https://groups.google.com/forum/#!topic/racket-users/yjRuIxy... I would say that typing your Python code is easier, but the rest is much easier in Racket. 1) easier to debug 2) easier to deploy 3) easier to design 4) easier to think through due to the concise manner of building programs I have plenty of friends who use Python and they can write a 100 line program without a problem. After it is over 1000 it just falls apart. In a functional(ish) language it allows for a MUCH easier way to follow Do Not Repeat Yourself.
- throwaway7645 9y agoHow is deploying Racket?
- DisownedWheat 9y agoWell you can deploy the executable file to a server if it has the Racket runtime just like Python, Ruby etc. But there is a tool called `raco distribute` that will bundle the executable and the runtime into a folder that you can then distribute to anyone.
- rsheridan6 9y agoI tried to use Scheme years ago, and I found that no matter how good a language is, writing something to interface with some ugly API or something like that, or debugging an existing one that hasn't been used thoroughly, is a lot of work. Not sure where Racket itself stands these days, since the last time I used it it was called PLT Scheme.