Search Results

Search found 13 results on 1 pages for 'nemerle'.

Page 1/1 | 1 

  • How to popularize Nemerle (or another programming language)?

    - by keykeeper
    Any .NET developer who is interested in different programming languages knows that F# is the most popular functional language for the .NET platform nowadays. The only fact describing the popularity of F# is the great support of Microsoft. But we are not limited with F# at all. There are some other functional languages on the .NET platform. I'm very disappointed with the fact that Nemerle isn't well-known. It's an awesome language which supports three paradigms: object-oriented, functional and meta- programming. I won't try to explain why I like it so much. The problem is that I can't use it at work. I think that only really brave companies can rely on Nemerle. It's almost unknown, that's why it's hard to find new developers for the project. Noone wants to make a first step with Nemerle if it can influence the budget what is reasonable. So, here is a question: what can I do to make Nemerle more popular? Here are my first ideas: implement open-source projects using Nemerle; make presentations on different conferences; write articles.

    Read the article

  • Using Nemerle in asp.net App_Code directory

    - by Andrew Davey
    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 loaded in another appdomain. Setting in machine.config can help solve this issue. Stack trace [HttpException (0x80004005): The assembly '' is already loaded in another appdomain. Setting <deployment retail="true" /> in machine.config can help solve this issue.] System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +8809675 System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +128 System.Web.Compilation.BuildManager.CompileCodeDirectories() +265 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +320 [HttpException (0x80004005): The assembly '' is already loaded in another appdomain. Setting <deployment retail="true" /> in machine.config can help solve this issue.] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729 [HttpException (0x80004005): The assembly '' is already loaded in another appdomain. Setting <deployment retail="true" /> in machine.config can help solve this issue.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259 What am I doing wrong?

    Read the article

  • LinqToSQL _conn ? LinqToSQLConnection ?

    - by nCdy
    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 = Uri(typeof(Linq2SqlTests).Assembly.CodeBase).LocalPath; def path = IO.Path.GetDirectoryName(currAssm); def connStrPath = IO.Path.Combine(path, "connectionString.txt"); def connStr = try { IO.File.ReadAllText(connStrPath, Text.Encoding.UTF8) } catch { | e is IO.FileNotFoundException => throw IO.FileNotFoundException( $"You should define connection string to NorthWind DB in: '$connStrPath'", e.FileName, e) }; connStr } _conn : LinqDataConnection = LinqDataConnection(ReadConnectionString()); and I'm making the same but what is LinqDataConnection type ? and where does it comes from ?

    Read the article

  • How to cancel binding ObjectDataSource ?

    - by nCdy
    CheckPara is my OnDataBinding procedure SqlDataSource1 is ObjectDataSource (it's only confusing name) Language is Nemerle, but if you know C# you can read it easy protected virtual CheckPara(_ : object, _ : System.EventArgs) : void { foreach(x is Parameter in SqlDataSource1.SelectParameters) when(x.DefaultValue=="") //Cancel binding } so how can I cancel binding when there is not fully configurated ObjectDataSource ? Or... how can I run binding only when I done with all parameters ?

    Read the article

  • How to add property to property map without class explorer ?

    - by nCdy
    I've got a new question after answer on this question http://stackoverflow.com/questions/2816294/pass-parameter-from-page-to-activex How to add property to property map without class explorer ? Need to add the property for object and class explorer doesn't works because of Nemerle doesn't supports it yet. code : <object id="Bacs_DBTableRepX" classid="CLSID:CA8B72B3-3B15-40D7-9364-478E25AF5B41" codebase="Bacs_DBTableRepX.cab" style=" Z-INDEX: 102; LEFT: 20px; WIDTH: 1200px; POSITION: absolute; TOP: 80px; HEIGHT: 600px"> <param name="ax_Command" value='<%=GetText()%>'/> </object>

    Read the article

  • Tune cindent "switch" indentation

    - by Don Reba
    Nemerle is a C-like language and mostly works very well with cindent. However, its construct analogous to switch is called match: match (x) { | "Hello World" => ... | _ => ... } Is it possible to get the cinoptions for switch statements to apply to this construct, instead? Maybe there is a regular expression I can set somewhere. If not, can I get the vertical bars to align with the braces another way?

    Read the article

  • Could not load ConfigurationSection class - type

    - by nCdy
    at web.config <section name="FlowWebDataProviders" type="FlowWebProvidersSection" requirePermission="false"/> <FlowWebDataProviders peopleProviderName="sqlProvider" IzmListProviderName="sqlProvider"> <PeopleProviders> <add name="sqlProvider" type="SqlPeopleProvider" connectionStringName="FlowServerConnectionString"/> <add name="xmlProvider" type="XmlPeopleProvider" schemaFile="People.xsd" dataFile="People.xml"/> </PeopleProviders> <IzmListProviders> <add name="sqlProvider" type="SqlIzmListProvider" connectionStringName="FlowServerConnectionString"/> </IzmListProviders> </FlowWebDataProviders> and public class FlowWebProvidersSection : ConfigurationSection { [ConfigurationProperty("peopleProviderName", IsRequired = true)] public PeopleProviderName : string { get { this["peopleProviderName"] :> string } set { this["peopleProviderName"] = value; } } [ConfigurationProperty("IzmListProviderName", IsRequired = true)] public IzmListProviderName : string { get { (this["IzmListProviderName"] :> string) } set { this["IzmListProviderName"] = value; } } [ConfigurationProperty("PeopleProviders")] [ConfigurationValidatorAttribute(typeof(ProviderSettingsValidation))] public PeopleProviders : ProviderSettingsCollection { get { this["PeopleProviders"] :> ProviderSettingsCollection } } [ConfigurationProperty("IzmListProviders")] [ConfigurationValidatorAttribute(typeof(ProviderSettingsValidation))] public IzmListProviders : ProviderSettingsCollection { get { this["IzmListProviders"] :> ProviderSettingsCollection } } } and public class ProviderSettingsValidation : ConfigurationValidatorBase { public override CanValidate(typex : Type) : bool { if(typex : object == typeof(ProviderSettingsCollection)) true else false } /// <summary> // validate the provider section /// </summary> public override Validate(value : object) : void { mutable providerCollection : ProviderSettingsCollection = match(value) { | x is ProviderSettingsCollection => x | _ => null } unless (providerCollection == null) { foreach (_provider is ProviderSettings in providerCollection) { when (String.IsNullOrEmpty(_provider.Type)) { throw ConfigurationErrorsException("Type was not defined in the provider"); } mutable dataAccessType : Type = Type.GetType(_provider.Type); when (dataAccessType == null) { throw (InvalidOperationException("Provider's Type could not be found")); } } } } } project : Web Application ... I need to find error first . . . why : Error message parser: Error creating configuration section handler for FlowWebDataProviders: Could not load type 'FlowWebProvidersSection'. ? by the way : syntax of nemerle (current language) is very similar C#, don't afraid to read the code... thank you

    Read the article

  • Getting values from Dynamic elements.

    - by nCdy
    I'm adding some dynamic elements to my WebApp this way : (Language used is Nemerele (It has a simple C#-like syntax)) unless (GridView1.Rows.Count==0) { foreach(index with row = GridView1.Rows[index] in [0..GridView1.Rows.Count-1]) { row.Cells[0].Controls.Add ({ def TB = TextBox(); TB.EnableViewState = false; unless(row.Cells[0].Text == "&nbsp;") { TB.Text = row.Cells[0].Text; row.Cells[0].Text = ""; } TB.ID=TB.ClientID; TB.Width = 60; TB }); row.Cells[0].Controls.Add ({ def B = Button(); B.EnableViewState = false; B.Width = 80; B.Text = "?????????"; B.UseSubmitBehavior=false; // Makes no sense //B.OnClientClick="select(5);"; // HERE I CAN KNOW ABOUT TB.ID //B.Click+=EventHandler(fun(_,_) : void { }); // POST BACK KILL THAT ALL B }); } } This textboxes must make first field of GridView editable so ... but now I need to save a values. I can't do it on server side because any postback will Destroy all dynamic elements so I must do it without Post Back. So I try ... <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript"> function CallPageMethod(methodName, onSuccess, onFail) { var args = ''; var l = arguments.length; if (l > 3) { for (var i = 3; i < l - 1; i += 2) { if (args.length != 0) args += ','; args += '"' + arguments[i] + '":"' + arguments[i + 1] + '"'; } } var loc = window.location.href; loc = (loc.substr(loc.length - 1, 1) == "/") ? loc + "Report.aspx" : loc; $.ajax({ type: "POST", url: loc + "/" + methodName, data: "{" + args + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: onSuccess, fail: onFail }); } function select(index) { var id = $("#id" + index).html(); CallPageMethod("SelectBook", success, fail, "id",id); } function success(response) { alert(response.d); } function fail(response) { alert("&#1054;&#1096;&#1080;&#1073;&#1082;&#1072;."); } </script> So... here is a trouble string : var id = $("#id" + index).html(); I know what is ID here : TB.ID=TB.ClientID; (when I add it) but I have no idea how to send it on Web Form. If I can add something like this div : <div id="Result" onclick="select(<%= " TB.ID " %>);"> Click here. </div> from the code it will be really goal, but I can't add this element as from CodeBehind as a dynamic element. So how can I transfer TB.ID or TB.ClientID to some static div Or how can I add some clickable dynamic element without PostBack to not destroy all my dynamic elements. Thank you.

    Read the article

  • Nullable Integer ? (working with linq)

    - by nCdy
    I've got exception about convert NULL to Int32. I've got a table from database with nullable tinyint [Column(Storage="_StatType", DbType="tinyint NULL")] public StatType : int { get { _StatType; } } (to get C# code just replace variable's type) and after making linq select def StartLinq = linq <#from lpi in _CfgListParIzm where lpi.ID_ListParIzm==drr1 select (lpi.StatType) #> ; StartLinq.ToArray()[0] can't be readed if that is null :-/ mutable STT : int = 0; try { _=int.TryParse(StartLinq.ToArray()[0].ToString(), out STT); } catch { | _ is Exception => () /* I don't care*/ } upper code is very poor trick :( I wont use it.

    Read the article

  • Reading from a staging 2D texture array in DirectX10

    - by Don Reba
    I have a DX10 program, where I create an array of 3 16x16 textures, then map, read, and unmap each subresource in turn. I use a single mip level, set resource usage to staging and CPU access to read. Now, here is the problem: Subresource 0 contains 1024 bytes, pitch 64, as expected. Subresource 1 contains 512 bytes, pitch 64. Subresource 2 contains 256 bytes, pitch 64. I expect all three to be the same size. Debugging output is enabled, but not reporting any warnings or errors. Am I missing something, or might this be some sort of driver issue? Here is the code. The language is Nemerle, but C# and C++ would look almost the same. I have looked through the generated code, and am fairly confident the problem is not language-related. def cpuTexture = Texture2D ( device , Texture2DDescription() <- { Width = 16; Height = 16; MipLevels = 1; ArraySize = 3; Format = Format.R32_Float; Usage = ResourceUsage.Staging; CpuAccessFlags = CpuAccessFlags.Read; SampleDescription = SampleDescription(count = 1, quality = 0); } ); foreach (subresource in [0 .. 2]) { def data = cpuTexture.Map(subresource, MapMode.Read, MapFlags.None); Console.WriteLine($"subresource $subresource"); Console.WriteLine($"length = $(data.Data.Length)"); Console.WriteLine($"pitch = $(data.Pitch)"); cpuTexture.Unmap(subresource); }

    Read the article

  • Unit testing statically typed functional code

    - by back2dos
    I wanted to ask you people, in which cases it makes sense to unit test statically typed functional code, as written in haskell, scala, ocaml, nemerle, f# or haXe (the last is what I am really interested in, but I wanted to tap into the knowledge of the bigger communities). I ask this because from my understanding: One aspect of unit tests is to have the specs in runnable form. However when employing a declarative style, that directly maps the formalized specs to language semantics, is it even actually possible to express the specs in runnable form in a separate way, that adds value? The more obvious aspect of unit tests is to track down errors that cannot be revealed through static analysis. Given that type safe functional code is a good tool to code extremely close to what your static analyzer understands. However a simple mistake like using x instead of y (both being coordinates) in your code cannot be covered. However such a mistake could also arise while writing the test code, so I am not sure whether its worth the effort. Unit tests do introduce redundancy, which means that when requirements change, the code implementing them and the tests covering this code must both be changed. This overhead of course is about constant, so one could argue, that it doesn't really matter. In fact, in languages like Ruby it really doesn't compared to the benefits, but given how statically typed functional programming covers a lot of the ground unit tests are intended for, it feels like it's a constant overhead one can simply reduce without penalty. From this I'd deduce that unit tests are somewhat obsolete in this programming style. Of course such a claim can only lead to religious wars, so let me boil this down to a simple question: When you use such a programming style, to which extents do you use unit tests and why (what quality is it you hope to gain for your code)? Or the other way round: do you have criteria by which you can qualify a unit of statically typed functional code as covered by the static analyzer and hence needs no unit test coverage?

    Read the article

  • Open Source Project & Language Selection

    - by James
    I'm getting ready to start an open-source project that will target .NET/Mono. For those who have started their own open source venture... Do you let the fact that a project is going to be open-source weigh on the decision of what language to use? For example. Most .NET open-source projects are written in C#. However, if you were more comfortable with VB.NET, Boo, Nemerle, etc... would you use it? What other considerations are there? This particular project will be a core library and application for geocaching. Similar to GSAK.

    Read the article

1