Tumgik
#win16
vadapega · 1 year
Text
Tumblr media
I followed along to Bob Ross after someone started screensharing it. Win 16 palette and spray tool only, Windows XP MSPaint.
25 notes · View notes
justcookingpixels · 14 days
Text
Tumblr media
map 002 (icy regions)
2 notes · View notes
asistecno · 1 month
Text
Hay quien opina que C ya no es un lenguaje de programación (otros se conforman con decir que no es un lenguaje de bajo nivel)
Tumblr media
¿Y si C ha trascendido su función original para convertirse en la 'lingua franca' entre lenguajes?
Aria Beingessner fue en su momento integrante de los equipos responsables de implementar los lenguajes Rust y Swift, de modo que su opinión sobre el desarrollo de software no es una que podamos descartar sin más miramientos, ni siquiera cuando sostiene en su blog una teoría tan controvertida como la de que "el lenguaje C ya no es un lenguaje de programación".
En primer lugar, acusa a C de fragmentación ("C está en realidad horriblemente mal definido debido a sus mil millones de implementaciones") y de tener "una jerarquía de enteros totalmente fallida"; esto último se refiere a que, según el modelo de datos usado —LP32 para Win16, ILP32 para Win32 y Unix 32 bits, LLP64 para Win64 o LP64 para Unix 64 bits— el valor de enteros varía, pudiendo traducirse en datos 'int' de 16 o 32 bits, datos 'long' de 32 o 64 bits, equivalencias entre int y long o entre long y pointer, etc).
Sin embargo, para Beingessner ambos detalles son meramente accesorios: no es en eso donde reside su principal preocupación…
Una 'lingua franca' que limita a las nativas
"Mi problema es que, como C ha sido elevado a una posición de prestigio, su reinado ha resultado ser tan absoluto y eterno que ha terminado distorsionando por completo la forma en que nos hablamos entre nosotros. Rust y Swift no pueden limitarse a usar sus lenguajes, nativos y cómodas… sino que deben envolverse en un grotesco disfraz de la piel de C y hacer que su carne ondule de la misma manera que éste lo hace".
A lo que Beingessner se refiere aquí, en su florido lenguaje, es al hecho de que C no es un mero lenguaje de programación porque se ha convertido en algo más que eso: en un "protocolo", uno que "todo lenguaje de programación de propósito general necesita hablar".
Es decir, cualquier lenguaje que desee acceder a la entrada de datos del usuario, escribir en la salida del sistema, manipular ficheros, etc… necesita interactuar con la interfaz de su sistema operativo. Y para ello, dado que la mayoría de sistemas operativos está desarrollado en C, cada lenguaje se ve forzado a llamar a las API de C a través de las interfaces de funciones foráneas.
En definitiva, que incluso si nunca jamás en nuestra vida llegamos a escribir código C, un desarrollador deberá manejar variables C, hacer coincidir estructuras y diseños de datos con los de C, etc. Y no sólo al comunicar el software con el sistema operativo: también al intentar comunicar dos programas entre sí.
"C es la 'lingua franca' de la programación".
En realidad, este papel de C visto como 'API' del resto de lenguajes de programación está muy relacionado con declaraciones recientes de Bjarne Stroustrup (creador de C++) sobre cómo los 'lenguajes de programación seguros' que buscan sustituir a C/C++... en realidad siguen dependiendo de ellos.
Y aunque fuera un lenguaje de programación, no sería de bajo nivel
Además, si somos precisos, aunque no coincidamos con la opinión de Beingessner, tampoco podemos considerar a C un lenguaje de programación de bajo nivel, que es como se le ha categorizado toda la vida.
Un lenguaje de bajo nivel es aquel que está 'cerca del hardware', en el que sus instrucciones vienen condicionadas por la estructura física de los computadores que lo ejecutan. Pero C se desarrolló en los años 70 con la mente puesta en las gigantescas computadoras PDP-11, no en nuestros pequeños equipos Intel o ARM.
Tal y como recoge este paper de 2018 publicado por la Association for Computing Machinery (titulado, precisamente, "C no es un lenguaje de programación de bajo nivel"),
"La causa originaria de las vulnerabilidades Spectre y Meltdown radica en que los arquitectos de procesadores no estaban tratando de construir procesadores rápidos, sino procesadores rápidos que exponen la misma máquina abstracta que un PDP-11. Esto es esencial porque permite a los programadores de C seguir creyendo que su lenguaje está cerca del hardware subyacente".
"[…] Tal vez sea hora de dejar de intentar que el código C se ejecute rápido, y en su lugar pensar en cómo se podrían ser los modelos de programación de un procesador diseñado para ser rápido".
1 note · View note
hackernewsrobot · 1 year
Text
Win16 Retro Development
https://www.os2museum.com/wp/win16-retro-development/ Comments
0 notes
terrilicious · 2 years
Text
Simcity 2000 download for mac
Tumblr media
#Simcity 2000 download for mac for mac
#Simcity 2000 download for mac install
#Simcity 2000 download for mac Patch
#Simcity 2000 download for mac full
#Simcity 2000 download for mac windows 10
↑ 2.0 2.1 File/folder structure within the installation folder reflects the path(s) listed for DOS and/or PC booter game data.
↑ 1.0 1.1 When running this game without elevated privileges ( Run as administrator option), write operations against a location below %PROGRAMFILES%, %PROGRAMDATA%, or %WINDIR% might be redirected to %LOCALAPPDATA%VirtualStore on Windows Vista and later (more details).
Windows 3.x version might be playable on a 64-bit OS using winevdm. Other information API Technical specsĬlassic Gaming With DOSbox And Simcity 2000 On Windows 7.
#Simcity 2000 download for mac windows 10
Change this to fullresolution=desktopīlack scrollbar padding (Windows 10) On Windows 10 the right-hand scrollbar may have a margin of black pixels at some resolutions.
Locate the line fullresolution=original.
Open the file nf in a basic text editor like Notepad.
Locate the DOSBox subdirectory, located at SimCity 2000 SEGameGameDOSBox.
#Simcity 2000 download for mac install
Go to your game install directory, for example C:Program Files (x86)Origin GamesSimCity 2000 SE.This can be fixed by altering a DOSBox configuration file. Type config cpu cycles auto limit 65000Ĭorrecting aspect ratio (DOSBox) Running the game on contemporary 16:9 or 16:10 monitors can result in a distorted picture.Use patched executable Īpply the SimCity 2000 compatibility patch.Ĭhanging the game speed from pause crashes the game Game runs too fast (DOSBox) Fast computers may cause disasters in Cheetah speed to run rampant before you can react. Saving or loading crashes the game Saving and loading cause crashes on Windows 7 and later without this fix. This will not fix the problem on Windows 8, 8.1 and 10 since they are locked in 32-bit depth, and 256-color mode is simply emulated without actually being used. Set the game to run in 256 Colors compatibility mode. When asked for the SC2K folder, insert the CD and navigate to WIN95/SK2K on the CD.Run Sk2kInstall.exe and follow the steps.This installer includes the compatibility patch. Apply the SimCity 2000 compatibility patch.If you want CD videos to be available go to HKEY_CURRENT_USERSoftwareMaxisSimCity 2000Paths and change the Goodies key to the drive letter you are using the CD in.Run install32.exe and follow the steps.Extract the new installer into the WIN95 folder.Download the InstallShield 3 32-bit Generic Installer.Copy the contents of WIN95 folder somewhere temporarily.Install with a modified 32-bit installer Issues fixed Installing on 64-bit versions of Windows The original disc release uses a 16-bit installer. Uses native pointer - mouse settings are adjusted in your Windows/DOS mouse driver. Use Alt+ ↵ Enter or set in Graphic Mode Setup (GOG.com).įor DOSBox use the DOSBox Mapper (see the glossary page for other workarounds). Game window has a maximum width of 4096 pixels. Graphics settings (GOG.com version) Graphics feature The original Windows version can save cities anywhere ( Cities folder is the default). game speed) are stored in the city file itself. Game data Configuration file(s) location System Skip intro videos These steps are for the DOS version for the Windows version simply run the game without the CD in the drive.
#Simcity 2000 download for mac Patch
Essential improvements Patches Patch 1.1 (DOS) and 1.2 can be found here. Includes DOS, Win16, and Win32 versions, though the Win32 version unfortunately has a 16-bit installer. ĭOS Special Edition pre-packaged with DOSBox.ĭemo #1#2 Version differences The Special Edition (or CD Collection) is a complete edition containing the base game, Urban Renewal Kit, Scenarios Volume 1: Great Disasters, and additional cities and scenarios not available separately. SimCity Wiki Simtropolis - A fan site for the series GOG.com Community Discussions for game series GOG.com Support Page Availability SourceĭOS Special Edition pre-packaged with DOSBox.
#Simcity 2000 download for mac for mac
General information Download folx for mac crack windows 7. Incorrect aspect ratio for DOSBox version can be corrected with configuration file tweak. The GOG.com and Origin releases are the DOS version in DOSBox so have a fixed resolution and many limitations.
#Simcity 2000 download for mac full
Original Windows versions run windowed and can be resized/maximised to make full use of any modern resolution. Key points Original Windows versions work well on modern systems (see Installing on 64-bit versions of Windows).
Tumblr media
0 notes
blogquest998 · 2 years
Text
Internet Explorer 5.5
Internet Explorer is the world's most popular Web browser.
Fast and fluid Built to take advantage of the full power of Windows 8 and Windows RT, Internet Explorer 10 starts and loads sites almost instantly. It brings a fluid responsiveness to the web that feels totally new. Everything you want to do on the web is a swipe, tap, or click away. Perfect for touch Truly full-screen browsing: Navigation controls appear only when you need them and quietly get out of the way when you don't. Internet Explorer 10 lets you flip ahead or back through your websites with the flick of a finger. Tiles and tabs for frequently visited sites are oversized for easy tapping. Easy Smooth, intuitive controls work just as you'd expect. One Box is both address and search bar for speedier navigation. Pin your favorite sites to your Start screen and get to them as quickly as you access your apps. Safer and more private Help keep your PC and your information safer on the web with the industry-leading SmartScreen technology that helps protect against socially-engineered malware. Privacy tools like Do Not Track are built-in and can be turned on in one click. This version of Internet Explorer runs on both the 32-bit and 64-bit version of Windows 7, Windows 8, Windows Server 2008.
Internet Explorer User Agent Strings Internet Explorer Click on any string to get more details Internet Explorer 5.5. Mozilla/4.0 (compatible;MSIE 5.5; Windows 98). Tried on the IE 8, 10 & 11 with no add ons and in the compatibility mode and it will not work. Compatibility mode implies IE7 in Quirks mode which would be 'higher' than IE5. It's probably the Mozilla/5.0 string which comes in the Default User-Agent for IE9 and higher which is the problem. So both Compatibility mode and IE8 should.
- 30% faster for real world Web sites - Leading JavaScript performance - Fast, world-ready Web applications - Faster development with 25 new and improved modern Web standards - Few examples of how the Web is better for developers > Debug faster with new F12 developer tools > Hardware-accelerated 3D Web graphics > The existing Web continues to work – even better > Enable professional-quality video experiences on the Web
11
11.08.13
Free
English
The new Internet Explorer 5.5 features include: An Enhanced HTML and components HTC model that uses element behaviors and Viewlink. More control over user interface (UI) components, such as scroll bars, frames, and pop-up windows and menus. Internet Explorer 5.5 Final. Internet Explorer 5.5 SP1 provides the latest updates and security fixes to the Internet Explorer technology. Internet Explorer 5.5 SP1 can be installed as an upgrade to existing versions of Internet Explorer or on computers with no previous Internet Explorer installation.
28.34MB
Windows 7, Windows 7 x64, Windows 8, Windows 8 x64, Windows Server 2008 x64
Make the most of the Web with impeccably optimized, personalized, synced, and secured browsing.
Flock delivers the latest webmail, photos, videos and updates from your favorites sites.
Surf the Internet via browser with innovative dual-core design that uses both Webkit and Trident.
Reveal, refine, and take full advantage of high-performance, all-in-one Internet application suite.
Surf the Web and customize your browsing experience.
Innovative new features improve the way you view the web.
A faster, more secure and customizable Web browser.
Navigate the Internet using browser with powerful search, sharing, and multimedia capabilities.
This HPC:Factor Internet Explorer Distribution provides the highest level of Microsoft browser technology for Windows 3.1, 3.11, Windows For Workgroups (Cumulatively known as Win16), Windows NT 3.51 Workstation and Windows NT 3.51 Server. HPC:Factor's servers will distribute the program directly to the client. All you require is an Internet connection available to the PC you wish to install onto and the main Installer file which can be download through this page.
These downloads are no longer actively supported by Microsoft
These downloads are intended for Windows 3.x Only. If you use a different version of Windows Click Here That means it's NOT for Windows 95, Windows 98 or Windows NT 4.0
Microsoft Internet Explorer 5.0 (5.0.913.2200)
HPC Factor provides distributions of Internet Explorer for Win16 purely for the benefit of our users. Handheld PC's cannot be synchronised with Windows 16-bit systems. Windows NT 3.51 while not a 16-bit system, but a 32-bit one does not support any specific 32-bit Microsoft Internet Explorer distribution. The only officially released Internet Explorer release for NT 3 is based around 16-bit code
This download will update the technologies of Windows 16-bit to the highest possible version. Providing Java Virtual Machine support along side Internet Explorer, Outlook Express, system updates, driver updates and a new Dial-up networking (stack dialler*) module.
* The Internet Explorer Stack Dialler is available for Windows 3.1, 3.11 and Windows For Workgroups only. Under NT 3.51 you should configure RAS Services.
System Requirements:
CPU:
Internet Explorer 5.5/6.0/7.0
A 486 with a 25 MHz processor (Pentium processor recommended)
Tumblr media
Memory:
12MB RAM for browser-only installation (16MB if using the Java VM)
Disk Space:
30MB of hard-disk space to run Setup
Windows 3.1 / 3.11 / Windows For Workgroups
All required system updates will be downloaded & installed to your computer by the installer. HPC:Factor recommends that you install the File Manager Year 2000 update & Euro Currency Support before continuing.
Windows NT 3.51 Workstation / Server
Before you can install Internet Explorer 5.0 for Windows NT 3.51 you must first update your system to Service Pack 5. HPC:Factor also recommends installing the Year 2000 Rollup & Euro Currency Support before continuing. You must be logged in a member of the Administrators group to perform the update.
Download Size:
Internet Explorer 5.5 Service Pack 2
5.9MB for browser-only installation 6.4MB for browser and Java VM 8.2MB for browser, Outlook Express, and Java VM 8.9MB for browser, Outlook Express, Java VM and dialler (Windows 3.1x only)
Download & Install
Your computer must have an active Internet Connection to download the setup files from the HPC:Factor servers. If you need to download the Internet Explorer Setup files before Installation, so you can distribute locally or burn to CD, please begin the setup process on any Windows PC and select Download Only when prompted.
Click here to see a short video overview of the installation process.
To Install Internet Explorer for Win16:
Download the Internet Explorer 5.0 setup file onto your computer.
Open File Manager navigate to where you saved the file
Connect to the Internet
Double click setup.exe to begin the Installation process
Follow the instructions on screen
The MSIE Installer program is 882KB and will fit on a High Density Floppy disk.
Download:Microsoft Internet Explorer 5.0
Note: If you are only presented with the Coxion download server during installation please see CESDS0125 for information on a workaround.
Post Install
There are a number of updates and add-ins available for Microsoft Internet Explorer 5.0 for Win16 including security enhancements.
For post install critical patches, bug-fixes, add-ons & updates - Click Here
If you experience any problems with the install process, i.e. receive File Not found errors from the installer or Unable to connect to Download Server errors please contact us so that we can resolve the problem Connecting numark nvii with djay pro.
Internet Explorer 5.5 Sp
All Internet Explorer distributions have minor HPC Factor customisations. These customisations are limited to a small group of predefined Internet Favourites and branding changes which, if required, can be deleted by the end user.
0 notes
fco2312 · 5 years
Photo
Tumblr media
Este sistema operativo me gusta más #Windows311 #Windows31 #win16 #msdos https://www.instagram.com/p/B2pyC9TAy6w/?igshid=1j3qgcyg5cawn
0 notes
15tarlit5kyline · 4 years
Video
youtube
1 note · View note
uncool-and-uncouth · 4 years
Text
Tumblr media
Microsoft Avenger, with the powers of...enterprise software. Done with the win16 palette in aseprite.
1 note · View note
suzanneshannon · 4 years
Text
.NET everywhere apparently also means Windows 3.11 and DOS
I often talk about how .NET Core is open source and runs "everywhere." MonoGame, Unity, Apple Watches, Raspberry Pi, and Microcontrollers (as well as a dozen Linuxes, Windows, etc) is a lot of places.
Michal Strehovský wants C# to run EVERYWHERE and I love him for it.
He recently got some C# code running in two "impossible" places that are now added to our definition of everywhere. While these are fun experiments (don't do this in production) it does underscore the flexibility of both Michals' technical abilities and the underlying platform.
Running C# on Windows 3.11
In this 7 tweet thread Michael talks about how he got C# running in Windows 3.11. The app is very simple, just calling MessageBoxA which has been in Windows since Day 1. He's using DllImport/PInvoke to call MessageBox and receive its result.
I'm showing this Windows 3.11 app first because it's cool, but he started where his DOS experiment left off. He's compiling C# native code, and once that's done you can break all kinds of rules.
In this example he's running Win16...not Win32. However (I was alive and coding and used this on a project!) in 1992 there was a bridge technology called Win32s that was a subset of APIs that were in Windows NT and were backported to Windows 3.11 in the form of Win32s. Given some limitations, you could write 32 bit code and thunk from Win16 to Win32.
Michal learned that the object files that CoreTR's AOT (ahead of time) compiler in 2020 can be linked with the 1994 linker from Visual C++ 2.0. The result is native code that links up with Win32s that runs in 16-bit (ish) Windows 3.11. Magical. Kudos Michal.
Running C# in 8kb on DOS
I've blogged about self-contained .NET Core 3.x executables before and I'm a huge fan. I got my app down to 28 megs. It's small by some measurements, given that it includes the .NET runtime and a lot of accoutrements. Certainly one shouldn't judge a VM/runtime by its hello world size, but Michal wanted to see how small he could go - with 8000 bytes as the goal!
He's using text-mode which I think is great. He also removes the need for the garbage collector by using a common technique - no allocations allowed. That means you can't use new anywhere. No reference types.
He uses things like "fixed char[]" fields to declare fixed arrays, remembering they must live on the stack and the stack is small.
Of course, when you dotnet publish something self-contained, you'll initially get a 65 meg ish EXE that includes the app, the runtime, and the standard libraries.
dotnet publish -r win-x64 -c Release
He can use ILLinker and PublishedTrimmed to use .NET Core 3.x's Tree Trimming, but that gets it down to 25 megs.
He tries using Mono and mkbundle and that gets him down to 18.2 megs but then he hits a bug. And he's still got a runtime.
So the only runtime that isn't a runtime is CoreRT which includes no virtual machine, just functions to support you.
dotnet publish -r win-x64 -c Release /p:Mode=CoreRT
And this gets him to 4.7 megs, but still too big. Some tweaks go to about 3 megs. He can pull out reflection entirely and get to 1.2 megs! It'll fit on a floppy now!
dotnet publish -r win-x64 -c Release /p:Mode=CoreRT-ReflectionFree
This one megabyte size seems to be a hardish limit with just the .NET SDK.
Here's where Michal goes off the rails. He makes a stub reimplementation of the  System base types! Then recompiles with some magic switches to get an IL only version of the EXE
csc.exe /debug /O /noconfig /nostdlib /runtimemetadataversion:v4.0.30319 MiniBCL.cs Game\FrameBuffer.cs Game\Random.cs Game\Game.cs Game\Snake.cs Pal\Thread.Windows.cs Pal\Environment.Windows.cs Pal\Console.Windows.cs /out:zerosnake.ilexe /langversion:latest /unsafe
Then he feeds that to CoreIT to get the native code
ilc.exe zerosnake.ilexe -o zerosnake.obj --systemmodule zerosnake --Os -g
yada yada yada and he's now here
"Now we have zerosnake.obj — a standard object file that is no different from object files produced by other native compilers such as C or C++. The last step is linking it."
A few more tweaks at he's at 27kb! He then pulls off a few linker switches to disable and strip various things - using the same techniques that native developers use and the result is 8176 bytes. Epic.
link.exe /debug:full /subsystem:console zerosnake.obj /entry:__managed__Main kernel32.lib ucrt.lib /merge:.modules=.rdata /merge:.pdata=.rdata /incremental:no /DYNAMICBASE:NO /filealign:16 /align:16
a
What's the coolest and craziest place you've ever run .NET code? Go follow Michal on Twitter and give him some applause.
Sponsor: Like C#? We do too! That’s why we've developed a fast, smart, cross-platform .NET IDE which gives you even more coding power. Clever code analysis, rich code completion, instant search and navigation, an advanced debugger... With JetBrains Rider, everything you need is at your fingertips. Code C# at the speed of thought on Linux, Mac, or Windows. Try JetBrains Rider today!
© 2019 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
      .NET everywhere apparently also means Windows 3.11 and DOS published first on https://deskbysnafu.tumblr.com/
