I’m curious as to what your favourite programming language/ framework/library is?
I for one am flexible but loathe assembly.
I for one am flexible but loathe assembly.
I like those JS frameworks, yeah, much more readable and efficient than legacy jQueryAs for frameworks: the best are typically ones I have written myself from basic components like Compojure. But things like Angular.JS and React are sort of nice too.
Why do you say F# changes your way of thinking? How does it compare to C#?My favorite language is probably C#, because it's so useful across a wide variety of use cases, but more realistically, it's probably because it's the language + platform I'm most productive with. I like that it's a living language with relatively short LTS cycles, to keep things moving forward.
I also really like F#, but mostly to play with and work on my functional programming thinking with. It changes the way you see problems and composition of types within a large program.
I'd like to play with Rust someday.
Oh yes <3 Gotta avoid all the database individual setups!Framework; clearly Django, the admin functionality is unequalled yet, and is really a game changer for many web projects.
It's the classic Clojure routing library. Not really a framework, but a handy tool to build something with.Never heard of Compojure though? I reckon that's not used much.
Do the first ten Project Euler problems in F# or OCaml and then you tell me.I like those JS frameworks, yeah, much more readable and efficient than legacy jQuery
Never heard of Compojure though? I reckon that's not used much.
Why do you say F# changes your way of thinking? How does it compare to C#?
Oh yes <3 Gotta avoid all the database individual setups!
fold f i [] = i
fold f i x:xs = f x (fold f i xs)
fold
is a function that takes three parameters. The third one is a list of elements of type t. The second one is of type u. The first one is a function that takes a t and a u parameter, and returns a u.x
and its tail is xs
(so in [1, 2, ,3], x = 1
, xs = [2, 3]
.fold (+) 0 [1, 2, 3]
, where (+)
is the sum function. The t and u types are ints; 0 is an int, the list is a list of ints, and the sum function takes two ints and returns another int.fold (+) 0 [1,2,3] # we apply the second pattern
= (+) 1 (fold (+) 0 [2 3] # ditto
= (+) 1 ((+) 2 (fold (+) 0 [3])) # ...
= (+) 1 ((+) 2 ((+) 3 (fold (+) 0 []))) # now we must apply the first definition
= (+) 1 ((+) 2 ((+) 3 (0))) # now we apply (+) a b = a + b
= (+) 1 ((+) 2 3)
= (+) 1 5
= 6
sum = fold (+) 0
; notice that there's nothing that looks like a list there; the term to Google is "currying". And that also leads to stuff such as thinking about what is the result of multiplying an empty list of numbers var results = collection
.SelectMany(e => _something.Whatever(e)) // map and flatten a collection of collections
.Where(e => _filter.IsMatch(e)) // filter
.Select(e => _cpuIntense.DoWork(e)) // map
.Distinct()
.ToList();
.AsParallel()
where it makes sense to do so. I'd probably write a little microbenchmark using Benchmark.NET to see whether it was more advantageous to put it before the SelectMany
or the Select
. .AsParallel
will automagically split your tasks across the available CPU cores. Very handy for compute-heavy tasks, but it's not magic, and you have to be thoughtful about where you apply it. (I wouldn't use AsParallel inside a type that was being orchestrated at a higher level with AsParallel. You can do it, but perf tends to get worse. So you consider the whole system, and use it where it makes sense.)Reminds me of emacs, elisp, and eshell. All of which combined with tramp make a really handy way of dealing with remote machines.From 1986 onwards, you could also enter lispe expressions directly on this command line.
Yes - probably the most similar comparison I'm aware of.Reminds me of emacs, elisp, and eshell. All of which combined with tramp make a really handy way of dealing with remote machines.
My first experience was on the BBC Micro Model B.My other favourite language is BASIC because that's what I started with back in the 90s on Windows 3.11, and I love all those Boot-to-BASIC microcomputers of the 80s. It's nice to be at the keyboard on any model from that time period, and be able to whip up a fun little tech demo in a couple of minutes without having to read any hardware-specific documentation.
My last few jobs have involved only a tiny bit of SQL and I really miss it. Day to day problem solving in SQL always felt like much more of a fun 'puzzle' than day to day problem solving in generic service layer code, and optimising queries was so much fun too. If I could do my hobby programming in SQL, it miiiiight be my favourite, but I can't.As an aside, I gotta say, I love declarative languages like SQL and Terraform Script.
And why so few (il any) swift thread in this forum ?My favourite would either be C# or Swift. Both have sore points and both are missing features from the other, but they're both mostly lovely to work with.
I don't know...maybe it's such an easy to use language no-one needs any help with it? Or maybe it's really boring? Plenty of people use it, so it can't be a lack of users.And why so few (il any) swift thread in this forum ?
Feel free to start your own!And why so few (il any) swift thread in this forum ?
In any internet community, there's usually a small handful of people that do the majority of the heavy lifting in terms of perpetuating conversation. I'm one of those people. For whatever reason, I've always been at MS places. If I'd wound up at Amazon or something, I'd probably be talking a lot about Java, and we'd be discussing how Java-centric this place is.This forum is a sampling of the real world, which is likely not very representative of the general programming population. (Look at perpetual threads, C# >> Rust, that's a pretty strange picture- even if both are popular. I think this forum leans a bit MS-y [nothing wrong with that], so a mostly-Apple ecosystem language is likely underrepresented here.)
Plus, I suspect there are many well-known good Swift (and Apple programming in general) communities out there.
I find Swift very interesting, but time is finite and while there's some support for using Swift outside Apple devices, I think it doesn't have a lot of legs yet (and... I think that's a shame).
I'm kinda falling into the I want an "easy Rust" meme. F#/Ocaml seem to be that... but I can't seem to get motivated to work on those, for some reason. I was pondering playing a bit more with Dart (yes, there's a lot of doom and gloom about that...).
Yeah, the ObjC MVC stuff was mostly really nice. Nowadays SwiftUI seems the way forward. Like pretty much anything Apple, when it works it's the best thing around, but when it doesn't it's stupefyingly frustrating. I still really like it though, the idea is good, it's just that the implementation isn't mature yet.In terms of framework, I thought the XCode / Objective-C / MVC thing was pretty well laid out, I'm assuming they stuck with MVC when switching to Swift?
For language, I'm going with Autolisp.
It was the first time that I saw a macro language integrated so neatly in a program - and with such a low barrier to entry.
For those unaware, AutoCAD historically ran mostly off a command line, with the mouse only used for selecting, snapping to items.
From 1986 onwards, you could also enter lispe expressions directly on this command line.
Drawing a circle and want to give a calculated radius - you can just enter a lisp expression rather than getting a calculator and then entering the number. All you need to understand is Polish notation.
Using a few commands togather more than a few times - just write a brief lisp routine to tie them together, then put c: before the function name and the function can be treated like a any other command built into the software.
Don't get me wrong - it was not without it's glitches and for reasons best known to AutoDesk has not really been updated in over 20 years - but the way it just tied s seamlessly into the way you used the program meant that there was no real throught about adding basic macros - you could just type them in and then carry on working, using the new command you had created. It lacks some key features of Common Lisp that it was based on and doesn't have the elegance of Scheme, or the more modern features of Clojure etc - but it does what it does well. If you want to write a complex add-on, then go for Object ARX or whatever (basically C++ based app specific DLL creation), but if you want to make your day quicker without having to leave your normal work environment it's brilliant.
None of the other options for extending the software (DIESEL, VBA, VBA.NET, ARX, Object ARX etc) have ever worked so neatly as this.
Some other CAD software copied AutoLisp as a feature. The software that doesn't is generally far less easy to customise.
AutoLISP - Wikipedia
en.wikipedia.org
I do quite a lot of AutoCAD development, but I use the .NET API.I learned enough Autolisp to be extremely efficient in AutoCAD using macros and the keyboard, while others were using old school tablets and pulldown menus. I didn't really care for the language itself compared to others, but it got the job done. Autolisp was awesome for answering all of the text based questions versus manipulating the GUI boxes that made AutoCAD easier to use.
There are sub-specialties of programming. Some of us are database programmers, some of us write purely command line software, some of us are systems programmers, some of us are data engineers, some of us do scientific computing, etc.This forum is a sampling of the real world, which is likely not very representative of the general programming population. (Look at perpetual threads, C# >> Rust, that's a pretty strange picture- even if both are popular. I think this forum leans a bit MS-y [nothing wrong with that], so a mostly-Apple ecosystem language is likely underrepresented here.)
I'm not familiar with GCP at all, but just a cursory googling shows Swift is supported using GCR, swift.org has an article about it, amongst others. You can run Swift apps/functions in AWS and Azure too, and Apple have a Swift on Server working group for getting more traction and support in the whole cloud/server/serverless space.And with more and more stuff being done in the cloud, there is absolutely nothing you can do in the cloud with Swift.
Which shouldn't be surprising, after all, you can install pretty much anything on a VM and all cloud providers offer that.I'm not familiar with GCP at all, but just a cursory googling shows Swift is supported using GCR, swift.org has an article about it, amongst others. You can run Swift apps/functions in AWS and Azure too, and Apple have a Swift on Server working group for getting more traction and support in the whole cloud/server/serverless space.
List.map
, List.filter
, etc.Yeah, I don't think that really counts as "supported". Even using GCR, you're basically recommended to install Swift from scratch in a container. That level of support is the same as installing Brainfuck, and then running code written in Brainfuck that way.Which shouldn't be surprising, after all, you can install pretty much anything on a VM and all cloud providers offer that.
from google.cloud import bigquery
# Construct a BigQuery client object.
client = bigquery.Client()