Total Pageviews

Showing posts with label ide. Show all posts
Showing posts with label ide. Show all posts

Saturday, 20 April 2024

将 Atom 改造为一个简单的 C/C++ IDE

 如果你符合以下这些特点,这篇文章会很有用:

  • 单纯喜欢 Atom 的人
  • 单纯觉得 VS 难用的人
  • 有洁癖,不愿使用闭源软件的人
  • 讨厌微软的人
  • 喜欢折腾的人(其实折腾 Atom 也不是非常难)

当然,即使你不属于上面这几类人,也应该体验一下使用 Atom 的感觉,因为只有对比过后才能知道哪个更适合自己。

最近在学校修 cpp 课程,授课老师要求用 VS,然而我翻了一下教材,发现其实没有用 VS 的必要,所以准备把我一直在用的 Atom 改造为一个 cpp 的 IDE。

成品可以实现 C/C++ 程序的实时检查代码中的错误,可以一键编译,还可以和 VS 一样用图形化界面打断点、逐行运行来 Debug。

Atom 有如下几个有点,让它比 VS 高到不知道哪里去:

  • 开源,且跨平台,这意味着如果你是一个使用 Atom 的 Linuxer,在某些情况下被迫要用 Windows,你可以很简单地打包一份相同配置的 Windows 版 Atom,即插即用
  • 高度可定制化,每个人的 Atom 都可以完全不一样
  • 原生高度集成图形化的 Git
  • 基于 Electron,运用了大量 Web 技术,原生对前端编写的支持优秀
  • 极度模块化,真正的 Atom 只是一个用来实现插件功能的核心,没有任何功能,全部功能都是由插件提供的
  • 庞大的社区,数不胜数的插件,与上一条搭配意味着 Atom 的改造难度极低,这让 Atom 可以轻松充当多面手,不只前端,C 家族、Python 等众多语言的 IDE 也可胜任,同时它还是一个优秀的 Markdown 编辑器。
  • 自从某次更新后,Atom 的运行速度有了很大的改善。到现在,Atom 已经是一个轻快的编辑器了。

什么?你说 VS Code?那不就是微软给 Atom 披了个马甲吗?

准备原材料

即使不考虑 Atom,想要编译、Debug C/C++ 程序,首选也一定是 gcc、g++ 和 gdb,所以我们要做的就是把 Atom 和上面三个程序结合起来,结合的媒介就是 Atom 的插件。

安装 Atom

对于 Unix-Like 系统,一般发行版的仓库都会有 atom,就算没有,也可以去项目的 Releases 页下载对应版本,甚至可以直接下载打包好的压缩包,解压后运行主程序文件。

对于 Windows,你可以选择去项目的 Releases 页下载对应的 exe 安装包,但安装过程中你无法选择安装路径,所以我一般会下载 zip 包直接解压使用。

安装 gcc、g++ 和 gdb

对于 Unix-Like,不用多说,大家都会。

对于 Windows,这里要用到 MinGW,这是一个 Windows 下 GNU 家软件的安装器,使用起来非常方便。我们需要的是 mingw32-gcc-bin、mingw32-gcc-g++-bin 和 mingw32-gdb-bin 这三个软件包,其它依赖会自动下载。 MinGW 的食用方法网上一搜一大把,我就不在赘述了。 注意 MinGW 只提供 32 位版的软件包,如果你有什么特殊需求或者是强迫症必须要 64 位版本的软件,可以使用 Mingw-w64,道理都是一样的。

在安装过 gcc、g++、gdb 后,需要将 MinGW 安装目录下的 bin 文件夹(里面有一大堆可执行文件)添加到 Windows 的环境变量 PATH 中。环境变量的添加方法网上也有一大堆,不再重复。 添加到 PATH 后需要重启 Windows 以使做过的更改生效。

安装插件

下面的步骤都是所有平台通用的。

