ziaw / npad Goto Github PK
View Code? Open in Web Editor NEWNemerle pad. Very simple nemerle IDE for language snippets fast run.
Nemerle pad. Very simple nemerle IDE for language snippets fast run.
Code editor must highlights compile errors places.
This code not worked properly in Npad:
using System.Console;
def expr = <[ 1 + 1 ]>;
def expr2 = <[ 1 + 1 ]>;
WriteLine($"expr type is $expr");
WriteLine($"expr2 type is $expr2");
error says:
snippet.n:2:14:2:19: error: you must specify `partial' modifier on all declarations of type `_N_MacroContexts'
snippet.n:2:14:2:19: error: first defined here
Nemerle.Core.AssertionException: assertion ``this.tenv == null'' failed in file ncc\hierarchy\TypeBuilder.n, line 884
в Nemerle.Compiler.TypeBuilder.make_tyenvs() в e:\OpenSource\Nemerle\Nemerle\ncc\hierarchy\TypeBuilder.n:строка 885
в Nemerle.Compiler.TypeBuilder.FixupDefinedClass() в e:\OpenSource\Nemerle\Nemerle\ncc
There to be good to add references to program, in any way, maybe comment text in file // reference: System.Core or other handy solution
Hello,
I`m trying to run a "Hello World" snippet, but NPad fails to load Nemerle.Macros.dll assembly.
Exception occurs:
System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\kdiachenko\Desktop\Programs\NPad\Nemerle.Macros.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\kdiachenko\Desktop\Programs\NPad\Nemerle.Macros.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Nemerle.Compiler.LibraryReferenceManager.assemblyLoadFrom(String path)
at Nemerle.Compiler.LibraryReferenceManager._N_assembly_by_name_56051(_N_closure_56043 _N_LookupAssembly_cp_56050, String path)
at Nemerle.Compiler.LibraryReferenceManager.LookupAssembly(String name)
at Nemerle.Compiler.LibraryReferenceManager.LoadPluginsFrom(String name, String strongPart, Boolean loadMacros, Boolean loadParsers)
at Nemerle.Compiler.ManagerClass.LoadNemerleMacros()
at Nemerle.Compiler.ManagerClass._N__N_lambda__26777__26935.apply_void()
at Nemerle.Compiler.ManagerClass._N_tryEx_26799(_N_closure_26783 _N_LoadExternalLibraries_cp_26798, FunctionVoid f)
at Nemerle.Compiler.ManagerClass.LoadExternalLibraries()
at Nemerle.Compiler.ManagerClass.Run()
at NPad.ManagedCompiler.Compile(FileInfo fileName, TextWriter log)
at NPad.AppRunner.CompileAndRun(FileInfo file)
at NPad.MainForm.runCode()
This example is make program to fall:
using System.Console;
def _int = 53;
def _string = "This is a string";
def _char = 'e';
def _bool = true;
def hexint = 0x63;
def octalint = 0o12;
def binaryinteger = 0b110110;
def signedbyte = 81 : sbyte;
def unsignedbyte = 122 : byte;
def smallint = 63 : short;
def smalluint = 61 : ushort;
def integer = 353l;
def usignedint = 351ul;
def nativeint = 7511 : int;
def unsignednativeint = 7653 : uint;
def _long = 12345678912345789L;
def unsignedlong = 12345678912345UL;
def float32 = 12.8F;
def _float = 552.8;
def lst = [1, 2, 3];
WriteLine($"int = $_int");
WriteLine($"string = $_string");
WriteLine($"char = $_char");
WriteLine($"bool = $_bool");
WriteLine($"hex int = $hexint");
WriteLine($"HEX INT = $hexint");
WriteLine($"oct int = $octalint");
WriteLine($"bin int = $binaryinteger");
WriteLine($"signed byte = $signedbyte");
WriteLine($"unsigned byte = $unsignedbyte");
WriteLine($"small int = $smallint");
WriteLine($"small uint = $smalluint");
WriteLine($"int = $integer");
WriteLine($"uint = $usignedint");
WriteLine($"native int = $nativeint");
WriteLine($"unsigned native int = $unsignednativeint");
WriteLine($"long = $_long");
WriteLine($"unsigned long = $unsignedlong");
WriteLine($"float = $float32");
WriteLine($"double = $_float");
WriteLine($"splice integer operations = $(integer * 210 + 1)");
WriteLine($"list = ..$lst");
WriteLine($<#list with delimiter = ..$(lst; ";")#>);
WriteLine($<#list with operations = ..$(lst; "; "; x => $"x * 2 = $(x * 2)")#>);
I see it in the debugger after, there is StackOverflowException in it
This text in output window:
Waiting...
Attempted to busy-wait 8ms, actually waited '8'
Cycle counts for this time '13014' times.
Dont want to select if i press CTRL + A for select all standart action, but some times ago, in my opinion this works. Right mouse button menu is works for select all.
There to be good to support standart windows edit combinations like CTLR + C for copy part of text, it is important.
There to be good, to automatical add reference to assembly from Nemerle directory without fully qualified path specification. Only /// reference: ass_name. It is most frequent use case.
using System;
using System.Console;
interface IPoint
{
X : float {get;set;}
Y : float {get;set;}
}
gives error (while in VS this example is goes):
System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в NPad.AppRunner.runProgram(MethodInfo entryPoint) в e:\OpenSource\Nemerle\NPad\NPad\AppRunner.n:строка 86
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.