News for hackers. Stuff that matters.
Re:Show HN: NetLua – Completely managed .NET Lua by profquail on Friday December 06, 2013 @08:44AM (#6860972)
There's also IronLua, which is written in F#: https://ironlua.codeplex.com/
Re:Show HN: NetLua – Completely managed .NET Lua by CmonDev on Friday December 06, 2013 @09:42AM (#6861223)
Would be cool to see performance comparison in future.
Re:Show HN: NetLua – Completely managed .NET Lua by acron0 on Friday December 06, 2013 @07:15AM (#6860699)
I'm a user of NLua[0]. Why would I switch to using this instead?

[0] http://nlua.org/

Re:Show HN: NetLua – Completely managed .NET Lua by diego_moita on Friday December 06, 2013 @10:37AM (#6861554)
As this post title says: "completely managed".

NLua still relies on native code.

Re:Show HN: NetLua – Completely managed .NET Lua by mfenniak on Friday December 06, 2013 @11:31AM (#6861873)
There are a few advantages to being completely managed, rather than using native code. Portability (eg. mobile devices, different OSes), and functional code access security are two reasons that come to mind for me.
Re:Show HN: NetLua – Completely managed .NET Lua by CmonDev on Friday December 06, 2013 @09:41AM (#6861215)
Are both portable class libraries? In case that matters.
Re:Show HN: NetLua – Completely managed .NET Lua by CmonDev on Friday December 06, 2013 @09:34AM (#6861174)
Well done! Is it a specific version of Lua?
Re:Show HN: NetLua – Completely managed .NET Lua by mattfenwick on Friday December 06, 2013 @01:47PM (#6862781)
Very interesting! I'm curious about the parser's error reporting for malformed input -- does it use Irony's default error reporting, or a custom solution? Are error reports good, bad, or lacking in any way?
Re:Show HN: NetLua – Completely managed .NET Lua by Bambo on Saturday December 07, 2013 @04:20AM (#6866016)
I've not had a chance to look too deep into it but if you find out let me know.
Re:Show HN: NetLua – Completely managed .NET Lua by yarou on Friday December 06, 2013 @12:23PM (#6862228)
Very interesting. If you don't mind me asking, how difficult was it to parse the grammar of Lua? I see you mention "Irony", but I've never heard of it. Is it a parser generator?
Re:Show HN: NetLua – Completely managed .NET Lua by louthy on Friday December 06, 2013 @12:33PM (#6862308)
Re:Show HN: NetLua – Completely managed .NET Lua by thinkpad20 on Friday December 06, 2013 @12:39PM (#6862334)
I'll be "that kid"... what does "completely managed" mean?
Re:Show HN: NetLua – Completely managed .NET Lua by louthy on Friday December 06, 2013 @12:43PM (#6862354)
Runs entirely on the Common Language Runtime: the .NET VM. So no native code is used.
Re:Show HN: NetLua – Completely managed .NET Lua by bigdubs on Friday December 06, 2013 @12:53PM (#6862409)
So, being pedantic, really it means you rely entirely on the GC for memory management. You can run unmanaged code on the CLR.
Re:Show HN: NetLua – Completely managed .NET Lua by pionar on Friday December 06, 2013 @01:12PM (#6862529)
That's not correct. Unmanaged code, by it's definition, is not run on the CLR. It's run natively by the OS, and is compiled to machine code, not IL.

Managed code, on the other hand, by MS' own definition: "All of these languages share a unified set of class libraries and can be encoded into an Intermediate Language (IL). A runtime-aware compiler compiles the IL into native executable code within a managed execution environment that ensures type safety, array bound and index checking, exception handling, and garbage collection." [0]

[0] http://msdn.microsoft.com/en-us/library/windows/desktop/bb31...

EDIT: I should add, that while unmanaged code does not run on the CLR, the CLR does act as a bridge between managed and unmanaged code.

Re:Show HN: NetLua – Completely managed .NET Lua by MaulingMonkey on Friday December 06, 2013 @01:18PM (#6862577)
To expand on this... "So no native code is used." was probably somewhat misleading.

More specifically, no native code is explicitly used. IL may be compiled down to e.g. x86-64, but you won't have a C DLL being PInvoked from your C# (or other .NET language), nor a C++/CLI DLL compiled against x86-64 specifically.

Among other advantages, this usually implies:

  - Less interop overhead (unmanaged <-> managed transitions are expensive)
  - Easier dependency management (just include the assembly instead of assembly + native DLLs via installer or whatever)
  - Portable (more likely to run on e.g. the Mono Runtime on a Linux box with an ARM processor without requiring a build specific to ARM and possibly to Linux)
Re:Show HN: NetLua – Completely managed .NET Lua by f7t7ft7 on Friday December 06, 2013 @01:12PM (#6862530)
That's one aspect, but probably not the most important, given that Lua already has GC without the CLR.
Re:Show HN: NetLua – Completely managed .NET Lua by malkia on Friday December 06, 2013 @01:30PM (#6862659)
Is the Irony parser also managed .net?