0 notes
vadapega · 1 year
Text
Tumblr media
Still doing DOS era Pixelart commissions for anyone interested, thought I'd make a palette reference with an example piece for each.
More info here : vadapega.art/commissions
Characters are:
Step (SquishiSprite)
RGB (CosmicEternity)
Tina (woodpeckertoons)
44 notes · View notes
justcookingpixels · 15 days
Text
Tumblr media
map 001 (vegetations)
1 note · View note
philipholt · 4 years
Text
.NET everywhere apparently also means Windows 3.11 and DOS
I often talk about how .NET Core is open source and runs "everywhere." MonoGame, Unity, Apple Watches, Raspberry Pi, and Microcontrollers (as well as a dozen Linuxes, Windows, etc) is a lot of places.
Michal Strehovský wants C# to run EVERYWHERE and I love him for it.
He recently got some C# code running in two "impossible" places that are now added to our definition of everywhere. While these are fun experiments (don't do this in production) it does underscore the flexibility of both Michals' technical abilities and the underlying platform.
Running C# on Windows 3.11
In this 7 tweet thread Michael talks about how he got C# running in Windows 3.11. The app is very simple, just calling MessageBoxA which has been in Windows since Day 1. He's using DllImport/PInvoke to call MessageBox and receive its result.
I'm showing this Windows 3.11 app first because it's cool, but he started where his DOS experiment left off. He's compiling C# native code, and once that's done you can break all kinds of rules.
In this example he's running Win16...not Win32. However (I was alive and coding and used this on a project!) in 1992 there was a bridge technology called Win32s that was a subset of APIs that were in Windows NT and were backported to Windows 3.11 in the form of Win32s. Given some limitations, you could write 32 bit code and thunk from Win16 to Win32.
Michal learned that the object files that CoreTR's AOT (ahead of time) compiler in 2020 can be linked with the 1994 linker from Visual C++ 2.0. The result is native code that links up with Win32s that runs in 16-bit (ish) Windows 3.11. Magical. Kudos Michal.
Running C# in 8kb on DOS
I've blogged about self-contained .NET Core 3.x executables before and I'm a huge fan. I got my app down to 28 megs. It's small by some measurements, given that it includes the .NET runtime and a lot of accoutrements. Certainly one shouldn't judge a VM/runtime by its hello world size, but Michal wanted to see how small he could go - with 8000 bytes as the goal!
He's using text-mode which I think is great. He also removes the need for the garbage collector by using a common technique - no allocations allowed. That means you can't use new anywhere. No reference types.
He uses things like "fixed char[]" fields to declare fixed arrays, remembering they must live on the stack and the stack is small.
Of course, when you dotnet publish something self-contained, you'll initially get a 65 meg ish EXE that includes the app, the runtime, and the standard libraries.
dotnet publish -r win-x64 -c Release
He can use ILLinker and PublishedTrimmed to use .NET Core 3.x's Tree Trimming, but that gets it down to 25 megs.
He tries using Mono and mkbundle and that gets him down to 18.2 megs but then he hits a bug. And he's still got a runtime.
So the only runtime that isn't a runtime is CoreRT which includes no virtual machine, just functions to support you.
dotnet publish -r win-x64 -c Release /p:Mode=CoreRT
And this gets him to 4.7 megs, but still too big. Some tweaks go to about 3 megs. He can pull out reflection entirely and get to 1.2 megs! It'll fit on a floppy now!
dotnet publish -r win-x64 -c Release /p:Mode=CoreRT-ReflectionFree
This one megabyte size seems to be a hardish limit with just the .NET SDK.
Here's where Michal goes off the rails. He makes a stub reimplementation of the  System base types! Then recompiles with some magic switches to get an IL only version of the EXE
csc.exe /debug /O /noconfig /nostdlib /runtimemetadataversion:v4.0.30319 MiniBCL.cs Game\FrameBuffer.cs Game\Random.cs Game\Game.cs Game\Snake.cs Pal\Thread.Windows.cs Pal\Environment.Windows.cs Pal\Console.Windows.cs /out:zerosnake.ilexe /langversion:latest /unsafe
Then he feeds that to CoreIT to get the native code
ilc.exe zerosnake.ilexe -o zerosnake.obj --systemmodule zerosnake --Os -g
yada yada yada and he's now here
"Now we have zerosnake.obj — a standard object file that is no different from object files produced by other native compilers such as C or C++. The last step is linking it."
A few more tweaks at he's at 27kb! He then pulls off a few linker switches to disable and strip various things - using the same techniques that native developers use and the result is 8176 bytes. Epic.
link.exe /debug:full /subsystem:console zerosnake.obj /entry:__managed__Main kernel32.lib ucrt.lib /merge:.modules=.rdata /merge:.pdata=.rdata /incremental:no /DYNAMICBASE:NO /filealign:16 /align:16
a
What's the coolest and craziest place you've ever run .NET code? Go follow Michal on Twitter and give him some applause.
Sponsor: Like C#? We do too! That’s why we've developed a fast, smart, cross-platform .NET IDE which gives you even more coding power. Clever code analysis, rich code completion, instant search and navigation, an advanced debugger... With JetBrains Rider, everything you need is at your fingertips. Code C# at the speed of thought on Linux, Mac, or Windows. Try JetBrains Rider today!
© 2019 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
      .NET everywhere apparently also means Windows 3.11 and DOS published first on http://7elementswd.tumblr.com/
