Checkout windows style line breaks - libgit2sharp

Does libgit2sharp support checking out windows style line breaks when the repo has unix style line breaks?
I can't seem to find that documented anywhere.

Does libgit2sharp support checking out windows style line breaks when the repo has unix style line breaks?
Yes. LibGit2Sharp will glady honor core.crlf configuration settings and .gitattributes files on Windows.
There are still some cases (core.crlf = true on *nix platforms, handling of safe.crlf) that aren't supported yet, but should be tackled shortly (cf. #961, libgit2/#3199 and libgit2/#2798)

Related

Jenkins Change Assembly Info Plugin not working on Linux Host and Windows Slave

I have a configuration using a Linux Jenkins master and a Windows 10 slave. I'm using it to do an msbuild operation on the slave and generate an install executable as an artifact. I have this working on a Jenkins Windows 10 master system (same one I'm using as a slave), and this all works fine. However, when I run the same job remotely I get the dreaded "CS1031" error:
Properties\AssemblyInfo.cs(1,1): error CS1031: Type expected [C:\slave2Workspace\workspace\SDB Projects\CCMonitor\CCMonitor\CCMonitor\CCMonitor.csproj]
This is pointing at the first character in the file. If I omit the job step with the Change Assembly Info plugin, everything works fine and I get the output correct. What I found was that the AssemblyInfo.cs file was missing the characters 0xEB 0xBB at the front of the file -- these somehow got dropped in the translation. Sounds like a character set issue, but it is only an issue with this plugin step.
Is there something that needs to be configured differently?
thanks!!
So I had this same issue today and found the solution. Not sure if you ever figured this one out, so I wanted to drop the solution just in case.
Turned out to be an encoding issue. The assembly file is encoded UTF-8 with signature. As a workaround to avoid the characters being added to the beginning of the file, change the encoding to UTF-8 without signature.
I did this by opening the files in notepad++ and then selecting Encoding -> Encode in UTF-8
If you are working with Visual Studio (2017 in my case)
Open the file with the problem
Select File | Save As
On the Save button there is drop down with option stating Save with Encoding
In the list with encodings select UTF-8 without signature
VS may tell you that there is already such file, you select to overwrite it.
Commit>Push with your source control (git in my case), and voila - that's it.

What Windows tools/editors are available for editing CWEB documents?

I occasionally come across source code written in the CWEB standard that Donald Knuth promotes. Are there any Windows tools and/or editors that can facilitate working with source code in that format? At a minimum, syntax highlighting must be supported.
I am looking for options other than various Windows port of Vim.
The obvious answer to my own question: Windows ports of Vim.
At a minimum, syntax highlighting must be supported
The Zeus editor can be easily configured for alomst any programming language.

Suggest a text editor or IDE for chapel programming language

I want to write some short numerical programs in chapel. Can somebody just tell an IDE, or text editor which supports code highlighting for chapel (chapel-aware), is there an elisp-file for emacs? I don't prefer vim, even if a script for vim exists.
I tried searching, but I couldn't find anything. I neither know emacs-lisp nor am completely aware of chapel's syntax to configure it to make this chapel-aware.
the elisp files and .vimrc files ship along with chapel tar.gz file , so after extracting the tar.gz file in a folder chapel-version/highlight/vim or chapel-version/highlight/emacs there the vimrc or elisp files are present and in the README , instructions are also given how to add to init files ~/.emacs or ~/.vim.
I have just come across a plugin for the Atom Editor that does Chapel Highlighting
There is an Emacs mode for Chapel at MELPA. So if you are using an Emacs with package management you can just install chapel-mode.
https://melpa.org/#/chapel-mode

Cross-platform editing for LaTeX documents?

