6 ms·
Pythonnet – A package that integrates Python (2.7-3.6) with the .NET CLR
- denfromufa 10y agoDownload from PYPI using pip or from Anaconda using conda: https://pypi.python.org/pypi/pythonnet/2.2.2 https://pypi.python.org/pypi/pythonnet/2.2.2 https://anaconda.org/pythonnet/pythonnet https://anaconda.org/pythonnet/pythonnet
- lucb1e 10y agoC# and Python are my two favorite languages, but what would be cool is using .NET without C#, but using C# without .NET. The main reason I don't write C# much of the time is because of the .NET dependency. There has always been Mono and nowadays there even is some Microsoft official version of .NET for Linux-based systems if I remember correctly, but really I'd just like C# to be completely independent of an operating system and independent of $someBigCorp.
- aloisdg 10y ago> C# and Python are my two favorite languages In you want to look into functional world, you will love F#
- denfromufa 10y agoYou can also use pythonnet with F#
- pjmlp 10y agoUsing C# without .NET is like using C without libc or POSIX.
- veli_joza 10y agoThere are many standard C library implementations that target various microprocessors and platforms, that enable us to use C instead of assembler. Bringing more high level languages like C# on these platforms would benefit security and development speed.
- rubber_duck 10y agoHow does removing .NET change anything ? You still need a runtime (GC, reflection/type information for casting, etc.) You could probably strip down .NET core runtime if size is your concern and have an AoT compiled binary that links to that if you're concerned about JIT. I think there was a MS project a while back that compiled .NET IL to static code trough LLVM (https://github.com/dotnet/llilc https://github.com/dotnet/llilc - it seems dead now unfortunately) But C# without .NET doesn't really make sense.
- simooooo 10y agoThere is still ".Net native" which is used for Windows apps and planned to be expanded to console apps etc. You can also run ngen to pre-jit everything
- rubber_duck 10y agoThere's also Mono AoT which is used by Xamarin for iOS. But it would have been nice to have an official .NET Core project that targets LLVM, hope they revive it at some point - the project got abandoned without any announcements from what I can tell.
- pjmlp 10y agoIf you mean CoreRT, it got postponed until they finalize the .NET 2.0 Standard for core. https://blogs.msdn.microsoft.com/dotnet/2016/11/08/the-week-in-net-on-net-on-corert-amp-net-native-enums-net-ylands-markdown-monster/ https://blogs.msdn.microsoft.com/dotnet/2016/11/08/the-week-... https://blogs.msdn.microsoft.com/alphageek/2016/10/13/native-compilation-why-jit-when-you-can-codegen/ https://blogs.msdn.microsoft.com/alphageek/2016/10/13/native...
- rubber_duck 10y agoHmm, does that also mean LILLC (the LLVM based IL AoT) is also suspended ? I hope it's not abandoned - with the upcoming WASM it could be a big deal for .NET to get all the platforms LLVM supports that don't support JIT.
- tedunangst 10y agoPeople do that... A better analogy might be like using objective C without the next step libraries.
- pjmlp 10y agoWhich never got any wide adoption.
- trentnelson 10y agoI love using C without libc or POSIX! (You can do it on Windows if you rely on the Rtl/NT libraries provided by the OS -- i.e. basically develop userland programs as if you were developing a device driver.)
- jmnicolas 10y agoCheck Vala it's a compiled language that is inspired from C#. It's used in ElementaryOS I believe. https://en.wikipedia.org/wiki/Vala_(programming_language) https://en.wikipedia.org/wiki/Vala_(programming_language)
- NoGravitas 10y agoSome (many?) Gnome apps are written in Vala. It takes a language that is basically a subset of C# and compiles it to C with GObjects. If I were going to write a non-trivial Gnome app right now, I'd probably use Vala.
- Beltiras 10y agoI like C# but loathe XAML and WPF. I develop an app with rather simple UI. WPF makes hard things easy but easy things hard. I'm moving to Qt.
- hacker_9 10y agoSo a drag and drop UI designer, followed by a simple binding to a model code behind with literally the words 'Text={Binding Name}' is apparently making 'easy things hard'?
- Beltiras 10y agoI have to do funky validations on textfields. If the validation fails, make the field blink, or show an icon. Never allow a field to have input that fails validation (if you paste an invalid value, don't change the value of the field). I can do this several different ways in HTML and JS, or Java and one of it's UI frameworks (or my pivot framework, Qt). This apparently is hard to do with WPF. I solved it but the solution left me with a bad taste in my mouth. I shudder to think about other 'simple things' that I will have to torture a solution for given my experience. I would entertain the idea that I am a bad coder if I didn't have some experience delivering. I've spoken with a veteran WPF developer to see if I was misunderstanding something but apparently my solution was fine.
- skc 10y agoWhat you just described seems fairly trivial to achieve in WPF to be honest. But it requires you fully embracing the data binding rules of the platform.
- Beltiras 10y agoThat's what I thought. Maybe my "senior dev" connection is not competent. It doesn't really matter thou, I have other reasons to avoid .NET. I have to link against unmanaged C++ and apparently there are inherent memory leaks (memory assigned by UC++ then handed to .NET process can not be freed by .NET).
- denfromufa 10y agoThere is AOT compilation to Native code for subset of .NET features.
- KirinDave 10y agoIs that re-enabled now? I know they demo'd it but then had major problems and pulled it back.
- denfromufa 10y agoHave a look at CoreRT and Mono AOT
- xorxornop 10y agoNope, it works. I've even run C# ARM native code on my Raspberry Pi (Windows IoT)
- maximcus 10y agoNowadays there is a .NET Core, which is platform independent. And I think Microsoft is one of the main reasons why C# and tooling around it is as good as it is. So it is reasonable to say that $someBigCorp can be really good thing.
- oblio 10y agoDotNet core is both cross platform and is in the custody of the DotNet Foundation. Of course Microsoft has the majority of the Foundation members, as they are paying most of the DotNet bills, in the end, but most of DotNet is open these days.
- diimdeep 10y agoNote that this package does not implement Python as a first-class CLR language - it does not produce managed code (IL) from Python code. Rather, it is an integration of the CPython engine with the .NET or Mono runtime. This approach allows you to use use CLR services and continue to use existing Python code and C-based extensions while maintaining native execution speeds for Python code. If you are interested in a pure managed-code implementation of the Python language, you should check out the IronPython project, which is in active development.
- jmnicolas 10y agoI thought IronPython had been abandoned by MS ?
- TomMarius 10y agoThe repo seems active to me https://github.com/IronLanguages/ironpython3 https://github.com/IronLanguages/ironpython3
- pjmlp 10y agoThey still care about Python. https://blogs.msdn.microsoft.com/visualstudio/2015/08/03/why-write-python-in-visual-studio/ https://blogs.msdn.microsoft.com/visualstudio/2015/08/03/why... https://github.com/Microsoft/PTVS/releases https://github.com/Microsoft/PTVS/releases
- denfromufa 10y agoMS open-sourced IronPython and the development is driven by the community now.