0 notes
os2warp · 7 years
Text
theres a big argument on an os/2 message board over whether or not the new release, arcaOS should include dos/windows 3.1 support. half the people are saying “no its 2017 who needs dos and win16 support if you need it that bad use a vm or dosbox” the other half are saying “the main reason some people use os/2 is to have NATIVE windows 3.1 support on somewhat modern hardware, vms and especially dosbox slow things down.
my opinion is why is this even an issue, all the dos and windows 3.1 files in os/2 take up a whooping 12 megabytes. who doesn’t have 12 megabytes to spare these days even if you dont plan on using the software.
4 notes · View notes
desdelinux · 4 years
Text
Llega la nueva versión de Free Pascal 3.2.0 y estos son sus cambios
Después de cinco años desde la formación de la versión 3.0 y del anuncio del trabajo en una nueva versión en septiembre de 2019, por fin llega la nueva versión del compilador multiplataforma Free Pascal 3.2.0. La nueva versión agrega una gran porción de innovaciones y cambios en la implementación del lenguaje Pascal, con el objetivo de mejorar la compatibilidad con Delphi.
Además de que también se incluyen las correcciones de errores habituales y el soporte para nuevas arquitecturas y sistemas, como lo son AArch64, Linux, ppc64le, Android x86_64 e incluso Windows de 16 bits.
(adsbygoogle = window.adsbygoogle || []).push({});
Sobre Free Pascal
Para los que no conocen, Free Pascal deben saber que este es un compilador profesional de Pascal de 32, 64 y 16 bits.
(adsbygoogle = window.adsbygoogle || []).push({});
Fue desarrollado en código abierto durante más de veintisiete años por una gran comunidad de desarrolladores voluntarios muy activos, es conocido por su alta estabilidad, su velocidad de compilación y un código de producto muy eficiente.
Puede apuntar a muchas arquitecturas de procesador: Intel x86 (incluido 8086), AMD64, x86-64, PowerPC, PowerPC64, SPARC, ARM, AArch64, MIPS y la máquina virtual Java.
(adsbygoogle = window.adsbygoogle || []).push({});
Los sistemas operativos compatibles incluyen Linux, FreeBSD, Haiku, Mac OS X, iOS, iPhoneSimulator, Darwin, DOS (16 y 32 bits), Windows 32, Windows 64, WinCE, OS/2, MorphOS, Nintendo GBA, Nintendo DS, Nintendo Wii, Android, AIX y AROS. Además, el soporte para la arquitectura Motorola 68k está disponible en versiones de desarrollo.
Además de que también es compatible con Borland Pascal 7, Delphi, Think Pascal y Metrowerks Pascal. Paralelamente, se está desarrollando el IDE de Lazarus, basado en el compilador Free Pascal y realizando tareas similares a Delphi.
¿Qué hay de nuevo en Free Pascal 3.2?
Como el desarrollo de la rama del compilador 3.0 abarcó cinco años, esta nueva versión es muy recomendable para futuros desarrollos. Es muy probable que los EDI basados ​​en este compilador (Lazarus, Code Typhon), ofrezcan rápidamente su integración.
Y es que de las novedades mas interesantes de este nuevo lanzamiento son muchas, como por ejemplo la adición de la capacidad de inicializar matrices dinámicas utilizando la sintaxis «[…]». Así como también el nuevo soporte para funciones genéricas, procedimientos y métodos que no están vinculados a los tipos de argumento.
Ha aparecido la compatibilidad con espacios de nombres de módulos estándar (predeterminados). Se agregó soporte para bloques C que se asemejan a métodos anónimos en Delphi «.
También se destaca la implementación extendida de arreglos dinámicos, se agregó la operación Insert() para agregar matrices y elementos a las matrices dinámicas existentes, así como Delete() para eliminar rangos y Concat() para combinar matrices.
Para los tipos de registro, se implementan los operadores Initialize, Finalize, Copy y AddRef.
Además, no hay que olvidar que también se incluyó el soporte para las nuevas plataformas AArch64 (ARM64), Linux, ppc64le, Android x86_64 e i8086-win16 que se agregan al compilador.
También teniendo en cuenta los espacios de nombres predeterminados fueron añadidas las siguientes mejoras:
Numerosas mejoras en relación con las matrices dinámicas (inserción, eliminación, concatenación, operador de suma, constantes, inicialización de variables apenas se declaran, constructores).
Extensión de las directivas $ Push y $ Pop para $ MinEnumSize , $ PackSet y $ PackRecords.
Sección threadvar de clase en declaraciones de clase y registro.
Mejora y extensión de tipos genéricos, incluso para rutinas fuera de clase.
Nuevos operadores para gestionar tipos de registros ( Initialize , Copy , AddRef , Finalize ).
Extensión RTTI y asistencia de tipo para interfaces de objetos.
Nuevas unidades: rtl-generics (genéricos), rtti (¡de forma experimental!), ProcessUnicode (versión Unicode de TProcess).
La clase TRegistry es totalmente compatible con Unicode.
El paquete CHM ha sido reescrito para eliminar errores y mejorar el rendimiento.
Finalmente, si estás interesado en conocer más al respecto sobre este nuevo lanzamiento, puedes consultar la lista completa de cambios en el siguiente enlace.
Mientras que para los cambios que afectan a los programas antiguos, puedes consultarlos desde el siguiente enlace.
Descarga
Para los que estén interesados en descargar la nueva versión de este compilador, pueden hacerlo dirigiéndose al siguiente enlace en donde podrán encontrar las diferentes versiones del compilador para cada plataforma soportada.
El enlace es este.
https://ift.tt/2NrpFAT
from WordPress https://desdelinux.wordpress.com/2020/06/24/llega-la-nueva-version-de-free-pascal-3-2-0-y-estos-son-sus-cambios/
0 notes
vimtry · 5 years
Text
VimでPythonプログラミングを快適にするWindows環境の作り方 [gVim/Windows10編]
New Post has been published on https://wp.me/paUJLT-gP
VimでPythonプログラミングを快適にするWindows環境の作り方 [gVim/Windows10編]
VimをWindows 10で利用したいが、なかなか苦労しているというユーザーは多いのでは無いでしょうか。
本記事で、Windows 10 上で gVim を使った快適なプログラミング環境を構築する方法について、ご紹介します。
VimでPythonプログラミングを快適にする構成
下記の構成を前提とした構築します。
OS & Python
Windows 10 Professional(執筆時点では バージョン 1903)
Python 2.7.16
Python 3.7.2
なお、Anaconda を活用しても良いとは思います。
ただ、Python 2.7 環境があった方が良いケースがあるようなので、そちらは順番注意です。
Vim
本体&プラグインマネージャー
gVim (KaoriYa版がおすすめ)
プラグインマネージャー:dein
vim.org の vim もアリですが、Kaoriya版の方が色々な組み込みがされているので便利です。
プラグインマネージャーは好みですが、dein が高速でメンテナンスも細やかなので人気があるようです。
プラグイン
プラグインはかなり好みがあると思いますが、今回は下記のようなオーソドックスな構成としています。(それでも数は多いですが…)
deoplete.nvim 入力補完nvim-yarp フレームワーク deoplete.nvim利用のためvim-hug-neovim-rpcフレームワーク deoplete.nvim利用のため denite.nvim検索ツールdefx.nvimファイルマネージャー vim-quickrun簡易実行tagbar概要表示mru.vimファイル履歴表示vim-fugitive.gitGit 操作vim-gitgutterGit 差分表示vim-surround テキスト囲み補完vimdoc-jaヘルプ日本語化vim-auto-save自動保存molokaiカラースキーマindentLineインデント表示lightline.vimステータスバー表示neosnippet.vimスニペットツールneosnippet-snippetsスニペット集vim-tomlTOMLハイライトVimプラグイン設定用途vim-gitignoregitignoreハイライトvim-jsonJSONハイライトPythonでJSONファイルはよく扱うblackPythonフォーマッタvim-flake8Pythonコードチェッカーjedi-vimPython入力支援syntasticPythonシンタックスチェッカーauto-ctags.vim タグ生成 プログラミング時のみ利用
こちらのサイトを参考に、さらに欲しいプラグインを加えると良いでしょう。
Vim Awesome
Awesome Vim plugins from across the universe
vimawesome.com
注意
今回はあくまで gVim 、Windows上の1つのウインドウアプリケーションとして利用する上での構成となります。
そのため、コマンドプロンプトやPowerShellで利用するには、不自由があります。
そちらで利用するには、それに合わせた設定が必要になる点をご理解ください。
Vim環境構築1.前提環境の準備
python2系インストール
必ず先に Python2 系をインストールする必要があります。
こちらからダウンロードして、インストールしましょう。
Python Release Python 2.7.15
The official home of the Python Programming Language
www.python.org
python3系インストール
次に Python3 系のインストールが必要になります。
こちらからダウンロードして、インストールしましょう。
Python Release Python 3.7.2
The official home of the Python Programming Language
www.python.org
必ず Python2 系とは異なるディレクトリにしましょう。
Pythonにパスを通す
詳しい手順は省略しますが、Python3 および Python(2系) のフォルダにパスを通します。
環境変数は ユーザー変数でもシステム変数でもOK
インストーラで設定するなら、そちらでも構いません。必ず設定内容は確認しましょう。
Pythonモジュールのインストール
下記のコマンドで、gVimで利用するモジュールをインストールします。
pip install --upgrade black flake8 flake8-docstrings flake8-import-order hacking flake8-pytest jedi nvim pynvim
コマンドプロンプトは、管理者権限で実行することに注意してください。
Gitインストール
こちらからインストーラを使って、指示通りにインストールします。
Git
git-scm.com
バージョンは最新版で構いませんが、こちらも環境変数のPATHには必ず追加しておきましょう。
Vim環境構築2.Vimインストール
gVim(Kaoriya版)のインストール
こちらから有り難くダウンロードさせていただいて、インストールしましょう。
Vim — KaoriYa
VimのWindows向けコンパイル済みバイナリを配布しています。
www.kaoriya.net
インストーラも無く、解凍して配置するだけで簡単です。
配置場所はどちらでも構いませんが、下記へインストールするのが無難ですね。
C:\Program Files\vim
環境変数のPATHに追加しておくと、かなり便利です。
ctags のインストール
タグファイルを作成するプログラムもインストールしておきます。
ctags日本語対応版
hp.vector.co.jp
こちらも インストーラも無く、解凍して配置するだけです。
PATHが通っていないといけないので、 環境変数のPATHにあるフォルダに配置するのがオススメです。
フォントのインストール
かなり好みの激しいところですが、今回はフォントは次を利用しています。
yuru7/HackGen
HackGen is Japanese programming font which is a composed of Hack and GenJyuu-Gothic. - yuru7/HackGen
github.com
文字が読みやすくて非常に良いですね。こちらの記事で好きになってしまいました。
【文字幅 半角3:全角5 も追加】Ricty を神フォントだと崇める僕が、フリーライセンスのプログラミングフォント「白源」を作った話 - Qiita
**(2019/10/21 Updated)** ユーザさんが、Homebrew リポジトリに白源を追加してくださいました。Mac で Homebrew ユーザの方はご利用ください。 --- 誰もが知る(?)プログラミングフォン...
qiita.com
関連フォルダの作成
下記のコマンドでフォルダを作成しましょう。
mkdir %USERPROFILE%\.vim\backup mkdir %USERPROFILE%\.vim\dein mkdir %USERPROFILE%\.vim\session mkdir %USERPROFILE%\.vim\swap mkdir %USERPROFILE%\.vim\undo
プラグインマネージャーのインストール
プラグインマネージャーだけは手動インストールしなければ、他のプラグインのインストールが機能しません。
そのため、下記のコマンドを実行して下さい。
git clone https://github.com/Shougo/dein.vim.git %USERPROFILE%\.vim\dein
シンプルにするために標準のフォルダとは変更している点は注意です。
Vim環境構築3.Vim設定
配置場所
各設定ファイルの配置場所は下記の通りです。
%USERPROFILE% (ホームフォルダ) | +--- .vimrc +--- .gvimrc +--- .vim/    |    +--- plugins.toml    +--- lazy.toml    +--- backup/    +--- session/    +--- swap    +--- undo    +--- dein
設定ファイル1. .vimrc
こちらを元にさせてもらって、カスタマイズするのが良いですね。
amix/vimrc
The ultimate Vim configuration: vimrc. Contribute to amix/vimrc development by creating an account on GitHub.
github.com
.vimrc は0から構築するのは辞めた方が良いですね。手間がかかりすぎる上に設定漏れが多くなってしまいますので。
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Sections: " -> General " -> VIM user interface " -> Colors and Fonts " -> Files and backups " -> Text, tab and indent related " -> Visual mode related " -> Moving around, tabs and buffers " -> Status line " -> Editing mappings " -> vimgrep searching and cope displaying " -> Spell checking " -> Misc " -> Helper functions " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => General """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Sets how many lines of history VIM has to remember set history=500 " Enable filetype plugins filetype plugin on filetype indent on " Set to auto read when a file is changed from the outside set autoread " With a map leader it's possible to do extra key combinations " like <leader>w saves the current file let mapleader = "," " Fast saving nmap <leader>w :w!<cr> " :W sudo saves the file " (useful for handling the permission-denied error) command W w !sudo tee % > /dev/null """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => VIM user interface """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Set 7 lines to the cursor - when moving vertically using j/k set so=7 " Avoid garbled characters in Chinese language windows OS let $LANG='ja' set langmenu=ja source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim " Turn on the Wild menu set wildmenu " Ignore compiled files set wildignore=*.o,*~,*.pyc if has("win16") || has("win32") set wildignore+=.git\*,.hg\*,.svn\* else set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store endif "Always show current position set ruler " Height of the command bar set cmdheight=2 " A buffer becomes hidden when it is abandoned set hid " Configure backspace so it acts as it should act set backspace=eol,start,indent set whichwrap+=<,>,h,l " Ignore case when searching set ignorecase " When searching try to be smart about cases set smartcase " Highlight search results set hlsearch " Makes search act like search in modern browsers set incsearch " Don't redraw while executing macros (good performance config) set lazyredraw " For regular expressions turn magic on set magic " Show matching brackets when text indicator is over them set showmatch " How many tenths of a second to blink when matching brackets set mat=2 " No annoying sound on errors set noerrorbells set novisualbell set t_vb= set tm=500 " Properly disable sound on errors on MacVim if has("gui_macvim") autocmd GUIEnter * set vb t_vb= endif " Add a bit extra margin to the left set foldcolumn=1 " === Add Settings == set belloff=all set vb t_vb= set showcmd set wrapscan set matchtime=3 set list set autoindent set hidden set ttyfast set number set mousemodel=popup set mouse=a if has("win16") || has("win32") set clipboard& set clipboard=unnamed else set clipboard& set clipboard^=unnamedplus endif set cursorline " ファイルを開くと、ファイルがあるディレクトリに移動する augroup grlcd autocmd! autocmd BufEnter * if &buftype !=# 'terminal' | lcd %:p:h | endif augroup END """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Colors and Fonts """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Enable syntax highlighting syntax enable " Enable 256 colors palette in Gnome Terminal if $COLORTERM == 'gnome-terminal' set t_Co=256 endif try colorscheme evening catch endtry set background=dark " Set extra options when running in GUI mode if has("gui_running") "set guioptions-=T "set guioptions-=e " === Add: Display: toolbar and menubar === set guioptions=egmrtiT set t_Co=256 set guitablabel=%M\ %t endif " Set utf8 as standard encoding and en_US as the standard language set encoding=utf8 " Use Unix as the standard file type set ffs=unix,dos,mac " === Add: file encodings === set fileencoding=utf-8 set fileencodings=utf-8,iso-2022-jp,euc-jp,sjis " === Add: Colorcolum === set colorcolumn=80 " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Files, backups and undo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Turn backup off, since most stuff is in SVN, git et.c anyway... set nobackup set nowb set noswapfile """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Text, tab and indent related """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Use spaces instead of tabs set expandtab " Be smart when using tabs ;) set smarttab " 1 tab == 4 spaces set shiftwidth=4 set tabstop=4 " === Add: set softtabstop=0 " Linebreak on 500 characters set lbr set tw=500 set ai "Auto indent set si "Smart indent set wrap "Wrap lines """""""""""""""""""""""""""""" " => Visual mode related """""""""""""""""""""""""""""" " Visual mode pressing * or # searches for the current selection " Super useful! From an idea by Michael Naumann vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR> vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR> """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Moving around, tabs, windows and buffers """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search) map <space> / map <c-space> ? " Disable highlight when <leader><cr> is pressed map <silent> <leader><cr> :noh<cr> " Smart way to move between windows map <C-j> <C-W>j map <C-k> <C-W>k map <C-h> <C-W>h map <C-l> <C-W>l " Close the current buffer map <leader>bd :Bclose<cr>:tabclose<cr>gT " Close all the buffers map <leader>ba :bufdo bd<cr> map <leader>l :bnext<cr> map <leader>h :bprevious<cr> " Useful mappings for managing tabs map <leader>tn :tabnew<cr> map <leader>to :tabonly<cr> map <leader>tc :tabclose<cr> map <leader>tm :tabmove map <leader>t<leader> :tabnext " Let 'tl' toggle between this and the last accessed tab let g:lasttab = 1 nmap <Leader>tl :exe "tabn ".g:lasttab<CR> au TabLeave * let g:lasttab = tabpagenr() " Opens a new tab with the current buffer's path " Super useful when editing files in the same directory map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/ " Switch CWD to the directory of the open buffer map <leader>cd :cd %:p:h<cr>:pwd<cr> " Specify the behavior when switching between buffers try set switchbuf=useopen,usetab,newtab set stal=2 catch endtry " Return to last edit position when opening files (You want this!) au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif """""""""""""""""""""""""""""" " => Status line """""""""""""""""""""""""""""" " Always show the status line set laststatus=2 " Format the status line " set statusline=\ %HasPaste()%F%m%r%h\ %w\ \ CWD:\ %r%getcwd()%h\ \ \ Line:\ %l\ \ Column:\ %c set laststatus=2 set statusline=%<%f\ %m%r%h%w%'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'%=%l,%c%V%8P """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Editing mappings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Remap VIM 0 to first non-blank character map 0 ^ " Move a line of text using ALT+[jk] or Command+[jk] on mac nmap <M-j> mz:m+<cr>`z nmap <M-k> mz:m-2<cr>`z vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z if has("mac") || has("macunix") nmap <D-j> <M-j> nmap <D-k> <M-k> vmap <D-j> <M-j> vmap <D-k> <M-k> endif " Delete trailing white space on save, useful for some filetypes ;) fun! CleanExtraSpaces() let save_cursor = getpos(".") let old_query = getreg('/') silent! %s/\s\+$//e call setpos('.', save_cursor) call setreg('/', old_query) endfun if has("autocmd") autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee :call CleanExtraSpaces() endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Spell checking """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Pressing ,ss will toggle and untoggle spell checking map <leader>ss :setlocal spell!<cr> " Shortcuts using <leader> map <leader>sn ]s map <leader>sp [s map <leader>sa zg map <leader>s? z= """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Misc """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Remove the Windows ^M - when the encodings gets messed up noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm " Quickly open a buffer for scribble map <leader>q :e ~/buffer<cr> " Quickly open a markdown buffer for scribble map <leader>x :e ~/buffer.md<cr> " Toggle paste mode on and off map <leader>pp :setlocal paste!<cr> """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Helper functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Returns true if paste mode is enabled function! HasPaste() if &paste return 'PASTE MODE ' endif return '' endfunction " Don't close window, when deleting a buffer command! Bclose call <SID>BufcloseCloseIt() function! <SID>BufcloseCloseIt() let l:currentBufNum = bufnr("%") let l:alternateBufNum = bufnr("#") if buflisted(l:alternateBufNum) buffer # else bnext endif if bufnr("%") == l:currentBufNum new endif if buflisted(l:currentBufNum) execute("bdelete! ".l:currentBufNum) endif endfunction function! CmdLine(str) call feedkeys(":" . a:str) endfunction function! VisualSelection(direction, extra_filter) range let l:saved_reg = @" execute "normal! vgvy" let l:pattern = escape(@", "\\/.*'$^~[]") let l:pattern = substitute(l:pattern, "\n$", "", "") if a:direction == 'gv' call CmdLine("Ack '" . l:pattern . "' " ) elseif a:direction == 'replace' call CmdLine("%s" . '/'. l:pattern . '/') endif let @/ = l:pattern let @" = l:saved_reg endfunction """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Directory Settings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Valuable definition let g:vimdir = $HOME . '\.vim' let g:bundledir = vimdir . '\bundle' let g:session_directory = vimdir . '\session' let g:vimproc#download_windows_dll = 1 let $VIMDIR = vimdir set backupdir=$VIMDIR/backup set directory=$VIMDIR/swap set undodir=$VIMDIR/undo set updatetime=60000 " session management let g:session_autoload = "no" let g:session_autosave = "no" let g:session_command_aliases = 1 let g:python3_host_prog = 'C:\Program Files\Python37\python.exe' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "" dein Settings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" if &compatible set nocompatible endif " dein directories "let s:dein_dir = expand($VIMDIR . '\dein') let g:dein_dir = $VIMDIR . '\dein' let g:dein_repo_dir = g:dein_dir let g:dein#cache_directory = g:dein_dir set runtimepath+=$VIMDIR\dein " Required: if dein#load_state(g:dein_dir) call dein#begin(g:dein_dir) call dein#add('$HOME') call dein#add('Shougo/deoplete.nvim') if !has('nvim') call dein#add('roxma/nvim-yarp') call dein#add('roxma/vim-hug-neovim-rpc') endif let g:deoplete#enable_at_startup = 1 "let g:config_dir = expand('~\.cache\nvim') let g:config_dir = $VIMDIR let s:toml = g:config_dir . '\plugins.toml' let s:lazy_toml = g:config_dir . '\lazy.toml' call dein#load_toml(s:toml, 'lazy': 0) call dein#load_toml(s:lazy_toml, 'lazy': 1) call dein#end() call dein#save_state() endif " If you want to install not installed plugins on startup. if dein#check_install() call dein#install() endif filetype plugin indent on """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "" Key Mappings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Like windows keymapping inoremap <C-v> <C-r>* inoremap <C-e> <End> nnoremap <C-c> "+y vnoremap <C-C> "+y nnoremap <C-a> ggVG " Tab control nnoremap <C-t> :tabe<cr> nnoremap <C-tab> :tabnext<cr> nnoremap <C-S-tab> :tabprevious<cr> " Edit / source setting files nnoremap <F5> :source $MYVIMRC<CR> nnoremap <C-F7> :<C-u>split $MYVIMRC<CR> nnoremap <C-F8> :<C-u>split $HOME\.vim\plugins.toml<CR> nnoremap <C-F9> :<C-u>split $HOME\.vim\lazy.toml<CR> nnoremap <S-F7> :<C-u>edit $MYVIMRC<CR> nnoremap <S-F8> :<C-u>edit $HOME\.vim\plugins.toml<CR> nnoremap <S-F9> :<C-u>edit $HOME\.vim\lazy.toml<CR> " Programmings nnoremap <C-F5> :bo terminal<CR> nnoremap <C-A-F5> :QuickRun<CR> nnoremap <C-e> <End> " Launch Plugins nnoremap <F1> :MRU<CR> nnoremap <F2> :Denite buffer<CR> nnoremap <F3> :Denite file/rec<CR> nnoremap <F4> :Denite file/rec -input= nnoremap <F7> :Defx -split -columns=icons:indent:filename:type<CR> nnoremap <F8> :Defx -split=vertical -winwidth=30<CR> nnoremap <F9> :TagbarToggle<CR> " deoplete inoremap <expr><tab> pumvisible() ? "\<C-n>" : \ neosnippet#expandable_or_jumpable() ? \ "\<Plug>(neosnippet_expand_or_jump)" : "\<tab>"
それぞれの詳しい説明は、各プラグインの説明ページに譲ります。
ただ、Windows らしいキー操作を残しつつ、Denite や Defx などの頻繁に使う機能はファンクションキーに割り当てたのは拘りのポイントです。
また、deoplete.nvim はプラグインの設定ファイルに記載すると競合するみたいなので、コチラに記載することにしました。ちょっと格好悪いですが…
設定ファイル2. .gvimrc
gVimを利用するときだけの設定ファイルで、主にGUI周りの設定のみ切り出しています。
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "" Visual Settings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Window set columns=80 " ウインドウ幅 set lines=52 " ウインドウ高 if has("gui") winpos 0 0 " ウインドウ位置 endif source $VIMRUNTIME/delmenu.vim set langmenu=ja_jp.utf-8 source $VIMRUNTIME/menu.vim set guifont=HackGen:h12 colorscheme molokai
このファイルが無いと、Windowsでは動作してくれないところがあるため、やむなく .vimrc と併用して利用することになります。
設定ファイル3. plugin.toml(プラグイン)
gVim起動時に一緒に読み込むプラグインを設定します。
ポイントは、denite と defx のキーバインド設定と indentLine の設定です。
特に、前者は設定しないと正常にりようできないので最低限といえる内容です。
[[plugins]] repo = 'Shougo/denite.nvim' on_cmd = 'Denite' hook_add = ''' " Define mappings autocmd FileType denite call s:denite_my_settings() function! s:denite_my_settings() abort nnoremap <silent><buffer><expr> <CR> \ denite#do_map('do_action') nnoremap <silent><buffer><expr> d \ denite#do_map('do_action', 'delete') nnoremap <silent><buffer><expr> p \ denite#do_map('do_action', 'preview') nnoremap <silent><buffer><expr> q \ denite#do_map('quit') nnoremap <silent><buffer><expr> i \ denite#do_map('open_filter_buffer') nnoremap <silent><buffer><expr> <Space> \ denite#do_map('toggle_select').'j' endfunction autocmd FileType denite-filter call s:denite_filter_my_settings() function! s:denite_filter_my_settings() abort imap <silent><buffer> <C-o> <Plug>(denite_filter_quit) endfunction ''' [[plugins]] repo = 'Shougo/defx.nvim' on_cmd = 'Defx' hook_add = ''' set runtimepath+=~/.vim/dein/repos/github.com/Shougo/defx.nvim/ autocmd FileType defx call s:defx_my_settings() function! s:defx_my_settings() abort " Define mappings nnoremap <silent><buffer><expr> <CR> \ defx#do_action('open') nnoremap <silent><buffer><expr> c \ defx#do_action('copy') nnoremap <silent><buffer><expr> m \ defx#do_action('move') nnoremap <silent><buffer><expr> p \ defx#do_action('paste') nnoremap <silent><buffer><expr> l \ defx#do_action('open') nnoremap <silent><buffer><expr> E \ defx#do_action('open', 'vsplit') nnoremap <silent><buffer><expr> P \ defx#do_action('open', 'pedit') nnoremap <silent><buffer><expr> o \ defx#do_action('open_or_close_tree') nnoremap <silent><buffer><expr> K \ defx#do_action('new_directory') nnoremap <silent><buffer><expr> N \ defx#do_action('new_file') nnoremap <silent><buffer><expr> M \ defx#do_action('new_multiple_files') nnoremap <silent><buffer><expr> C \ defx#do_action('toggle_columns', \ 'mark:indent:icon:filename:type:size:time') nnoremap <silent><buffer><expr> S \ defx#do_action('toggle_sort', 'time') nnoremap <silent><buffer><expr> d \ defx#do_action('remove') nnoremap <silent><buffer><expr> r \ defx#do_action('rename') nnoremap <silent><buffer><expr> ! \ defx#do_action('execute_command') nnoremap <silent><buffer><expr> x \ defx#do_action('execute_system') nnoremap <silent><buffer><expr> yy \ defx#do_action('yank_path') nnoremap <silent><buffer><expr> . \ defx#do_action('toggle_ignored_files') nnoremap <silent><buffer><expr> ; \ defx#do_action('repeat') nnoremap <silent><buffer><expr> h \ defx#do_action('cd', ['..']) nnoremap <silent><buffer><expr> ~ \ defx#do_action('cd') nnoremap <silent><buffer><expr> q \ defx#do_action('quit') nnoremap <silent><buffer><expr> <Space> \ defx#do_action('toggle_select') . 'j' nnoremap <silent><buffer><expr> * \ defx#do_action('toggle_select_all') nnoremap <silent><buffer><expr> j \ line('.') == line('$') ? 'gg' : 'j' nnoremap <silent><buffer><expr> k \ line('.') == 1 ? 'G' : 'k' nnoremap <silent><buffer><expr> <C-l> \ defx#do_action('redraw') nnoremap <silent><buffer><expr> <C-g> \ defx#do_action('print') nnoremap <silent><buffer><expr> cd \ defx#do_action('change_vim_cwd') endfunction ''' [[plugins]] repo = 'thinca/vim-quickrun' [[plugins]] repo = 'majutsushi/tagbar' [[plugins]] repo = 'vim-scripts/mru.vim' [[plugins]] repo = 'tpope/vim-fugitive.git' [[plugins]] repo = 'airblade/vim-gitgutter' hook_add = ''' let g:gitgutter_git_executable = 'C:\Program Files\Git\cmd\git.exe' ''' [[plugins]] repo = 'tpope/vim-surround' [[plugins]] repo = 'vim-jp/vimdoc-ja' [[plugins]] repo = 'vim-scripts/vim-auto-save' [[plugins]] repo = 'tomasr/molokai' hook_add = ''' colorscheme molokai set t_Co=256 let g:molokai_original = 1 let g:rehash256 = 1 if has('gui_running') set background=dark else set background=light endif ''' [[plugins]] repo = 'Yggdroot/indentLine' hook_add = ''' let g:indent_guides_enable_on_vim_startup = 1 let g:indent_guides_start_level = 2 let g:indent_guides_guide_size = 1 let g:indent_guides_exclude_filetypes = ['help', 'nerdtree', 'tagbar', 'unite'] ''' [[plugins]] repo = 'itchyny/lightline.vim'
設定ファイル4. lazy.toml(遅延読み込みプラグイン)
プラグインの機能を使いたいときだけ読み込む設定です。
可能な限り、こちらに移せば gVim の起動動作が速くなるので良いですが、機能を使うときには都度読み込みが発生します。
主にプログラミング作業に使用するプラグインなど、使う場面が特定できそうなものを中心に設定しています。
[[plugins]] repo = 'Shougo/neosnippet.vim' on_i = 1 on_ft = ['snippet'] depends = ['neosnippet-snippets'] hook_add = ''' let g:neosnippet#snippets_directory = '$HOME/.vim/snippets/' imap <C-K> <Plug>(neosnippet_expand_or_jump) smap <C-K> <Plug>(neosnippet_expand_or_jump) xmap <C-K> <Plug>(neosnippet_expand_target) if has('conceal') set conceallevel=2 concealcursor=niv endif ''' [[plugins]] repo = 'Shougo/neosnippet-snippets' [[plugins]] repo = 'cespare/vim-toml' on_ft = ['toml'] [[plugins]] repo = 'gisphm/vim-gitignore' on_ft = ['gitignore'] [[plugins]] repo = 'elzr/vim-json' on_ft = ['json'] hook_add = ''' let g:vim_json_syntax_conceal = 0 au! BufRead,BufNewFile *.json set filetype=json augroup json_autocmd autocmd! autocmd FileType json set autoindent autocmd FileType json set formatoptions=tcq2l autocmd FileType json set textwidth=78 shiftwidth=2 autocmd FileType json set softtabstop=2 tabstop=8 autocmd FileType json set expandtab autocmd FileType json set foldmethod=syntax augroup END ''' # Python plugins """""""""""""""""""""""""""""""""""""""""""""" [[plugins]] repo = 'psf/black' on_ft = ['python'] hook_add = ''' autocmd BufWritePost *.py Black ''' [[plugins]] repo = 'nvie/vim-flake8' on_ft = ['python'] hook_add = ''' autocmd BufWritePost *.py call Flake8() let g:flake8_show_in_gutter=1 let g:flake8_show_in_file=1 ''' [[plugins]] repo = 'davidhalter/jedi-vim' on_ft = ['python'] [[plugins]] repo = 'vim-scripts/syntastic' on_ft = ['python'] [[plugins]] repo = 'soramugi/auto-ctags.vim' on_ft = ['python'] hook_add = ''' let g:auto_ctags = 1 let g:auto_ctags_directory_list = ['.git', '.'] '''
これまでの手順がすべて完了していれば、次回の gVim 起動時に必要なプラグインが git によってインストールされます。
その際は、少し gVimの起動に時間がかかる点は注意してください。
以上で、インストールおよび初期設定は完了です。
Python スクリプトをチェッカーでチェックした様子
しかし、Windows環境で快適に使うなら、あと一工夫が必要です。
Windows環境で素早くVimを利用するために
スタートメニュー/タスクバー
Windows の基本ですが、gVim をスタートメニューやタスクバーに登録しましょう。
gVim(kaoriya版)にはインストーラーが無いため、手動で登録する必要がある点は注意です。
ショートカットキーの設定
とっさにパッと起動したいことがあり得ます。そんな時にはショートカットキーを使うと便利です。
こちらの画像をご覧いただくと分かりますが、gVim のショートカットのプロパティに設定します。
タスクバーに登録した gVim のショートカットのプロパティに設定したりすると良いですね。
右クリックメニュー
こちらの手順の通り、Windowsの右クリックメニューに追加すると、さらにgVimを利用しやすくなりますので、オススメです。
GVim/neovimの右クリックメニュー登録方法 [Windows 10]
この記事では、GVim / neovim を Windows 10 の右クリックメニューへ登録する方法をご紹介します。
vim.blue
2019.10.13
「送る」への追加
右クリックメニューの「送る」に登録する手もあります。
レジストリを操作しなくて良いので安全ですが、選ぶためには1つステップが増えます。
もしこちらを設定する場合は、窓キー+Rキーを押した後に下記のコマンドを実行してください。
shell:sendto
コマンドプロンプトからは実行できないので要注意。
以上で gVim を Windows環境に馴染ませて、Python開発ができる環境が整いました。
動作確認としては、下記をやってみると良いと思います。
Terminal モードで Python を起動する
QuickRun で Pythonスクリプトを実行する
:py または py3 でそれぞれスクリプトを実行する(バージョン注意)
:!python % または :!python3 % でスクリプトを実行する (バージョン注意)
Pythonスクリプトを保存する(各チェッカーやフォーマッターが機能するはず)
既知の問題
この手順で設定した gVim には下記の問題があります。ご理解ください。
TOMLファイルを読み込んだ際、ハイライトが機能しない。(その後、source $MYVIMRC するとハイライトが機能します)
同じ設定ファイルで、コマンドプロンプトから Vim を起動すると、ステータスバーの設定など正常に機能しません。
Pythonスクリプトを保存する際、jedi や フォーマッター、チェッカーがエラーを起こすことがあります。
また、解決法が分かる方は、お問い合わせフォームもしくはTwitterでメンションいただけると助かります。
Pythonプログラミングのレベルアップには
Python プログラミングを学びたい Vimmer は、次のようなオンラインスクールを活用するのが良いでしょう。通いのスクールが難しい人に最適です。
Udemy
有名オンラインレッスンサービスです。コンテンツが非常に充実しており、プログラミングに限らないバリエーションの豊富さが特徴です。
プログラミング言語 Python 3 入門 プログラミング初心者でも安心、Python/Django入門講座 【4日で体験!】 TensorFlow, Keras, Python 3 で学ぶディープラーニング体験講座 Python 3 : Web スクレイピング 超入門 - Python で通販サイトの最低価格を比較す���アプリを作る
日本語以外ができるのであれば、より選択肢が多いサイトといえます。
質の高い動画での学習は、多くのエンジニアに好評を得ていますね。
TechAcademy
国内のプログラミングスクールでは、定評のあるサービスの1つです。
オンラインブートキャンプをうたっているだけあって、かなりミッチリなカリキュラムが評判です。
また、パーソナルメンターがつくなど、挫折しにくく、徹底的なサポートが魅力です。
Pythonコースなら「機械学習プログラムを開発することがゴール」とされているのも面白いですね。
無料レッスンもやっているようなので、機械学習を学びたい人をはじめ、Pythonプログラミングを覚えたい人は、ぜひ試してみると良いでしょう。
CodeCamp
国内のプログラミングスクールでは、定評のあるサービスの1つです。
講師陣が現役エンジニアであることや、講師との1on1レッスンが好評です。
プログラミングのオンライン家庭教師と表するサービスは、なかなか魅力的ではないでしょうか。
また、「Pythonデータサイエンスコース」では、Pythonで業務タスクを自動化する方法も学べるようです。
こちらも無料レッスンもやっているようなのですので、ぜひ試してみると良いでしょう。
0 notes