[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
You have exactly 30 seconds to answer to everyone on /g/ why
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 90
Thread images: 11
File: csharp3.png (68 KB, 300x300) Image search: [Google]
csharp3.png
68 KB, 300x300
You have exactly 30 seconds to answer to everyone on /g/ why you are not coding in C#.

And... Go!
>>
File: frontpage.png (17 KB, 250x340) Image search: [Google]
frontpage.png
17 KB, 250x340
>>51940305
>And... Go!
Is this a pun?
>>
>>51940305
That's right, because of Go.
>>
I got a real job
>>
Because I took my final for it already. Now it's time for c ++
>>
>>51940337
But there is more .net jobs than haskell or whatever /g/ meme is currently popular.
>>
>>51940354
I always figured /g/ leaned more towards python
>>
Because I started with C++. I would rather learn Java than C#
>>
File: cursive.jpg (57 KB, 992x557) Image search: [Google]
cursive.jpg
57 KB, 992x557
>>51940426
>I would rather learn Java than C#
>>
>>51940305
Visual Studio is a clunky, garbage IDE.
>>
>>51940518
You misspelled God-tier, albeit slow IDE.

It is objectively superior to everything. Best debugger in the world.
>>
>>51940305
because I don't enjoy Microsoft's cock in my anus
>>
the shit is so slow
they originally used c# for windows start bar
it was too fucking slow, they ripped it out and wrote their own library in c
they used c# for the hearts.exe game
its so slow it cant even animate at more than 3-5fps on a 2ghz machine with 2gb ram but no nice GPU

it also leaks memory like a potatoe
>>
>>51940305
Because I'm doing REAL programming with C and a bit of C++
>>
>>51940561
>c# is too slow to write a bar that just sits in the bottom of the screen and doesnt do anything
>>
For most tasks, I either use C or C++, or Ruby. The former two for system programming tasks and anything that needs to perform well, and the latter for anything that needs to be developed extremely quickly. C# does not fit either of these two roles as well as the respective languages I am using.
>>
>>51940573
Yeah and what non-trivial projects have you worked on?
>>
>>51940305
its shit
>>
>>51940561
>>51940588
>The former two for system programming tasks and anything that needs to perform well, and the latter for anything that needs to be developed extremely quickly

You know C# can be compiled to native code right?

https://msdn.microsoft.com/en-us/library/dn584397%28v=vs.110%29.aspx
>>
>>51940636
well plebs?
>>
>>51940305
.NET technologies is where its at. C# was my first language. I had to learn the basics of programming by watching curries program buttons back in 2007
>>
>>51940541
It has a pretty gud debugger. Eclipse is a little autistic to figure out, but tells you more about register
>>
Jabba
>>
>>51941107
Lmao.

Nowadays it's so much better to learn. For any beginners you should get "The Yellow Book" by Rob Miles. It's completely free on his website and he's a professor at University of Hull. Also updates it every year which is great considering it's free tbqh.
>>
Not using windows, and performance is also a factor. Mono also has terrible compatibility with arm.
>>
>>51940305
I learned C# in school, but I work in IT and all i need is perl and powershell
>>
>>51940354
cobol is god tier job security
>>
File: 20150206_023452.jpg (3 MB, 4160x2340) Image search: [Google]
20150206_023452.jpg
3 MB, 4160x2340
I love it so much that I chose Netduino over Arduino
>>
>>51940426
Are you fucking retarded? Java and C# are basically identical, the differences is literally shit like a capital letter instead of lowercase and shit like that
>>
>>51940305
But I am...
>>
File: oVTzEKq.jpg (51 KB, 1200x900) Image search: [Google]
oVTzEKq.jpg
51 KB, 1200x900
>>
>>51940354
And? There are more Java and C++ jobs than C# ones. Probably more C and Python jobs, too.
>>
>>51940636

Simply being able to be compiled to native code does not make a language necessarily useful for system programming.
>>
Two words: referential transparency

Haskell master race
>>
>>51941270
But it does.

It's easier to write meaningful programs in C# and since it can be run with the same performance as Native code there is almost no reason NOT to use it, if developing for Windows.

>>51941226
Wrong. I don't know what part of the world you're from but .net is in significant demand, and the best part is that you don't need to be a wizard computer scientist to actually get employed and started doing stuff with it.
>>
>>51941319
>easier to write meaningful programs in C#
>this being an objective opinion

yeah
>>
>>51941140
No thanks,ill stick to signing up for trial accounts on c b t nuggets, and then getting banned for downloading all of their videos. Fuck books. I need some one to explain new things to me on a sock puppet level
>>
>>51941226
>Java swing
MFW
>>
>>51941336
It's pretty objective desu...

C# is a lot easier to understand and "get started" with for beginners than C++. Something that can be done effortlessly in C# with 1 line requires several in C++.
>>
>>51941200
Yes, I have a disability. It's not funny
>>
>>51940305
Because I have to work with extensive libraries that are written in java. I would quite like to port them, but lack the resources to do so.
>>
>>51940305
I do embedded programming, and C# isn't very good at that.
>>
File: Capture.png (23 KB, 1225x618) Image search: [Google]
Capture.png
23 KB, 1225x618
>>51941336
With things like LINQ, it can be objectively easier to write programs.
This took about a minute to write up in C#.
A single line of code (a long one, but still a single line)
The same code in C++/java would require several for loops with dozens of lines of code.

The meaning of the code is self evident because there's so little of it, and it's in plain english. This saves developer time trying to figure out what your 3 for loops are doing.
>>
>>51941319

>if developing for Windows.
Okay, write a driver with it.
>>
>>51941468
Fuck off retard
>>
>>51941671
Ok I'll just use C to write a driver.
>>
>>51941671
>write a driver with it.
It'll be a bit more difficult than using C++ because the libraries are all in C++ and the driver setup files are set for C++, but frankly it's possible.

C# has full C++ interoperability with native types, native memory (including pointers), can use C++ DLLs, C# can compile to native code (with the newest version of .NET), etc...

You'll likely have to create your own configuration files, but yes, you could build a driver with it. After all, a driver is just a (or more) native DLL(s).
>>
>>51941928

>After all, a driver is just a (or more) native DLL(s).
That runs in ring 0.
>>
I am
>>
>>51942229
What's your point?

Security? C++ code in the past has had way more vulnerabilities than managed C# code. Most vulnerabilities are via buffer overflows, for which C# is immune to.

Performance? C# native performance is like 98% of that of C++

It won't work? It's native code. It should.
>>
>>51942260

>What's your point?
Just an argument of semantics. You shouldn't compare a kernel extension to a shared library.

>Most vulnerabilities are via buffer overflows, for which C# is immune to
Which you're going to lose as soon as you get out of that managed environment and into the kernel, dicking around with raw pointers.
>>
hey anons, i'm learning a bit of c# over my winter break before next semester

what do you guys primarily use c# for and do you have any good examples of good c# code? maybe some good tutorials?
>>
>>51942342
>Just an argument of semantics.
Well then I'm guilty as charged, but that's the reality mate. It's just a library that the kernel will use. Specifically they're .sys files, but effective are the same as DLLs. Don't believe me? Check your windows/system32/drivers folder.

>Which you're going to lose as soon as you get out of that managed environment and into the kernel, dicking around with raw pointers.
Not true in the slightest. You can still use managed types which do checks or just increase the buffer size. You'd only use the native types to interoperate.

For example, you might do all your work on a .NET List<Int32> then when you're done, convert it to a native int array and pass the pointer to a native function. The array would be placed on the heap, so the worst that can happen is corruption of data when you try to convert it back to a List<Int32>. There's 0 chance of executing code that isn't yours.
>>
>>51942357
C# can be used for just about anything that doesnt have to be real time or embedded. Really he only downside is that it isnt cross platform friendly.

Mono can only get you so far but as far as i can see its, gimped.

By embedded i mean minimal stuff like arduino.

You can still make Android and IOS apps in C#
>>
>>51942548
What are the limitations of hooking native processes with managed code and such? Can it even be done?
>>
File: tfw no brown avatar gf.jpg (4 KB, 162x149) Image search: [Google]
tfw no brown avatar gf.jpg
4 KB, 162x149
>>51940305
I can't code...
>>
>>51940367
If /g/ leaned towards python, it's because they're babies who decided to stick with the first language their university or high school taught them.
In reality, people's favored language should either reflect the job market or fads.
>>
>>51942576
I have created a PoC before that would inject a .NET DLL/Assembly
into a target process and execute at a defined entry point.
I was working on function hooking and things of that nature but I haven't gotten around to finishing it.
>>
Because clojure is wayy better
>>
>>51942548
>C# can be used for just about anything that doesn't have to be real time or embedded.
Wrong and wrong.
Depending on optimizations enabled, C# code can achieve almost the same performance as C++ code. If you're looking for down to the wire performance, you should just switch to raw assembly.

C# can be used for embedded systems as well, though you need proprietary hardware/software.
For arduinos there's netduino, an arduino that can execute .NET code.
For the raspberry pi, there's Windows IoT core, which runs a stripped down version of Windows with .NET

>>51942576
Not sure about hooking with C#. If you're wondering about interoperability, using C++ libraries is as easy as just writing the prototype.

[DLLImport("user32.dll")]
private unsafe static extern int GetWindowText(int* hWnd, string lpString, int nMaxCount);
>>
>>51942621
>>51942656
What about the problem of .NET programs just getting simply decompiled?

Is there any legitimate defense against reverse engineering or is it just an inherent flaw?
>>
>>51942869
Depends. If you're using .NET 6 and compiling to native, you're the same off as decompiling raw assembly into C++.

Even if you're using MSIL (non-native code), with optimizations and what not, it's actually quite hard to piece together code.

But if you're adamant about it, you can use an obfuscator tool. It's the same thing with Java. I believe Visual Studio contains a basic obfuscation tool (removes variable/function names and replaces them with random numbers) but there's professional obfuscation tools available.

I can't seem to find an open source one, but turn on optimizations, remove all debug information, use the VS name obfuscator and you're golden.
>>
>>51942913
Damn C# is looking more and more appealing daily tbqh
>>
>>51940305
>You have exactly 30 seconds to answer to everyone on /g/ why you are not coding in C#.

While not being an Applefag or GNU/Linux-tard, but I don't like being tied to a single platform.
>>
>>51942982
I swear there was a VS name obfuscator, but I guess I was wrong. Microsoft does recommend a free "Community edition" of Dotfuscator and explains how to use it here:
https://msdn.microsoft.com/en-us/library/hh977082(v=vs.107).aspx
>>
>>51941200
Please show me how does the LINQ and async/await implementation look like in Java.
>>
>>51941567
Yes, LINQ is the shit!
>>
because python
>>
>>51940305
because it's java with syntactic sugar
>>
>>51941671
Shut your horizontal cunt.
>>
>>51940354
muh stm
>>
>>51942357
The best "tutorial" is to take your old applications you have already written and rewrite them in C#.

Otherwise you will endup reading important shit, that you will not remember, because you never used it.

So... learn LINQ as fast as you can. ReSharper is very helpful for beginners as it can automatically convert loops into linq expressions.

Learn to use async/await as fast as you can - more and more APIs now expect you to handle .NET 4.5+ and asynchronous methods are all over the shop.

If you need some ideas for fun applications... lemme think
Write a Chat program which uses WCF and stores history of chat locally. This will teach you some very important stuff about serialization in .NET world, and you can use some linq there along with asynchronous stuff.

So yeah, enjoy your winter break ;)
>>
Because VB.Net IS C#...
>>
>>51940636
>that target the .NET Framework and Windows 10
>Windows 10
>>
>>51943161
What is the reason most memeware is not written in C#? Is it because of dependency on .net framework?