进入 Atom 的设置,进入插件查找安装选项卡,装上以下几个插件:

  • linter
  • linter-gcc2(原版 linter-gcc 停止开发了,这是另一位开发者接手后的版本)
  • gcc-make-run
  • dbg
  • dbg-gdb

确保以上插件全部安装成功后重启 Atom,会弹出一些窗口让你安装这些插件的依赖,全部安装即可。

设置插件

打开插件管理面板,这里能看到你安装过的所有插件。

首先是 linter-gcc2 插件 需要在它的设置中打开 Lint on-the-fly,这是实时查错功能。

之后是 gcc-make-run 需要在它的设置中的编译参数(Compiler Flags)里增加-g参数,以使 gdb 可以正常 debug 编译好的 binary 文件。

在这里,对于 Linux 用户还有一步额外的操作。在 Linux 下,gcc-make-run 默认调用的终端是 xterm。我相信很大一部分 Linuxer 们都没有装这个又老又丑的终端,即使装了也大概率是因为某些依赖问题,不会日常使用。所以我们需要修改默认调用的终端。 gcc-make-run 插件设置中的最后一项 Terminal Start Command (only Linux platform) 就是自定义终端调用命令,你可以查看你使用的终端的帮助或者问问“好男人” (man) 来自行设置调用命令。注意要用 bash 的 -c 参数来使程序执行完后终端保持打开状态。 举个例子,我用的是 xfce4-terminal:xfce4-terminal -T $title -x bash -c


以上就是改造的步骤,下面说一说如何使用。

快捷键

在这套配置中,默认下,F6 键是编译并运行,F5 键是打开 Debug 窗口,F9 键是对选中的行打断点。

如何 Debug?

首先,你要保证代码没有被 linter 查出错误,这是最基本的; 然后对着你想打断点的行的行数左侧点一下,出现的红色按钮就是断点标识,用 F9 键也是同样的效果; 之后,按下 F6 键,也就是编译出代码的可执行文件; 紧接着在左侧 Tree View 中右键点击编译好的二进制文件,选择 Debug this File; 最后点击右下角的 Debug 按钮,就能开始 Debug 了。

同时,dbg 插件还可以保存断点之类的调试信息,按钮就在 Debug 按钮的下方。

最后推荐几个 Atom 插件

minimap

可以说是 Atom 的必装插件之一,提供整个文件的缩略图预览。

autocomplete-clang

依赖于 autocomplete-plus(atom 自带),且系统中需要有 clang 软件包。 可以提供非常强大的自动补全功能。

autocomplete-paths

顾名思义,是一个自动补全 path 的插件,也依赖于 autocomplete-plus。

atom-beautify

只需按一下快捷键,自动规范格式化你的代码。 Beautify C 语言依赖于 Uncrustify,但安装配置起来很简单。

activate-power-mode

越写越爽

atom-miku

(引述原作者的话:)

  • 做工粗糙
  • 仅供娱乐
q; 大佬,请问在装了这些插件之后,应该怎么实现同时编译多个文件?

a; “同时编译多个文件”指的是什么?可能你需要的是cmake,atom有个配套的插件build-cmake你可以试一试。 另外还有Atom IDE可以提供类似IDE的功能。 

from https://www.eaimty.com/2019/atom-c-ide/

Saturday, 17 June 2023

IDE开发环境 eclipse

 eclipse最初是由IBM公司开发的替代商业软件Visual Age for Java的下一代IDE开发环境,2001年11月贡献给开源社区,现在它由非营利软件供应商联盟Eclipse基金会(Eclipse Foundation)管理。Eclipse是著名的跨平台的自由集成开发环境(IDE)。最初主要用来Java语言开发,但是目前亦有人通过插件使其作为其他计算机语言的开发工具。众多插件的支持使得Eclipse拥有其他功能相对固定的IDE软件很难具有的灵活性。许多软件开发商以Eclipse为框架开发自己的IDE。

官方网站: http://www.eclipse.org/

