We now support code syntax in posts

Aurich

Creative Director
33,335
Ars Staff
The following BBcode will give you language specific highlighting:

[CODE=xxxx]

The languages supported are:

apacheconf
applescript
aspnet
bash
c
clike
coffeescript
cpp
csharp
css
diff
git
html
http
ini
java
javascript
json
jsx
less
makefile
markdown
nginx
objectivec
perl
php
python
ruby
sass
scss
sql
svg
swift
wiki
xml
yaml
 

Defenestrar

Senator
13,530
Subscriptor++
Sorry, I was being a smart alec. I haven't seriously coded in a text-based language in years, or (decades for some of the ones I listed).

The only one I occasionally use these days is LabVIEW, which is a graphical language and results in code that looks like this:
Spagetti-Code-in-LabVIEW-1024x658.png

Although that's a nightmarish example.

I do think it's awesome how code now displays as a much more readable format.

Python:
#My very first Python Program - written right here
print('Hello world!')
 

Aurich

Creative Director
33,335
Ars Staff
Ooh, I love how it appends the language automatically too, didn't know it would do that. Even handles */ commenting, which is nice.

C:
void flynnFlicker() {          // basic sign lit, with the N flickering
  int letterN = RING_END + 3;  // location of letter N
  fill_solid(leds + RING_END, NUM_LEDS - RING_END, CHSV(10, 255, 255));  // orange red for FLYNN letters
  /*
  if (random(20) == 0) {                                                                // 5% chance of full letters doing a small pulse
    fill_solid(leds + RING_END, NUM_LEDS - RING_END, CHSV(10, 255, random(200, 255)));  // orange red for all letters
  }
  */
  if (random(5) == 0) {  // 20% chance of N flicker state changing
    // generate a random brightness, and then clamp it to hard on or off at low and high values
    int lightN = random(255);
    if (lightN < 100) {
      lightN = 0;
    }
    if (lightN > 200) {
      lightN = 255;
    }
    leds[letterN] = CHSV(10, 255, lightN);
  }
}  // end flynnFlicker

That's the lighting code for this:

 

MilleniX

Ars Tribunus Angusticlavius
6,865
Subscriptor++
Sorry, I was being a smart alec. I haven't seriously coded in a text-based language in years, or (decades for some of the ones I listed).

The only one I occasionally use these days is LabVIEW, which is a graphical language and results in code that looks like this:
Spagetti-Code-in-LabVIEW-1024x658.png

Although that's a nightmarish example.

I do think it's awesome how code now displays as a much more readable format.

Python:
#My very first Python Program - written right here
print('Hello world!')
LabVIEW does have a textual representation. I know people who program it that way.
 

Mat8iou

Ars Praefectus
4,963
Subscriptor
Wait, where is VB6?



Kidding ;)
Having no VBA OTOH does seem an odd omission - like it or not, it remains the default macro language in a lot of apps - and not just MS ones.

Meanwhile I'm still using AutoLISP to create tools at work.

But - having something is still a lot better than nothing - which was the previous situation.

Does anything have such a vast list of languages as Notepad++ though (I'm assuming Emacs probably would).

Are there still people out there using Visual FoxPro?
Intrigued to also see Wavefront .OBJ files on that list - Way back in 1997, the first release of Java with the Hot Java browser had a demo file showing 3D wireframes rotating. I wanted to try to use this to provide 3D illustrations of some concepts for my Uni dissertation. The input files for it was .OBJ format and all I could output was DXF from AutoCAD - so I reverse engineered the relevant parts of both formats (this was a time when I had no internet access at home) and wrote a converter in Qbasic. It wasn't elegant, but it worked and I got my little spinning wireframe models. I don;t thnik I've ever touched (or even come across) an OBJ file since though.
 
  • Like
Reactions: jeffdill2

jeffdill2

Smack-Fu Master, in training
1
Having no VBA OTOH does seem an odd omission - like it or not, it remains the default macro language in a lot of apps - and not just MS ones.

Meanwhile I'm still using AutoLISP to create tools at work.

But - having something is still a lot better than nothing - which was the previous situation.

Does anything have such a vast list of languages as Notepad++ though (I'm assuming Emacs probably would).

Are there still people out there using Visual FoxPro?
Intrigued to also see Wavefront .OBJ files on that list - Way back in 1997, the first release of Java with the Hot Java browser had a demo file showing 3D wireframes rotating. I wanted to try to use this to provide 3D illustrations of some concepts for my Uni dissertation. The input files for it was .OBJ format and all I could output was DXF from AutoCAD - so I reverse engineered the relevant parts of both formats (this was a time when I had no internet access at home) and wrote a converter in Qbasic. It wasn't elegant, but it worked and I got my little spinning wireframe models. I don;t thnik I've ever touched (or even come across) an OBJ file since though.

VFP is the language I cut my programming teeth on, so it still holds a special place in my heart. 😄
 
  • Like
Reactions: steelghost