What solutions are there for working on a LaTeX document on both Windows and Linux?
It's a large document, and I will be working daily on both platforms so compatibility is essential if it's two different pieces of software.
Bonus points for a solution that includes easy previewing.
Writing text is not very different from writing software. Similar management techniques apply when scaling up.
Modularity: Split the document to smaller pieces e.g. a separate .tex file for each chapter. I also like to keep the preamble and other LaTeX set-up separate from the body text. My chapter files themselves just have the body text with some markup but do not define any new commands.
Source control: Keep all the source files in a version control tool such as subversion. Transfer files between systems using the tool.
Builds: Have a Makefile or similar to control the build process: it should be consistent and repeatable. Build regularly and fix build problems as soon as possible. If you want easy previews, you can set up a Makefile rule to launch e.g. a PDF viewer after the target PDF has been compiled.
Editing: Use whatever you're compatible with. It does not matter that much, though some good advice has been given by other answerers.
Communication: If there's more than one person working on the same stuff, no tool is a substitute for interpersonal communication.
TeXworks is a new cross-platform TeX editor with a built-in PDF preview that has source-output synchronisation. Click in the source to go to the matching part in the output, and vice versa. It's not the most feature-rich editor, by design, but the simplicity/power trade-off is just right, in my opinion.
I've used Emacs and its AucTeX mode, which is great for editing, as it has a set of very consistent shortcuts to insert many common commands and environments. There are also preview modes that display maths graphically in the Emacs window but I haven't used them.
As with VIM, there's a learning curve of course.
Unlike Legoolas, I'd advise for direct-to-PDF compilation using pdfTeX, but maybe Windows/Linux doesn't have a PDF viewer that automatically reloads the file? I'd be surprised if so (I use Skim on Mac). Check if your viewer supports synctex, as it's quite handy to navigate from PDF to source and back, without the cons of pdfsync.
To compile, my tool of choice is latexmk which is included in TeXlive. It completely automates the build, and can watch the .tex source to rebuild automatically.
Try LyX – The Document Processor, a "What You See Is What You Mean" editor for LaTeX.
Eclipse with its TeXlipse plugin should solve the IDE problem. More important are, however, issues like using only fonts that are available or installable on both platforms.
For previewing I am using Emacs with its Preview Latex feature in the AucTeX package.
For windows, you can use the TeXnicCenter, that is one of the best IDE for windows.
For Linux, you can use simply use Kile (it is possible to use kile with KDE on CygWin, but it is not the perfect solution).
There is no problem to switch from one IDE to another one (since you just save the .tex file and nothing else)
It also exists some cross-platform IDE, but I do not know them:
TeXmaker
TeXmakerX: a fork from TeXmaker
Since you'll probably not want to change text editor from whatever you usually use just for editing LaTeX docs (unless you use an editor which can't do syntax highlighting for LaTeX as well as whatever else you code/write in it), I'd recommend the simple following set of tools:
Whatever text editor you are used to, as long as it can highlight LaTeX markup. If it can't, then find a better editor for using with everything you do!.
Install MikTeX or TeXLive and just use the DVI viewer which comes with them by double-clicking on your DVI file. This will automatically update whenever the dvi file is changed by your editing of the latex file and re-creating the output.
I use Emacs as my text editor of choice, on both Linux and Windows. Setting up some scripts or makefiles to build the latex document when I hit a key is pretty easy, and fits in with everything else I use Emacs for nicely.
Other cross-platform options (many of which have already been mentioned by others in this thread):
LyX
TeXlispse for Eclipse
I've used VIM, combined with the VIM-LaTeX plugin, with great success. It does have a bit of a learning curve though.
Gummi is the best LaTeX editor. It is a free, open source, program written in python, featuring a live preview pane.
http://gummi.midnightcoding.org/
e4 http://gummi.midnightcoding.org/wp-content/uploads/20091012-1large(1).png
Get your work in some kind of version control system, then when you move from computer to computer you just update from a central server and its just like you left it.
It doesn't matter about the IDE, as you are saving just the .tex file, as noted above. If you want to use the same editor though, for the sake of coherency, use texmaker.
I use version control, and just use MikTex/WinEDT on Windows and TexShop on the mac.
IF your document doesn't compile on both, you're probably forgetting to keep the two directories synchronized or use funky commands, I like the sanity checks of knowing that it "compiles" cleanly on two platforms.
I use some text editor, and then I have a cron job that does a compile hourly from my source control.
Tex files are just text. I would recommend using a version control system (you should be using that anyway) to keep the source in sync. You can then use any (or different) editors on each system, e.g. Kile for linux and winEdt for windows. Both com with nice viewrs.
For a simple solution for the source control that just works with minimum knowledge and hassle, consider dropbox.
Revisiting my own question after quite a few years, I thought I'd add
https://www.writelatex.com/
not strictly what I had in mind, but have used it for collaborative writing
An excellent multiplatform LaTeX IDE is Texmaker.
For Debian or Ubuntu, I made a tutorial easy to follow: Install LaTeX on Ubuntu or Debian. This tutorial explains how to install LaTeX on Debian or Ubuntu and how to create your first PDF.

Why is the executable produced by Delphi 2009 IDE different to that produced on the command line?

I'm producing builds using MSBuild, and build configurations set up in the dproj on the command line. It's slightly disconcerting that the size of the executables thus produced are different (not by much, but still!) to what an IDE build produces. Any ideas why? I would have thought the same compiler is used?
The main power of building from the Delphi command-line compiler is standardization - you explicitly identify the options (on the command line, in the .cfg files, etc), and the compiler follows the options provided exclusively. In contrast, the IDE has many other behaviors that are not clear and explicit - for example, it may search library paths not specified in the Project Options. My guess is that something's happening in the IDE build of which you're not entirely aware - and this is why standardized builds are done from the command line.
To see what IDE is doind, check
Tools | Options | Environment Options | Compiling and Running | Show Command Line
And you can check the compiler messages.
The first answer on using the command line for build consistency is right on and it is probably something you needn't worry about if you are relying on a build system where production files are always sourced from the console builds.
On the other hand, if you really do want to figure out what is going on you should turn on map files (at the full detail level) and compare/diff them. If there are differences between the two they will show up there. Any other differences that may exist are likely a result of a commmand line option being different (such as a conditional flag that may be set in the IDE settings).
This behavior has existed in every version of Delphi I've used. (5 - 2006). I wouldn't worry to much about it. When I first discovered it I spent a lot of time trying to resolve the difference. Did I miss a compiler flag? Is there a discrepancy between the IDE and the command line compiler's supported options?
In the end I decided it wasn't that big of an issue. Both consistently produced functionally equivalent executables.
If you supply exactly the same params to the command line compiler the produced executables will virtually be identical.
In fact the IDE just calls the commandline compiler. Compile your project in the IDE and look at the messages window. you will see the full dcc32.exe call ...

Resources