Has there even been a botnet written in C#?
>>
>>51943015
Can you even use VS anymore without making a gay microsoft account?

Shit would make RMS faint desu
>>
>>51943452
Well....sort of...
Older versions of Visual Studio do not have a login requirement.

Newer versions do.

Though really, you're only required to login during installation if I recall correctly. You can just log out afterwards if you really hate hotmail/outlook accounts.

Also, RMS hates Visual Studio. It's proprietary. C# isn't though.
>>
>Shitty cross plattform support and tooling.
That was easy.
>>
File: wat is this.png (22 KB, 803x536) Image search: [Google]
wat is this.png
22 KB, 803x536
>>51943494
>Though really, you're only required to login during installation if I recall correctly. You can just log out afterwards if you really hate hotmail/outlook accounts

apparently fucking not
>>
File: that's weird.png (32 KB, 833x555) Image search: [Google]
that's weird.png
32 KB, 833x555
>>51943498
Are you sure? I'm able to sign out and it's still licensed.

Try signing in, then out? As I said, you need to login to install a license.
>>
>>51943543
I never logged in in the first place.

I downloaded VS2015 a while ago because I wanted to try Visual C++ after seeing it countless times but never got around to it. Never needed to log in.

Then recently wanted to try C# and the microsoft botnet is requiring an account. I swear if it requests phone verification or something...
>>
It's just a meme, like Windows, which I don't use.
>>
I don't use Windows. Also, the whole way Java and C# handle OOP is retarded.
>>
>>51943569
>Though really, you're only required to login during installation if I recall correctly.
>I never logged in in the first place.

Well, there's your problem then.
>>
>>51943615
Did it require phone verification for you?
>>
File: desu.png (98 KB, 197x257) Image search: [Google]
desu.png
98 KB, 197x257
>>51940305
But I am Anon...
>>
>>51943627
I made my account long ago back when phone verifications weren't a thing and you can just use another account to verify.

If a phone verification is too much, then simply don't use it. We're not forcing you to use C#/visual C++
>>
>>51943660
But i want to use it anon.

I'll see if you can use some fake sms meme to receive the verification although since it's MS they probably are one step ahead.
>>
>>51940305

Because I dont drink paint
>>
>>51941567
>The same code in C++/java would require several for loops with dozens of lines of code.

 set.filter(x -> x.getKey() > 1).sorted((a, b) -> Integer.compare(a.getKey(), b.getKey())).map(a -> a.getValue()).collect(Collectors.joining(" ")) 


10 Franc have been transferred to your baguette balance Pierre.
Thread replies: 90
Thread images: 11

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.