https://www.eclipse.org/downloads/packages/

https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2023-06/R/eclipse-inst-jre-win64.exe

Sunday, 21 May 2023

IDE编辑器Light Table



Light Table是一款IDE编辑器,基于 clojure 和 css 开发,是由前Microsoft Visual Studio 部门项目经理 Chris Granger主导的项目。支持多种语言,如Python、Clojure、JavaScript等.

特色:

支持插件,比如BOT插件架构,以及插件管理器。开发时可以重新定义或者开发一些功能。

内联文档和文档搜索:可以基于鼠标的移动(取词)来搜索和获取文档,并且在窗口右边会出现相关联的文档。

编辑自动完成、paredit特性以及后端允许远程nrepl会话(连接到服务器并且观看实时变化)。

代码高亮显示。

[repo owner=”LightTable” name=”LightTable”]

Friday, 19 May 2023

把Atom打造为IDE开发环境


Atom IDE是Github与Facebook合作推出的 Atom 可选工具包, 安装工具包后,可通过使用语言服务器的强大功能为代码和项目提供深度的语法分析。 目前支持 C#, Flow, Java, JavaScript, PHP, 和 TypeScript 语言的软件包,使 Atom-IDE 成为一个强大的跨平台开源IDE。

使用方法: 安装至少两个软件包 —— Atom IDE 的用户界面和语言支持包.
    启动 Atom 的安装软件包对话框(设置视图:Install Packages and Themes)
    搜索并安装 atom-ide-ui(https://atom.io/packages/atom-ide-ui) 软件包以引入 IDE 用户界面
    安装需要的 IDE 语言支持包,目前支持的语言包下载:
    TypeScript & JavaScript: ide-typescript(https://github.com/atom/ide-typescript/)
    Flow: ide-flowtype(https://github.com/flowtype/ide-flowtype)
    C#: ide-csharp(https://github.com/atom/ide-csharp/)
    Java: ide-java (需要Java 8 环境),https://github.com/atom/ide-java/
    PHP: ide-php (需要PHP 7 环境 ),https://github.com/atom/ide-php/

https://github.blog/2022-06-08-sunsetting-atom/

Thursday, 18 May 2023

Hydrogen is an interactive coding environment/ide

Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor. hydrogen animated logo

CI

Hydrogen is an interactive coding environment that supports Python, R, JavaScript and other Jupyter kernels.

Checkout Medium blog post to see what you can do with Hydrogen.

Atom Sunset Notice

Atom is sunsetted. It is not possible to publish new packages anymore. If you have Atom working offline locally, it should continue to work, but the servers are down.

You can export ipynb from Hydrogen using this method and migrate to the following alternatives:

Contents

  1. Background
  2. Features
  3. Plugins for Hydrogen
  4. Useful external packages
  5. How it works
  6. Why "Hydrogen"?
  7. Contributing
  8. Changelog
  9. License

Background

Hydrogen was inspired by Bret Victor's ideas about the power of instantaneous feedback and the design of Light Table. Running code inline and in real time is a more natural way to develop. By bringing the interactive style of Light Table to the rock-solid usability of Atom, Hydrogen makes it easy to write code the way you want to.

You also may be interested in our latest project – nteract – a desktop application that wraps up the best of the web based Jupyter notebook.

Features

  • execute a line, selection, or block at a time
  • rich media support for plots, images, and video
  • watch expressions let you keep track of variables and re-run snippets after every change
  • completions from the running kernel, just like autocomplete in the Chrome dev tools
  • code can be inspected to show useful information provided by the running kernel
  • one kernel per language (so you can run snippets from several files, all in the same namespace)
  • interrupt or restart the kernel if anything goes wrong
  • use a custom kernel connection (for example to run code inside Docker), read more in the "Custom kernel connection (inside Docker)" section.

Plugins for Hydrogen

Hydrogen has support for plugins. Feel free to add your own to the list:

Useful external packages

Here is a list of external packages that could be useful when using Hydrogen (without using Hydrogen plugin API, as such they're mostly only related to the UIs):

If you find/create a package that you think can be useful when used in combination with Hydrogen, feel free to make a PR and add it.

How it works

Hydrogen implements the messaging protocol for Jupyter. Jupyter (formerly IPython) uses ZeroMQ to connect a client (like Hydrogen) to a running kernel (like IJulia or iTorch). The client sends code to be executed to the kernel, which runs it and sends back results.

Why "Hydrogen"?

Hydrogen atoms make up 90% of Jupiter by volume.

Plus, it was easy to make a logo.

from https://github.com/nteract/hydrogen 

-----------------------------------------------

Atom is sunsetted. It is not possible to publish new packages anymore. If you have Atom working offline locally, it should continue to work, but the servers are down.

You can export ipynb from Hydrogen using this method and migrate to the following alternatives:

You can directly download the code from here, copy it to ~/.atom/packages/hydrogen and run apm install at the root
https://github.com/nteract/hydrogen/archive/refs/tags/v2.16.5.zip

from https://github.com/nteract/hydrogen/releases

---------------------------------------------------------

Installation

Hydrogen requires Atom 1.20.0+ and kernels for the languages you intend to use Hydrogen with.

To install Hydrogen run apm install hydrogen or search for Hydrogen in the Install pane of the Atom settings.

If you are using Linux 32-bit follow the installation instructions here.

NOTE:

apm seems to have a bit of issue in the latest version 1.23.0-beta1. If you get an error that starts with:

fs.js:640
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory

we recommend you to install Hydrogen via console command: apm install hydrogen.

Kernels

Checkout nteract.io/kernels for instructions on how to install the most popular kernels.

Tested and works with:

But it should work with any kernel. If you are using Hydrogen with another kernel please add it to this list or post an issue if anything is broken!

Note that if you install a new kernel, you'll need to run Hydrogen: Update Kernels for Hydrogen to find it. For performance reasons, Hydrogen only looks for available kernels when it first starts.

Troubleshooting

We have a troubleshooting guide! It's pretty sparse at the moment, so please share with us the resolution to any rough spots that you find.

from https://github.com/nteract/hydrogen/blob/master/docs/Installation.md#installation 

--------------------------------------------------------------------------------------------------

Hydrogen: Interactive computing in Atom

Hydrogen is an open source package for GitHub’s Atom text editor that allows users to run their code with an interactive REPL session with your language of choice.

Hydrogen executing code in Atom

What does interactive coding mean?

Hydrogen lets you choose which code to execute based on your needs. Run the whole file, a single line, a selection, or let Hydrogen decide which code to run based on the current cursor position.

Furthermore, you can structure your code with cells like you would in a Jupyter Notebook.

The interactivity doesn’t stop there. We support various rich media types so your output will be rendered in the most beautiful way possible. Hydrogen can render images, SVGs, HTML, Markdown and even LaTeX.

Code completion and a inspector for displaying metadata, like documentation, are there to make your coding experience seamless. There’s no need to leave your favorite text editor to get the information you need to fuel your development process. Watch expressions are also included and provide instant feedback on your written code every time you hit execute.

And last, but definitely not least, we have the ability to execute code in a variety of languages such as Python, R, Julia, JavaScript and a lot more. You can even connect to remote kernels running inside Docker containers or on a remote server.

We want you!

Hydrogen is part of the nteract organization and we want your involvement. How can you become involved with the project?

  • Star the project on GitHub and share it with your social networks.
  • Download, use our releases, and be sure to report bugs!
  • Submit a pull request with a new feature or bug fix.
  • Present a talk on Hydrogen at a local Meetup or conference.

from https://blog.nteract.io/hydrogen-interactive-computing-in-atom-89d291bcc4dd

 

 

 

 

 

 

Saturday, 17 October 2020

free-programming-books


https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-zh.md


https://github.com/EbookFoundation/free-programming-books

--------------------

https://ebookfoundation.github.io/free-programming-books/free-programming-books.html

https://ebookfoundation.github.io/free-programming-books/free-programming-interactive-tutorials-en.html

https://ebookfoundation.github.io/free-programming-books/free-podcasts-screencasts-en.html

----------------

Free Learning Resources In Chinese

stormzhang.github.io/

Free Learning Resources In Chinese

Intro

此项目基于free-programming-books,但原项目中的中文学习资源比较少,遂诞生了此项目,旨在完善更多的中文编程学习资源,欢迎star或fork。

Thanks to manageyp

###目录

###在线教育

###软件开发方法

###HTML / CSS

###版本控制

###Android

英文
中文(适合新手,涵盖Android基础和Java基础知识)
网站及开源
  • Android Views 专注Android UI
  • 23code 国内的一家专注Android开源代码分享的网站,同时有相应的App
  • android-open-project 汇集了多达150个最火的Android开源项目,尽情的享受开源带来的乐趣吧!

iOS

Ruby

Python

Assets/python 文件夹内收集了几本经典pdf电子书,适合放在手机里反复阅读

###Javascript

###LaTeX

LISP

Haskell

Scala

Shell

Database

前端技能汇总

Git

from https://github.com/stormzhang/free-programming-books

 

 



Sunday, 3 November 2019

Awesome Online IDE list

A list of awesome online development environments

 Awesome

A curated list of awesome online implementations of Integrated Development Environments (IDE)
An (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. This typically includes a text editor, syntax highlighting, file explorer, debugger, version control, and build/run/deploy options. Another defining feature of an IDE is some form of intelligent code completion, sometimes called intellisense.
An "Online IDE" has the features mentioned above but runs in a web browser instead of installing as a native application. An "Online IDE" can be made accessible in offline mode without an internet connection and still satisfy the above conditions.

Contents

Legend

Icon Meaning
Open source or source code available
Docker image or other self-hosted option available
Sign-up required before usage

Full IDE

  • AWS Cloud9 - Run any language on a full VM complete with a terminal built on Ace Editor .
  • CodeEnvy - Run any language on a full VM complete with Eclipse Che .
  • StackBlitz - Run JavaScript with starting templates for Angular, React, or Ionic with full intellisense + instant error checking.
  • CodeSandbox - Run JavaScript with starting templates for React, Vue, Angular, Preact and more with full intellisense, lint error checking and live collaborative editing.
  • Snack Expo - Run JavaScript with React Native in the browser and on your mobile iOS or Android.
  • Codeanywhere - Run many languages in a container with pre-built environment and a terminal.
  • WebAssembly Studio - Run C, Rust, Wat, or AssemblyScript code as WebAssembly in the browser.
  • Remix - Run Solidity with a compiler, debugger, Static Analyzer for security, and direct access to Ethereum main network and testing networks.
  • Nativescript Playground - Run NativeScript with Angular, JavaScript, TypeScript, or Vue.js on your mobile iOS or Android device by scanning a QR code.
  • Wide - Run Go with full intellisense code-completion, expression-info, and jump to declaration.
  • Glitch - Run full Node.js projects with support for automating hosting, version control, CDN for assets, secure storage of secrets, real-time collaboration, full console access, GitHub import/export, server-side debugger, instant deployments, and more.
  • Theia - Run any language on a full VM complete with a terminal built on Monaco Editor .
  • Datalore - Run Python notebooks for data analysis and visualization, with real-time collaboration, incremental calculation, and integrated version control.
  • MATLAB Online - Run MATLAB code, visualize results, share scripts and collaborate on mathematical computing software.
  • Colaboratory - Run Python in a Jupyter notebook with ML libraries and free GPUs for running experiments.
  • Coder - Run most languages on a full Linux VM complete with a terminal, go-to-definition, linting, live collaboration, and auto-scaling.
  • Gitpod - Run any language on a full Linux VM complete with terminals, GitHub and Git integration, content assist, go-to-definition, linting, live collaboration, custom Docker workspaces, and integrated code review support.
  • Browxy - Run Java, C, C++, C#, Python, or PHP with some syntax highlighting, input arguments, and publish to a public URL.
  • Superblocks Lab - Run Solidity with a built-in browser Ethereum blockchain VM, Metamask integration (deployments to Testnet/Mainnet), transaction logger and live code your WebApp, powered by Monaco Editor.
  • Codiad - Run most of languages on a self-hosted, resource-constrained server with plugins and shell execution.
  • Appitr - Run JavaScript ES6 with React Native in the browser built on Monaco Editor and React Native Web.
  • DrRacket - Run Racket with support for macro debugging.

Snippets

  • Glot - Run snippets from over 30 languages as docker containers including C#, Kotlin, Julia, Go, and Ruby.
  • Codiva - Run C, C++, Java snippets with background compilation and some intellisense code-completion.
  • Try It Online - Run snippets from over 300 languages including esoteric code-golf languages.
  • JDoodle - Run snippets from over 100 languages including Haskell, Prolog, MySQL, and MongoDB.
  • Judge0 - Run snippets from over 40 languages including Erlang, Elixir, OCaml and Octave.
  • Ideone - Run snippets from over 60 languages including AWK, Swift, and SQLite.
  • The Online Compiler - Run snippets from over 10 languages including C++, Java, Python, C# code with some intellisense code-completion.
  • CPP Shell - Run C++ snippets with input flags for warning level and optimization level.
  • Repl.it - Run snippets from over 50 languages including Clojure, Scheme, Enzyme, and Jest.
  • RunKit - Run Node.js snippets + visualizations but requires a sign-in.
  • OnlineGDB - Run snippets of C, C++, Java, Python, PHP, HTML with some intellisense code-completion.
  • SQLFiddle - Run snippets of MySQL, MSSQL, PostgreSQL, SQLite, and Oracle.
  • Go Playground - Run snippets for Go programming language.
  • Rust Playground - Run snippets of Rust programming language.
  • TypeScript Playground - Run snippets of TypeScript with tsconfig options and full intellisense.
  • Python Tutor - Run snippets of Python, JavaScript, TypeScript, Java, Ruby, C, and C++ code and see detailed step-by-step visualizations of run-time state.
  • Codeboard.io - Run snippets in C, C++, Eiffel, Haskell, Java, Python, and use tests for automatic grading of code written by students.
  • kotlin-web-demo - Run Kotlin snippets with auto-completion, type checking and automatically translate Java to Kotlin code.
  • 3v4l PHP Playground - Run PHP snippets on 200+ versions simultaneously with VLD opcodes and performance comparison.
  • PasteRack - Run Racket snippets with support for sample and recent snippets.
  • myCompiler.io - Run snippets from over 12 languages including C, C++, Java, Python, Ruby, Nodejs and more with auto code-completion, syntax highlighting, collaboration features like forking, commenting and sharing of code snippets.

Web Snippets

  • CodePen - Run snippets in HTML/CSS/JS, popular with designers.
  • JS Bin - Run snippets in HTML/CSS/JS/TS, provides Codecasting.
  • JSFiddle - Run snippets in HTML/CSS/JS and collaborate in real-time.
  • Flems - Run snippets in HTML/CSS/JS without a connection to the server (after page load).
  • Plunker - Run snippets in HTML/CSS/JS/TS and collaborate by forking, commenting, and participating in the forums.
  • Popcode - Run snippets in HTML/CSS/JS for use in the classroom, with student-friendly error messages and offline editing.
  • Webpaw - Run snippets in HTML/CSS/JS with realtime collaboration, import sources and development utilities.
from  https://github.com/styfle/awesome-online-ide

在线测试网站:http://runnable.com/