nemerle

Defining operators in Boo

I'm looking to move some of my lighter weight metaprogramming from Nemerle to Boo and I'm trying to figure out how to define custom operators. For example, I can do the following in Nemerle: macro @<-(func, v) { <[ $func($v) ]> } Then these two are equivalent: foo <- 5; foo(5); I can't find a way of doing this in Boo -- any id...

When is a new language the right tool for the job?

For a long time I've been trying different languages to find the feature-set I want and I've not been able to find it. I have languages that fit decently for various projects of mine, but I've come up with an intersection of these languages that will allow me to do 99.9% of my projects in a single language. I want the following: Buil...

Infix format for Nemerle macro

Say I need some very special multiplication operator. It may be implemented in following macro: macro @<<!(op1, op2) { <[ ( $op1 * $op2 ) ]> } And I can use it like def val = 2 <<! 3 And its work. But what I really want is some 'english'-like operator for the DSL Im developing now: macro @multiply(op1, op2) { <[ ( $op1 * ...

Regular expression help

I have the following method in some nemerle code: private static getLinks(text : string) : array[string] { def linkrx = Regex(@"<a\shref=['|\"](.*?)['|\"].*?>"); def m = linkrx.Matches(text); mutable txmatches : array[string]; for (mutable i = 0; i < m.Count; ++i) { txmatches[i] = m[i].Value; } txmatc...

Getting types in mscorlib 2.0.5.0 (aka Silverlight mscorlib) via reflection on?

Hello, I am trying to add Silverlight support to my favorite programming langauge Nemerle. Nemerle , on compilation procedure, loads all types via reflection mainly in 2 steps 1-) Uses Assembly.LoadFrom to load assembly 2-) Usese Assembly.GetTypes() to get the types Then at the end of compilation it emits the resolved types with Re...

Using Nemerle in asp.net App_Code directory

I want to use Nemerle in an ASP.NET application. Specifically, putting .n files into App_Code. I added this to my web.config system.codedom/compilers section: <compiler language="n;Nemerle" extension=".n" type="Nemerle.Compiler.NemerleCodeProvider, Nemerle.Compiler"/> When running I get this exception: The assembly '' is already loa...

What's the use of chords?

Languages such as Nemerle support the idea of chords. I'd like to know what their practical use is. ...

Input in Nemerle

Hello, I want to know how to take input from the console of the form : M 14 65 99 in nemerle. In C# I am doing this by : string[] input = System.Console.ReadLine().Split(' '); ch = System.Char.Parse(input[0]); a = System.Int32.Parse(input[1]); d = System.Int32.Parse(input[2]); ...

How to install Nemerle on Mono

I can't find the solution How to install Nemerle on Mono I've got Nemerle Studio , But I want to try mono with it. Maybe I will make something for Linux later, now I want to try it on windows. ...

How to hide console after creating form in console application

I want to hide my console after creating a from in my console application. And then show it again after closing form :) or somewhere when I want ... Console.Hide??? Application.Run(nForm()); Console.Show??? ...

WriteProcessMemory

Ok... I want to make win32api WriteProcessMemory works. (*Just for learning winAPI on .Net platforms ! ^_^*) I'm using Nemerle but the syntax is similar C# and I can read C# code sure. So here is my steps : 1) get win api function [DllImport("kernel32.dll",SetLastError = true)] public static extern WriteProcessMemory (hProcess : Int...

Reading byte array Textbox -> byte[]

I've got Textbox with a string like 89 3d 2c c0 7f 00 How to store it to Byte[] (byte array) variable ? Now I can read only one dec value :( Value=BitConverter.GetBytes(Int32.Parse(this.textBox3.Text.ToString())); ...

Offset as hex from textbox

I'm using lpBaseAddress : IntPtr but ... I need to enter hex value :-/ like a normal offset like on VB that could be something like : offset = CLng("&H" + text) So I need to take a value from textbox and make same magic on C# (or Nemerle ^_) ...

Cached ResourceManager instance request — how to convert the code to Nemerle

C# CODE : [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager...

SplashScreen is separated thread

private nForm_Load (_ : object, _ : System.EventArgs) : void { mutable procent : double = 0; SplashScreen.BeginDisplay(); for (mutable i : int = 0; i <= 100; i++) { procent = i; SplashScreen.SetTitle("Загрузка"); SplashScreen.SetCurrentTitle("Loading : " + Math.Ceiling(...

DoEvents 1 to 100

for (mutable i : int = 0; i <= 100; i++) { SplashScreen.SetCurrentTitle("Loading : " + i.ToString() + "%"); Application.DoEvents(); Thread.Sleep(20); And it works only for 17-25 :-/ Why and how to fix private CurrentTitle : string { get { _currentt...

How to save class object to file and then encrypt it with open and closed key

How to save class object to file and then encrypt it with open and closed key. closed key must be one for all (just for safe) and open key must be different for each file. I want use this code ... Looking like it is what I want but I still need Encryption. public ObjectToFile(_Object : object, _FileName : string) : bool { try...

Application.SetCompatibleTextRenderingDefault(false);

Application.SetCompatibleTextRenderingDefault(false); Error : Before the establishment of the first object IWin32Window in the annex to call SetCompatibleTextRenderingDefault. why error ? how to avoid ? and ... what SetCompatibleTextRenderingDefault actually makes :) ...

Could not load ConfigurationSection class - type

at web.config <section name="FlowWebDataProviders" type="FlowWebProvidersSection" requirePermission="false"/> <FlowWebDataProviders peopleProviderName="sqlProvider" IzmListProviderName="sqlProvider"> <PeopleProviders> <add name="sqlProvider" type="SqlPeopleProvider" connectionStringName="FlowServerConnectionString"/> ...

LinqToSQL _conn ? LinqToSQLConnection ?

here is a code : using System; using Nemerle.Collections; using Nemerle.Text; //using Nemerle.Utility; using System.Linq; using Nemerle.Data.Linq; using NUnit.Framework; using System.Data.Linq; namespace LinqTestes { [TestFixture] public class Linq2SqlTests { static ReadConnectionString() : string { def currAssm = ...