return to table of content

LINQPad – The .NET Programmer's Playground

Nuzzerino
17 replies
1d14h

They don't have Syntax Tree analysis yet but I hear it will be released soon

Notice a common theme here? Literally zero ways to browse C# syntax trees available on the Mac. Nothing in the cloud either from what I could find. Roslyn was open-sourced in April 2014, which was 122 months ago. (edit: Another commenter pointed out that there is in fact a new VS Code extension that can do this, released Aug 2023)

By the way, you can't get autocomplete either while interactively debugging C# outside of Windows. The debugger is proprietary. Maybe there's a way, but I haven't found one.

tablloyd
7 replies
1d12h

Autocomplete works fine interactively debugging on MacOS with JetBrains rider.

Syntax trees can be browsed on https://sharplab.io/ or again via Rider and I'm sure there are some other tools that I'm not aware of.

The Roslyn sdk is part of .NET (cross platform) these days so anyone can use it to build a visualiser should they wish to.

Nuzzerino
3 replies
1d7h

Jetbrains IDEs aren't free (and cost many times more than what is fair for the quality of the product they are known to ship), and SharpLab only has a partial implementation of it: https://github.com/ashmind/SharpLab/issues/616

The Roslyn sdk is part of .NET (cross platform) these days so anyone can use it to build a visualiser should they wish to.

Of course, but for most people that need this, they may just be trying to figure out how to do something as simple as adding an analyzer rule to a project, and don't have the luxury to be able to delay that work to spend weeks cobbling together a visualizer using an SDK that they may only have barely any knowledge with.

There are certain things that don't inspire the kind of passion it takes for volunteers to do this, and therefore it's up to those who have a financial motive to do so. Whether it be the rent-seekers at JetBrains, or someone other than Microsoft and doesn't have an incentive to make a competing OS more viable for developers. Without the .NET foundation's governance model and funding (regardless of who funded it), it would have never made it this far. See: https://github.com/dotnet/vscode-csharp/issues/5276

vunderba
0 replies
1d

Oh for crying out loud, you could not have chosen a worst company to go after for the accusation of "rent seeker."

Jetbrains has offered perpetual fallback licenses for all of their products for years now. This means that as long as you don't need any of the new updates, you can purchase it for a one time fee (basically the equivalent of a single year's license) and then you own it.

