How to practice HAML and SASS (environment) - haml

Could you please give me advice how its better to practice HAML and SASS.
I`ve downloaded and installed everything for windows and i can compile files and use it via command line. But still i want to be able to code and browse it at once, not writing anything in command line.
I mean what shall i do on my localhost to use it? Am i to use with any kind of engine, Drupal for example. Or is there a more simple way?
Thanks in advance!

I have recently discovered a free online SASS/SCSS-HAML editor, named Voyage, developed by Zhi-Qiang Lei (thanks!). Very useful for beginners to practice, and for everyone to test snippets quickly.
http://voyage-editor.herokuapp.com/
Hope it helps

Ok so, for Sass and Compass, you can always use the --watch flag to watch the modified files and recompile them on the go.
Now I reckon this doesn't account for HAML wich doesn't have a --watch flag, or other languages such as CoffeeScript etc. The best solution for the moment for a stable and easy to work with environment is to use an external software that will do the command line work for you.
There are several out there, I've tried out a few of them — depending on your current platform and how much you want to put in (from 0$ to 9$). I don't know a lot of free preprocessors manager so if people want to go and comment with free alternatives I'd be glad.
The best in my humble opinion is LiveReload because it's what I've tested to be the most permissive in your organization, it compiles fast, reloads your browser on change, etc.
Cons are it's best to use it on a Mac, considering the Windows version is still in beta and far from finished. But if you're on a Mac, to me it's definitely the way to go.
You can use FireApp too, it does the same job but it's a little less permissive. There are things you can't do with your Compass configuration files, folders you have to name a certain way, etc. It's also paying, but it's cross-plateform (coded in JRuby).
On the free side of life, you currently have CodeKit for Mac but it's free only during the beta and will become paying. On the other hand it's really worth it's money for how well executed it is and it will really make your life simpler.
You can probably go look on the internet for similar softwares, but you get the idea. Currently the best way to have an easy to use work environment while avoiding the command line is to go through those kinds of softwares.

Related

Is there a single working OCaml IDE?

I have downloaded multiple OCaml IDE's / plugins and NONE of them work. I have no clue if I have a directory problem or if something else is at fault. I can access the OCaml console through cygwin just fine but it is not very useful for dealing with larger files. I am a total OCaml noob and have no clue how to fix my problems. I have been reading every post on OCaml here and nothing is helping. I am hoping that somebody can help me because this is very frustrating! Thanks to all who reply.
OCaml modes for Emacs and Vim work perfectly (and they run on MacOS and Windows, of course). I heard Geany works well as well.
I'm not saying everyone must learn Emacs and Vim; I understand that it's a kind of interface that beginners maybe don't want to get into -- and supporting other editors well for OCaml is a problem that we need to fix. But if you want reasonable support for pretty much every kind of text format out there, they're still good choices.
Finally, if you have a decent terminal / command-line (if you are on Windows that might require running a GNU/Linux virtual machine), pretty much every editor will be fine if you compile stuff by hand from the terminal (which is not particularly hard). In-Editor support will still provide you with a better experience, in particular allowing to jump right to the place in your code where the compiler says there is an error, but as a beginner you can go a long way without even that.
PS: it would be extremely useful if you took the time to spell out precisely what your problem with each tool was, and send that information to the respective maintainers. I think the main problem with these tools is the lack of testers. Help the future people that will try these tools by helping the maintainers fix them!
I'v recently looked at OcaIDE for eclipse - and it seems to work.
You need perhaps set some configuration variables (paths to ocaml compiler,...), but I don't remember any quirks.
I would like to thank everybody for their help. I finally found some installation instructions for the tuareg mode in EMACS. In case anybody else is having the same problem that I was there are VERY clear instructions here
How to install tuareg
Hopefully I can now translate some stuff into OCaml that I have been working on in other languages and post some of my projects. Thanks again for all of the help.
You can use Notepad++ for Windows. It is more intuitive for than Vim or Emacs for the beginners. And it has a syntax highlighting for Caml and you can assign hotkeys for compiling executing the program.
I would suggest using OcaIDE. I've done some fairly large projects with it, and it's not bad. Emacs (with Tuareg mode) is also a good option. If you're having trouble with setup, I wrote a guide for OS X: http://www.princeton.edu/~crmarsh/ocaml_dev_environment/

D language dev environment

What is the current state of the art development environment for the D language?
I know about DDT for eclipse, Visual D and Codeblocks. Each has its disadvantages - DDT doesn't have a debugger, Visual D is for windows (and Visual Studio) and CodeBlocks doesn't have emacs keys bindings and I have some bad memories about it from my CS intro days.
Using tools like emacs + gdb is good enough for simple programs but when the code gets bigger I find it really hard to get around the code just with emacs. Without smart code completion and code layout (meaning, list of all functions/classes in a file) it gets really tedious and I feel I spend way too much time struggling with the editor instead of just writing the code I want to write.
Additionally, with Java+eclipse for example I have this neat documentation popup window whenever I mouse over a method/class. I find this extremely helpful, and really miss it when working in emacs.
And debugging with gdb is really just... antiquated.
So, for the love of god, save me from the 1970s! :)
Although, any tips concerning emacs and gdb (if nothing else exists) would be appreciated.
Have you looked at Mono-D?
Further, Sublime Text 2 has pretty good D support. I also maintain an improved highlighter for it.
I switched from Code::Blocks to Mono-D half year ago. However, there is a new kid on the block NetbeansD. For simple stuff Geany and Kate have enough support. :)
All this said, Mono-D beats all competitors at the moment, so try that one first.
Doesn't Emacs have GDB integration that allow you to do stepthough and add brakepoints - all in emacs?
I would suggest you try to configure your Emacs.
I also suggest using a good build tool(I use Rake when I program in Vim, but Emacs might have an elisp build tool), and the ctags and cscope really help in mapping big projects.

Assets (JS/CSS) automatic optimization

With the tools we have today for assets optimization (for example YUI compressor), how do you automatize it?
For example, I have designed a new website using LESS, so every time I have to edit CSS I have to manually convert them to LESS. The same for Javascript.
So I have to make my PHP project to point to my uncompressed CSS/JS, and when I'm finished, I compress/optimize them, and point my project to the optimized ones again.
I know that there are tools that helps with this (like less.app, which I've used), and that even there are PHP libs that manage all this problem (like Assetic), but I don't like them much. I'm searching for a "programmed" way to deal with optimized assets. Maybe some script that "watches" the uncompressed files or something...
I wish I could have too many alternatives as the Django framework has.
Please, if the question is not well redacted, tell me and we can improve it, so we can establish a good practice for assets :)
I think one efficient solution would be to do this task on the development side, when writting code, and point the code to the optimized files.
One tool that seems to work well is Live Reload (only for OS X, although there is a Windows version on the way).
I like this option as there is no overload on the code to maintain assets.

How to create an online rebol console?

Where can I find the code for creating an online rebol console like the one here ?
http://tryrebol.esperconsultancy.nl/
Update: for the sandbox system on the server, can't Rebol manage it itself with some security wrapper and its security options ?
As for console itself, I don't know Ruby so I don't want to use TryRuby and why would I need it ? Can't I mimic Rebol console itself by "remoting" it somehow ? Why RT or Esper Consultancy can't make an opensource version ? There's no value in keeping it closed source. Rebol needs to prove it's more open than in the past.
In my opinion, you should aim higher with something like the already open-sourced Try Ruby. You'd type in expressions and it would guide you. Their showcase site is at tryruby.org and is fairly slick.
I modified TryRuby to work with Rebol and it wound up looking like this:
But I'm not going to run it on my server because I didn't want to belabor the necessary sandboxing/etc. or protections against someone running an infinite loop. I can give you what I've got so far if you want it.
I started a tutorial script here that no one seemed interested in helping me with, so I wandered off to other tasks:
http://www.rebol.net/wiki/Interactive_tutorial_script
I'm not sure what exactly you want. You mention you want a remote REBOL shell instead of a tutoring setup, but that's what the Try REBOL site is. There are several reasons it's not open source:
It's in heavy development. I'm currently changing the code regularly.
So it's not in a release state. Preparing it for release, documenting and publishing it would take a lot of extra work, as with most projects.
It's written in my CMS that's also in heavy development. Even if the Try REBOL site were open source, it wouldn't run. The CMS is not planned to be open sourced soon.
It's not meant as a generic REBOL remoting tool, but as a one-off demo site. If that site is running, what's the use of more of them?
As others have answered, there are many generic solutions for remoting that you could use. Also, most parts of the Try REBOL site are readily available as open source:
Syllable Server, produced and published by us.
The Cheyenne web server.
The HTML source of the web client can be viewed, including my simple JavaScript command service bus.
Syllable Server is an essential part of the site, as the sandboxing is not done with REBOL facilities (except some extra limits in the R3 backend), but with standard Linux facilities.
A truly air tight (do I mean silica tight?) sandbox is close to impossible with R2.
R3 (still in alpha) is looking a lot more promising. The deep technical discussions in flight right now (see Cure code and AltME/REBOL3 Proposals regarding unwinds and protect and even occasionally mentioning sandboxes should lead to an excellent sandbox capability.
Right now, the big advance R3 has that makes Kaj's tryREBOL possible is R3's secure policy settings which make it possible (with some careful wrapper code) to construct an alpha/demo sandbox.
To answer your precise question("where can I find code...", you could try asking Kaj for his :)
I'm new to StackOverflow. I'm not sure if this is going to end up as a reply to your comment, or as a new answer.
The somewhat common idea that any project can be open sourced and contributed to by others is a naive view. In the case of my Try REBOL site, it makes no sense. It's not just in heavy development; it's written in a CMS that's also in heavy development. Basically noone could contribute to it at this point, because I'm the only one who knows my CMS. Or in any case its newest features, which I develop by developing Try REBOL, and other example sites. So developing Try REBOL means developing the CMS at the same time, and by definition, I'm the only one who can do that.
More generally, my projects are bleeding edge, innovative technology with a strong vision. The vision is mine, and to teach it to others, I have to build it to show how I intended it to work. So there's a catch 22: to enable others to contribute, I have to finish my projects first, because people typically don't understand them until I show them how they work.
There certainly are other projects where mass contribution makes more sense. Still, only the top projects get the contributors. We found that out the hard way. We created Syllable Desktop and Syllable Server with surrounding infrastructure for contributions. These are fairly classic, well understood operating systems that many people could work on in parallel. However, despite years of begging, we get very few contributions.
So, if you feel a burning need to contribute to our projects, please pick one of the many tasks in Syllable to execute. :-)

Which TextEditor is easiest to customize for a new scripting language?

It's been more than an year that i'm developing a new scripting language with its own grammar rules and constructs.
I'd like to give the users of this language some minimalistic ide to work with, but i don't want/have time to make one from scratch so i'd like to take one already existing (it has to run on Linux platforms natively, so no windows-only editors plz) and customize it.
Well, which one is the easiest to customize without changing the source code and recompiling it, maybe even with plugin support?
Thank you.
UPDATE
I don't need to know which editor is the best for you, i need to know which one is the easiest to customize AND, most of it, which one has the most complete documentation about new language customization.
Ex: SciTE is good, but its documentation about custom grammars is really poor.
Have you looked into Scintilla/SciTE? I think it gets used often for this sort of thing. It's very lightweight, but from what I understand, is easy to add functionality to. It's not really an IDE, but it's more of a text-editor component that you could use as the basis for a simple IDE. I've used SciTE, which is a sort of demo text editor of Scintilla's capabilities. It's simple, but also quite fast and responsive.
I suppose another option would be to write plugins for existing IDEs such as Eclipse or Netbeans. Both of these IDEs support many languages just through 3rd-party plugins. Going this route means you don't need to build a complete UI, just the components needed to make your language work.
The downside of building plugins for an extendable IDE (such as NetBeans or Eclipse) is that you are at the mercy of the IDE developers. If they change the way the platform works, you must ensure that your plugins still work with the new versions. Sometimes this can become a major problem.
All of these options should work on Linux as well as Windows.
This sounds like a very ambitious project and I wish you luck.
I don't use linux too often, I use a Mac and my favorite text editor is called TextMate because it has snippets, code completion, and a whole mess of other features. The closest thing to it that I've found on linux is called Scribes.
There's always Emacs or Vim (I lean towards Vim, but that's just my opinion :) ). Neither are IDEs per se, but both are very extensible and it shouldn't be too hard to create settings for each that will aid people writing scripts in your language.