As far as their products not being worth what they charge, I pay about $180 per year (15$ / month) for the entire jetbrains library and consistently use CLion (for C and C++), Datagrip (postgres, mongo), Data rider (c#), Web storm (typescript), Phpstorm, and Pycharm. Considering these are the tools of my trade, that's more than a fair asking price.

They've also been incredibly responsive, especially considering the massive upheavals within the company as a result of the invasion of Ukraine by Russia. Whenever I've filed an issue on youtrack, it usually gets a response, and often a bug ticket that's handled within a few version iterations later at most.

paulirwin
0 replies
1d4h

Whether it be the rent-seekers at JetBrains

This is a gratuitously negative comment that is unfair and uses an incorrect metaphor. Rent-seeking is trying to charge for something without providing any new value, usually from something already established as free. I don't believe Rider was ever available for free, but even if it was, they certainly have improved it with loads of new value since then. You're welcome to your opinion (that I don't share) that their IDEs are not worth the cost, but you're also free to not buy them. That's not rent-seeking, it's the free market.

I personally am a big fan of Rider and the JetBrains Toolbox suite, and I get several times more value out of my subscription than it costs. YMMV.

Jenk
0 replies
1d

My full toolbox sub costs less than either my spotify or netflix subs do. Move along.

szundi
2 replies
1d11h

Where would .NET developers be without the Java based IDE, the irony

high_na_euv
0 replies
1d4h

Weird take

Where CPP devs would be without C# based IDE?

Where all devs would be without js/ts based vscode?

SeriousM
0 replies
1d8h

Visual Studio exists long before jetbrains and VSCode is on elecron. I would say java ide is also an essential thing but not the thing that made everything possible.

neonsunset
6 replies
1d13h

Rider.

Also, autocomplete works in VS Code debug tab just fine?

Please stop trying to make the windows point.

Nuzzerino
5 replies
1d7h

What are you talking about? This is well documented.

https://github.com/microsoft/vscode/issues/30065

https://github.com/microsoft/vscode/issues/48810

https://github.com/dotnet/vscode-csharp/issues/1609

https://github.com/dotnet/vscode-csharp/issues/299

https://github.com/microsoft/vscode-dotnettools/issues/573

https://github.com/dotnet/vscode-csharp/issues/5276#issuecom...

https://isdotnetopen.com/

A Rider license costs $419 per year per seat and Jetbrains has a poor quality record by today's standards, and if you are a serious developer that has to use one of their products, you'll find yourself at the mercy of numerous YouTrack tickets that have been open for years. They have a habit of shipping integrations that are only partially working, and then calling it a day (or the better part of a decade).

By the way, Rider may have been cheaper if not for the above moves by Microsoft: https://github.com/dotnet/core/issues/505

neonsunset
2 replies
1d6h

For organizations it is, for users it's $149 annually and then cheaper: https://www.jetbrains.com/rider/buy/?section=personal&billin... It is also free for OSS development, I maintain a couple of .NET libraries and applied for JetBrains free OSS license and they approved it within a week or so. On debugger - Rider uses its own debugger, they do not license it.

Also, please do not link posts from Miguel De Icaza when he isn't in a good mood. He, unfortunately, does not provide constructive and/or unbiased criticism on .NET after moving out to Swift.

I'm not sure what point you are trying to make but current day support for C# on macOS and Linux is very good. It is even in a better shape than many other languages that have been platform-agnostic from the start, yet still don't have such good debugger, static analysis and profiler options.

paulirwin
0 replies
1d4h

And for organizations, it's only $419 for the first year. It's $251/yr from 3+ years on.

It should be noted that $419/year is $35/mo, which is still $10/mo cheaper than the Visual Studio 2022 Professional monthly subscription at $45/mo. $21/mo at 3+ years is less than half.

Nuzzerino
0 replies
1d6h

Not bad faith, these are issues I've been affected by first-hand. And when I have a technical issue I fix it by getting to the root cause, not becoming a vassal to JetBrains.

kinjba11
0 replies
1d1h

I pay $173 per year for JetBrain's 'All Products Pack'. Considering the salary I make as a software engineer, and the quality of the tools JetBrains provides, this is a great investment. Rider works flawlessly for me, far better than VS.

As a side, it always strikes me as ironic that software developers are paid extremely well and yet hesitate to pay even a modest fee for the tools that enable them to do their job. Most "free" tools are not free - someone was paid to create them. IMO whether engineers are on a stable payroll is a differentiating aspect to why some tools succeed and become widely used and some don't. In the case of dev tools, our tech corporatocracy MAMA (Microsoft, Apple, Meta, Alphabet) pay engineers to make products like VS Code, then release for free. This is for eyeballs of course, because charging for the tools would get them nothing in comparison to their main platform revenue streams, which benefit hugely from the network effect.

jayd16
0 replies
1d2h

Your jetbrains hatred is so foreign to me. I think Rider is great and well worth the license.

phito
0 replies
1d11h

Literally zero ways to browse C# syntax trees available on the Mac.

Literally zero? I can count 2 from the top of my head.

3836293648
0 replies
1d10h

Or anything with treesitter support?

vsuperpower2020
11 replies
1d17h

I don't bother making anything run on linux unless it's meant to run as a service. It's just not worth the time and trouble to test it on multiple operating systems, probably with different libraries, just for what is a very vocal minority.

realusername
6 replies
1d9h

Windows has a bit less than half the marketshare for developers according to the last Stackoverflow suvery. By not having a Linux and a MacOS version, you are losing close to half of developers.

Even Microsoft themselves understood this.

justin66
5 replies
1d8h

There are a couple of problems here.

Half of Stack Overflow "developers" might not use Windows, but the relevant population to measure is C# developers.

Assuming as many Linux C# developers will buy the thing as Windows or MacOS developers do is an obvious mistake.

Even Microsoft themselves understood this.

Microsoft understands, among other things, that they can't charge money for Linux tools.

realusername
4 replies
1d7h

There isn't as many C# developers on Linux and MacOS because the experience has been terrible for a long time and still is lacking to a smaller degree, you have the cause reversed.

Microsoft understands, among other things, that they can't charge money for Linux tools.

It's the opposite trend going on, they embrace as much as possible Linux and port as much as they can.

justin66
3 replies
1d6h

It's the opposite trend going on, they embrace as much as possible Linux and port as much as they can.

How much of it is stuff that people actually pay for?

realusername
2 replies
1d5h

Since they just focus on Azure and just milk Windows with ads and let it rot nowadays, I'm guessing it must be very profitable, otherwise they would stop.

justin66
1 replies
1d5h

I'm sure Azure is profitable for Microsoft. Microsoft are not even trying to sell development tools (the category of tools that would include LINQPad) to Linux devs.

realusername
0 replies
1d5h

They don't care about development tools period anymore, they just make most of their business on the cloud and most of it being very dependent on Linux.

giancarlostoro
2 replies
1d17h

I have a really random winforms project I opened up the debug build of on Linux with Mono and had 0 issues. The bar can be very low.

kid64
1 replies
1d9h

Wait, that project actually got off the ground? Is this something you're using in production? What's a good starting point?

n4r9
0 replies
1d8h

Not the comment you're replying to, but I also have a couple of internal winforms projects at work. They make it much easier to diagnose and debug issues with a backend service that works with GIS data, using libraries like GMap.NET. Come to think of it, the company's environment management tool is a Winforms application that gets used in every production instance. For basic UI tooling in a dotnet shop it's second to none.

jagger27
0 replies
1d15h

Or use a Flatpak.

misterflibble
1 replies
1d7h

I wish we could volunteer to help Joe make LINQPad cross-platform, I'd definitely like to help with that.

strayamaaate
0 replies
1d6h

Likewise. Running LINQPad in Parallels just isn’t the same.

Ntrails
0 replies
1d10h

Yeah, I miss it dearly since I got migrated off windows :(

CodeCompost
25 replies
1d21h

Honestly surprised that Microsoft have not bought this up and integrated it into Visual Studio. LINQPad is gold.

fbdab103
17 replies
1d19h

That is true of so many products. Notepad++, Paint.Net, Everything search.

Products which would cost Microsoft absolute peanuts to acquire. Or even just use that as a model and rip it off entirely with an in house version.

gwervc
15 replies
1d19h

It's because Microsoft isn't really serious with C#. For years it has advertised other languages (e.g. JS on WinRT) or runtime (wasm), support in VS Code is still rather interesting, UI frameworks were never made truly multiplatform and the one which supposedly is is still buggy as hell (maui). C# 12 is a pile of crap (C# 13 looks interesting tho).

So in the end it's good all those tools stay independent and focused.

oldmanhorton
9 replies
1d18h

I don't think it's true that C# isn't taken seriously at Microsoft - some of the frameworks on top of C# come and go, but I worked on JS on WinRT briefly and can say it was never, ever "taken seriously" in the way the core C# language and runtime is. If you want to work with azure or windows, C# will be the obvious best choice for the foreseeable future, and if you want to work with C# outside of those verticals I don't think it's a bad or dead end choice either.

mandeepj
7 replies
1d15h

It's because Microsoft isn't really serious with C#

OP is speaking out of thin air. It's one of the best programming languages out there.

devjab
6 replies
1d12h

Best at what exactly? I can’t think of a single thing you would pick C# for instead of Java/Go, C/C++/Rust/Zig, Python or JavaScript/Typescript.

Not because C# is a bad language but because it’s not particularly good at anything. It’s a jack-of-all trades which isn’t even the best jack-of-all trades. So unless you have a lot of years put into it, either in your software stack or in your employees there is very little reason to use it in 2024.

But maybe you know of reasons to use that I’m not aware of?

mandeepj
2 replies
1d4h

Best at what exactly? I can’t think of a single thing you would pick C# for instead of Java/Go, C/C++/Rust/Zig, Python or JavaScript/Typescript.

C# was the first to get async/await, generics, LINQ, PLINQ etc - the path-breaking features that shoot up not only productivity but the ability to do certain things in a much better way.

Just because kids have caught up, it doesn't mean we are going to abandon the daddy.

devjab
1 replies
12h52m

That’s sort of what I said though. You use C# because you used to use it. It’s like that for a lot of languages. I think it’s largely why Java is still around, and the wait paid off considering Java has overtaken C# on many aspects.

but if you were going to pick a tech for a new project without a history of using C#, why would you pick it in 2024? If you’ve got a large .Net stack and a lot of experience with it, it’s still a great choice. I was a c# developer for a decade mind you, and I’m not sure I’ll ever use it again because it sort of lost its foothold despite being in a really great place.

phito
0 replies
9h44m

it sort of lost its foothold

I think you're just in a bubble. dotnet is widely used, and keeps getting better. I can program in many languages and yet csharp will very often be my go to for backend stuff because it's just the best.

phito
0 replies
1d10h

it’s not particularly good at anything

It's extremely good for web APIs, for one.

neonsunset
0 replies
1d8h

Java and Go are both almost unusable at, for example, writing games unlike C# which has rich ecosystem for this, and it has been gaining performance oriented features in every recent version that make it able to compete with C and C++, be it compiler improvements or SIMD API. Meanwhile Java: https://x.com/lemire/status/1803101802700664955?s=46&t=QDsm5...

high_na_euv
0 replies
1d9h

Very good lang, coherent ecosystem, great tooling, well designed std lib

By far the best developer experience I ever had was in C#.

I wish other langs like cpp or c were at least half as good at those as C#

devjab
0 replies
1d12h

I’m not sure I agree with C# being the only first class citizen in Azure. A lot of the Azure stuff like the whole automation is done with Powershell (or Python, but what Microsoft ops people does that?). On the development side of things Microsoft is pushing their container apps platform over their app/function platforms and it integrates with virtually everything.

Even on something like their MSGraph SDKs we’re often getting better performance out of the JavaScript SDKs.

I think it’s a little silly to say that Microsoft isn’t taking C# serious. If you look at Azure DevOps, which has not been taken very serious by Microsoft since they acquired GitHub and then compare it to C# there is just a world of difference. I do think it risks going that way. I’m not sure I think Visual Studio is taken fully serious anymore, but it’s still getting much more attention than Azure DevOps and C# is just… miles ahead of every product in terms of seriousness. I do think they are making it more and more like Typescript, I’m sure we’ll eventually see classes replaced by Types and functions being capable of living on their own, but that’s not really a bad thing.

RachelF
3 replies
1d14h

I agree that MS is not completely serious about C#. They spend too much time on adding new language features but not enough on the essentials: There are big holes and missing bits in the Windows API wrapper that have been there for two decades. Most new MS apps like Teams of VS Code are not written in C#. I suspect it will limp along with hot and cold support from MS.

neonsunset
1 replies
1d12h

What language do you program in?

You can use CsWin32[0] and CsWinRT[1] both of which provide rich generated bindings for their respective APIs. A colleague of mine recently got rid of C++ component thanks to the former, simplifying the solution build.

[0]: https://github.com/microsoft/CsWin32

[1]: https://github.com/microsoft/CsWinRT

RachelF
0 replies
23h36m

Thank you for that!

cgrealy
0 replies
1d10h

The Windows API is no longer the focus for .Net. They are very clearly pushing large scale web apps.

I’d be curious to know what percentage of people are still writing windows clients. I suspect there’s a lot of legacy code still out there, but it’s clearly not the future

pjmlp
0 replies
1d11h

DevDiv, nowadays part of Azure, is serious about .NET.

Unfortunelly WinDev and XBox[0] only cares about C++ and COM nowadays, after they won over the whole Longhorn drama.

[0] - Managed DirectX and XNA were projects pushed by key engineers, folded after they weren't any longer around to argue for their projects.

bobcostas55
0 replies
1d7h

Everything search is the most befuddling one. The delta between Everything and the built-in Windows search can only be described as monumental. A vast gulf. They do not even deserve to be mentioned in the same sentence. Just fucking buy the thing and integrate it, what could they possibly be thinking?

atlantic
4 replies
1d20h

There is already a C# REPL built into Visual Studio, called C# Interactive. It takes a bit of getting used to, but it's not bad at all.

recursive
0 replies
1d20h

Not even in the same zip code.

misterflibble
0 replies
1d7h

Yes I saw the REPL in VS 2022 and Jetbrains Rider, but I still prefer having this utility at hand with a collection of scripts ready whenever I need to script up something, or experiment with a service or database, or learn something new in .NET.

mattmanser
0 replies
1d20h

Echoing the other comment, personally I find the C# interactive really frustrating to use. So close and yet so far.

I often find it quicker/less frustrating to just fire up a new console app project.

Last time I tried to use it I think it was even running an old version of .Net and you have to remember to switch the version.

rqtwteye
0 replies
1d19h

I am glad that they haven't. Usually only a butchered version gets integrated or it gets abandoned after a while.

misterflibble
0 replies
1d7h

LINQPad is probably the most useful mini-IDE that I've ever used and I employ it every single day for .NET prototyping, scripting and experimenting. Joe Albahari's done a great thing with this utility!

smokeydoe
10 replies
1d22h

Also check out free open source alternative RoslynPad. https://roslynpad.net/

Nuzzerino
9 replies
1d20h

The only reason I would use something like LINQPad is for the syntax tree and semantic analysis support, for compiler extensions. With a name like RoslynPad, seems funny that such a feature would be missing from that "alternative"

neonsunset
8 replies
1d19h

If you'd like to explore syntax tree and related IOperations, there is a VS Code extension https://marketplace.visualstudio.com/items?itemName=333fred.... which lets you do just that, it has been very handy for writing source generators.

(though I end up disabling it to reduce extra pressure on language server when it's unneeded)

Nuzzerino
7 replies
1d19h

Again, only on Windows.

neonsunset
6 replies
1d19h

I suppose my ARM-based Mac comes with weird Windows that looks like macOS!

runevault
4 replies
1d13h

Interestingly I tried this on my Dell ubuntu laptop and it doesn't work. May have to try and figure out why at some point.

neonsunset
3 replies
1d13h

Try pre-release version, also needs newer Roslyn version so the SDK needs to be updated too. OS here doesn’t matter.

runevault
2 replies
1d10h

Pretty sure I'm on latest 8 SDK, but did not try pre release of the the addin so that could be it.

neonsunset
1 replies
1d6h

It uses a new Roslyn API to dump SyntaxTree and IOperation's starting at a specific span of source code IIRC, and it shipped in one of the minor version after .NET 8.0.0 release, it took me a bit to get it working upon its release but by this time you should have the necessary SDK, though the relevant extension version may still be marked as pre-release hence my suggestion.

runevault
0 replies
1d4h

I messed with it a little more before going to bed. The prerelease version changed the error and at least felt like it was closer. But I also found there was a new SDK release in the last few days that I have not upgraded yet.

Nuzzerino
0 replies
1d14h

Sorry, you're right, I was using mobile at the time of the reply and thought that was the VS (non code) extension. I'll give it a try.

rqtwteye
3 replies
1d2h

Linqpad is one of the few tools that do what they need to do without much fuzz and in a straightforward manner. Beyond Compare is also in the same category.

I am glad that the UX people haven't gotten around to mess it up yet.

johnnyballgame
2 replies
1d

+1 Beyond Compare. It's been on my list of must installs for every new system I've set up for many years.

gofreddygo
1 replies
1d

For Windows OSes, winmerge [1] has been a solid free alternative to beyond compare for me for years.

[1]: https://winmerge.org

xcjs
0 replies
22h57m

Did they ever get around to three-way merges? That's a must-have if you use Git as a VCS.

rjbwork
3 replies
1d21h

Great piece of software that I basically use for scripting/notebooking. Been writing C# so long it's my lingua franca and this tool lets me do pretty much everything (except actual shell scripting for use on e.g. build servers and deployment pipelines) in C#.

gdev_gabe
2 replies
1d15h

not sure if this is what you meant, but you can run linq files from the command line!

rjbwork
0 replies
1d2h

Yeah for sure. I do set up crons on my local machine using linqpad scripts every now and then, because it's just my special little snowflake one off.

But for Devops, build pipelines, etc. I prefer something a little more universally applicable and legible and that doesn't require a runtime. So bash is usually my approach there. Sometimes PowerShell if I know I'm going to be running it on a Windows box anyway.

Much as I love C#, if I came into an environment and all the Devops/CI/CD was done using Linqpad and lprun I'd immediately wonder what in the actual fuck I had gotten myself into, lol.

NicoJuicy
0 replies
1d8h

Through lprun ofc

mnau
3 replies
1d17h

It's a nice program, but you need to pay to update every version of .net, which is every year.

I used to purchase premium version (single user) and the upgrade option is $97.50 instead of $125 for new license.

ryncewynd
2 replies
1d15h

You pay for every LTS dotnet,so every 2 years. E.g Linqpad .Net8 license also supports .Net9

mnau
0 replies
1d11h

All licenses are perpetual (non-expiring) for the current major version, and include free minor updates.

Major version are: LINQPad 2, 4, 5, 7 and 8. The official page seems to disagree. There is nothing about LTS.

Sure, I can skip 7 and wait for 8, but that kind of defeats the purpose.

LINQPad
0 replies
14h18m

That's correct - we aim to ship a new major version every ~2 years, which for now aligns with every LTS. So LINQPad 8 will support .NET 9 (in fact, it already works with the .NET 9 previews.)

vunderba
2 replies
1d19h

I haven't used Linqpad in a long time but one of the most useful features it had was the ability to add connections to your SQL Server databases and then write quick throwaway LINQ/Lambda style syntax queries against it, e.g.

   radios.GroupBy(x=> x.Channel).Select(x=>x.OrderBy(y=>y.Price)).Select(x=>x.First());
If I remember correctly, it also let you compare the LINQ query against the transpiled SQL so you could try to hand-optimize it a bit as well.

runevault
1 replies
1d18h

I haven't used the .NET Core version but the old one 100% had a view to see the generated sql.

steego
0 replies
1d2h

This is still very much a feature.

I often write/compile .NET Core code in watch mode and then use LinqPad to explore existing libraries.

replwoacause
2 replies
1d4h

I've always wondered why it doesn't provide PowerShell support since it too is built atop .NET

ygra
1 replies
1d

The hosting API is completely different. Roslyn handles VB.NET and C# with basically the same API. Adding PowerShell is akin to writing the core part of all that a second time. Not that it can't be done, but most of the time PowerShell itself is already a capable REPL, so I guess there's also less need for it in LINQPad.

replwoacause
0 replies
20h21m

Thanks for that insight, makes a lot of sense.

loxias
2 replies
1d13h

Borderline dangerous software. If it was reliable and worthy of supporting a stack, it wouldn't be Windows only.

By being Windows only, it conveys "toy" status. Professional database engineers don't use non-Linux, hence I can infer professionals don't use this.

misterflibble
0 replies
1d7h

LINQPad is probably the most useful mini-IDE that I've ever used for .NET development and I employ it every single day for prototyping, scripting and experimenting. Joe Albahari developed it and he's renowned for his C# .NET expertise, so you're in great hands with this utility.

Kwpolska
0 replies
1d11h

This tool is for software engineers, not database engineers. .NET is a Microsoft tool, and one that was tied to Windows for a long time, so most tooling is Windows-only too.

What makes Linux uniquely appropriate for database engineering? Why not *BSD? What OS do you think engineers working with Microsoft SQL Server use?

justgaurav
2 replies
1d14h

A long-time satisfied user of LINQPad. It is one of my must haves. I usually upgrade to the latest one when I hit some framework feature or a piece of snippet which requires it. It started as a very reasonably priced for the paid edition and there was only one paid edition for a long time. Nowadays, it is a bit pricier and has several editions (a suggestion would be to merge Pro and Developer editions).

I use LINQPad to manage my collection of snippets to do some ad hoc tasks on my machine. I also use it for testing out new code and learning about new features. It would be great when it becomes cross-platform, but last I heard Jo Albahari mentioned that the investment required was quite big and not worth it (at that time).

On the side note, I had a chance to see Jo Albahari's presentation few years ago in Sydney and I think he is unsung hero of .NET world (along with Ayende)!

LINQPad
1 replies
14h14m

Regarding a cross-platform version of LINQPad, I'm actively working towards supporting MacOS. I can't give a timeframe right now, but it might be sooner than later if XPF turns out to be a viable option.

misterflibble
0 replies
13h5m

Thank you for LINQPad and for your terrific presentations. They've certainly helped me build up my confidence in .NET development!

ed_elliott_asc
2 replies
1d11h

I’ve never got used to linqpad over just creating a console app and writing code, it may be because I’ve never been one for keeping a collection of snippets?

I’m not against it, I just don’t need it

liversage
0 replies
1d9h

One of many useful features of LINQPad is the output visualizer ("Dump"). Granted, there are now NuGet packages (very likely inspired by LINQPad) that can do something similar in a console app but LINQPad is interactive, allows drill-down and can export to formats like Excel. It's such a productivity boost.

The database integration is also great and allows me to write ad-hoc SQL queries using LINQ.

bertylicious
0 replies
23h58m

That's exactly the kind of thing I always hated about .net -- how the absence of a REPL forces me to create an executable for even the tiniest things. LINQPad solves this beautifully. Not sure if index ranges are inclusive or exclusive? Open LINQPad, double-click tab bar to open a new tab, type `"0123"[..^2]`, press ALT+X, done. I'd never go through the hassle to create an executable with VS for that, so instead I have to look up the documentation which is much more boring. And what's even better: countless times I was wondering what happens inside the framework and because LINQPad comes with ILSpy (I believe so, maybe you'll have to set it up) you can just F12 a framework method to see its source.

RexM
2 replies
1d17h

Is there anything like this for Java. I really miss LINQPad since I’ve moved to a company that uses Java instead of C#.

BadJo0Jo0
1 replies
1d16h

These days across all languages, I just default to a Jupyter notebook.

imachine1980_
0 replies
1d15h

you most likely use linq for query the database in your backend code not for data analytics related

novaleaf
0 replies
1d4h

I came here to say that also. NetPad is great, FOSS. Has all the features I need.

FrustratedMonky
1 replies
1d4h

In the background is this doing anything similar to what a F# typeprovider is doing?

steego
0 replies
1d3h

Yes - When you connect to a database, it generates code for that database using something called a LinqPad Driver.

You can make your own driver as well as use about a dozen of other drivers.

xnorswap
0 replies
1d11h

A true essential tool. One of the few pieces of software for which I own a personal license.

One of the useful features is that it keeps the executable running even after the script has finished, and will re-execute in the same process.

This has some downsides and quirks (if you're not careful, you can double-initialize things like database connections), but has benefits for debugging.

The newer versions have "built in" support for Benchmark.NET too which is a really nice feature for quickly proving code.

thefz
0 replies
1d8h

I bought every major version. Truly a staple of my day to day job when I was working as a programmer. Invaluable scratchpad.

readergreader
0 replies
1d6h

Ditched it after realizing I'd have to pay for every .NET version change, and never looked back.

nlawalker
0 replies
1d12h

I love LINQPad, it reminds me of first learning to program via DrJava in college. Just write and run code, completely free from all the configuration, structure and other concerns related to building and shipping a binary or other deliverable.

kagevf
0 replies
1d18h

This blog has some useful Linqpad tips: https://www.danclarke.com/linqpad-tips-and-tricks

In particular, keyboard shortcuts to toggle visibility on the different sub-windows, and using the Util class to prompt for a password I find to be useful.

judah
0 replies
1d19h

I've been a happy paid user of LINQPad for over 8 years now. Love it, well worth the price.

jasomill
0 replies
20h55m

As someone with a strong bias towards interactive, investigative, "library-first" development, LINQPad is an essential part of my C# toolkit, as every other C# REPL and interactive environment I've tried has come up short in one significant way or another.

Essential LINQPad productivity features for me include:

1. Flexible visualization tools with sensible defaults and one-click export.

2. Ability to easily round-trip copy/paste code snippets between LINQPad and external IDE projects with minimal fuss (e.g., no boilerplate required for expressions, statements, or simple functions).

3. Automatic reloading of libraries I'm working on externally in an IDE with minimal IDE rebuild interference.

3. Completion on par with VS.

4. One-click document cloning.

5. NuGet integration, including the ability to search for and update referenced packages.

6. A simple, built-in debugger.

A typical LINQPad workflow for me (excluding tasks like writing documentation and unit tests for brevity):

1. Start with a task of accessing or exporting data from either a set of files in an unknown format or from an application — ideally, but not always, a Web application — without a documented API.

2. Create a library project in Rider or VS and a LINQPad document referencing the library.

3. Investigate the files or application interactively using LINQPad and other tools (hex editors for investigating binary formats, jq/IPython/PowerShell for JSON and XML, browser dev tools for Web apps, accessibility tools when automating Windows desktop apps, etc.).

4. Add data access mechanisms to the library.

5. Repeat steps 3 and 4 as necessary, with more and more work being done in LINQPad via the library on each iteration.

6. Build simple command-line or graphical tools on top of the library to allow non-programmers to access or export data from similar systems in the future without LINQPad. In cases where non-UI logic in these tools becomes non-trivial, I'll typically prototype this logic in LINQPad and extract it into a library, as well.

Finally, as new requirements arise, I can load up existing libraries and LINQPad to analyze and prototype solutions, often leading to initial results delivered to customers in minutes rather than hours.

gsck
0 replies
1d9h

I stumbled across this the other day, I was given an old SQL Server Compact database and needed to dump out some information from it, and LINQPad was the first program that was recommended.

Unfortunately the DB was SQLServer Compact 3.5 and for whatever reason LINQPad couldn't find the required assemblies to open it which was a shame

figers
0 replies
1d19h

Thought with a name like that it was for the iPad, wish it was...

enb
0 replies
1d6h

Haven’t used it in a while but it was essential in helping me understand how the bcl and c# features behaved and worked. I love it

deanebarker
0 replies
1d8h

I use this constantly. Every single day. I have hundreds of scripts that run in it. It's just wildly valuable and useful.

bilekas
0 replies
1d19h

I used to use this a few years back when my company was paying for it, but nowadays I dont work too much with dotnet but for all playground little things I use ideone.com it does it all in the browser.

alhsn
0 replies
1d

Awsome tool which I used for a while. Then I switched to RosylnPad because it was enough for my use cases, and it included intellecense.

Nowadays, I am looking for a notebook style editor (like jupyter notebook) that supports dotnet well and works with VS Code. I tried Polygot notebook a while back, but it kept crashing, so I un-installed it.

XajniN
0 replies
14h27m

If you’re using Sublime Text, you can install dotnet-script [1] and set up a new build system for .NET like this:

{ "file_patterns": ["*.cs"], "cmd": ["dotnet-script", "$file"] }

[1] https://github.com/dotnet-script/dotnet-script

NicoJuicy
0 replies
1d12h

I've setup linqpad as a CMS for scripts and distributed it over nuget for support scripts.

Including login and etc.

Linqpad is great

MikeGale
0 replies
1d20h

The program is gold. It enables you to speedily and almost effortlessly build up code, in a way that I haven't seen elsewhere.