Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Random AT Survey regarding programming languages
- ZZC12345
- Scratcher
500+ posts
Random AT Survey regarding programming languages
Just curious:
A) What programming languages do you know? Like, is PHP still a thing?
B) How many projects are you working on (incomplete)? I have a nice pattern of *start project*, *work on project for 5 months* *start new project, claiming to be “taking a break”* *come back to project after 1 year and almost finish it* (I would host them on a website but I'm not allowed to)
Please answer in this format (and yes, in a [code])
like this:
I'm going to make a chart out of this later so stick to the format.
Please use the names from this Wikipedia article.
Note from Wikipedia:
You can still post responses, I'll recompile the chart if anyone does (or you can yourself).
Code to generate (if you care):
Runs in NodeJS and the browser.
If on NodeJS, the code writes to `output/output.txt` by default but that can be changed by setting the `OUTPUT_FILE` constant. You must install `node-fetch`. If on the browser, it simply `console.log`s the output.
A) What programming languages do you know? Like, is PHP still a thing?
B) How many projects are you working on (incomplete)? I have a nice pattern of *start project*, *work on project for 5 months* *start new project, claiming to be “taking a break”* *come back to project after 1 year and almost finish it* (I would host them on a website but I'm not allowed to)
Please answer in this format (and yes, in a [code])
{comma delimited list of programming languages}
{int}
a,b
999
I'm going to make a chart out of this later so stick to the format.
Please use the names from this Wikipedia article.
Note from Wikipedia:
A programming language does not need to be imperative or Turing-complete, but must be executable and so does not include markups such as HTML or XML
RESULTS
┎────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┒
┃ AT PROGRAMMING LANGUAGES - @ZZC12345 - https://scratch.mit.edu/discuss/topic/618337/ ┃
┃ ┃
┃ 16 ┃
┃ ████ 15 ┃
┃ ████ ████ 14 ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ 7 ┃
┃ ████ ████ ████ ████ ┃
┃ ████ ████ ████ ████ 5 5 ┃
┃ ████ ████ ████ ████ ████ ████ ┃
┃ ████ ████ ████ ████ ████ ████ 3 3 3 3 ┃
┃ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ 2 2 2 ┃
┃ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ┃
┃ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ┃
┃ ┃
┃ Python JavaScript Scratch C++ TypeScript Lua Bash Java SQL C Ruby C# Rust Kotlin App Invento… CoffeeScript Snap! WebAssembly BASIC Batch File GDScript LC-3 MATLAB NXC NXT-G R Squeak Tynker VBScript Batch Grasshopper Solidity Fish Nasm Z Shell ┃
┖────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┚
┎───────────────────────────────────────────────────────────┒
┃ On average, people have 4 unfinished projects. Median: 4. ┃ I mapped some names to others for consistency and removed some JS libraries claiming to be languages. I also edited some project counts to not offset the average.
┖───────────────────────────────────────────────────────────┚
Code to generate (if you care):
Runs in NodeJS and the browser.
// @ts-check const TITLE = "AT PROGRAMMING LANGUAGES - @ZZC12345 - https://scratch.mit.edu/discuss/topic/618337/"; const NOTE = "I mapped some names to others for consistency and removed some JS libraries claiming to be languages. I also edited some project counts to not offset the average."; const TOPIC = 618337; const LANGUAGE_MAP = { "js": "javascript", "a little python": "python", "a little lua": "lua", }; const LANGUAGE_CAPITALS_MAP = { "javascript": "JavaScript", "webassembly": "WebAssembly", "sql": "SQL", "coffeescript": "CoffeeScript", "typescript": "TypeScript", "vbscript": "VBScript", "nxt-g": "NXT-G", "nxc": "NXC", "matlab": "MATLAB", "lc-3": "LC-3", "gdscript": "GDScript" }; const FULL_BLOCK = "█"; const EMPTY_BLOCK = " "; const COLUMN_WIDTH = 12; const COLUMN_HEIGHT = 20; const BAR_WIDTH = 4; const OUTPUT_FILE = "output/output.txt"; const MAX_PROJECT_COUNT = 15; const SCRATCHDB_HOST = "https://scratchdb.lefty.one"; const BLACKLISTED_LANGUAGES = ["ecmascript", "imba", "deno", "blockly", "node.js", "verilog", "visual basic"]; void (async () => { let isNode = true; let fs; let fetch; try { fs = (await import('fs/promises')).default; fetch = (await import('node-fetch')).default; isNode = true; } catch (e) { isNode = false; fetch = window.fetch; } const art = await generateDiagram(); if (isNode) { // @ts-ignore await fs.writeFile(OUTPUT_FILE, art); console.log("Wrote ASCII art to", OUTPUT_FILE); } else { console.log(art); } async function generateDiagram() { console.log("Fetching data from ScratchDB"); let posts = []; let morePages = true; let page = 0; do { const res = await fetch(`${SCRATCHDB_HOST}/v3/forum/topic/posts/${TOPIC}/${page}`); const body = await res.json(); // @ts-ignore if (body.error && body.error === "NoMorePostsError") { morePages = false; } else { // @ts-ignore posts.push(...body); page++; } } while (morePages); posts = posts // @ts-ignore .sort((a, b) => new Date(a.time.posted) - new Date(b.time.posted)) // sort newest to oldest .slice(1); // Remove the first post containing the example console.log("Parsing BBCode"); /** * @param {string | any[]} src */ function walkAndStripQuotes(src) { let output = ""; let quoteLayers = 0; const startQuote = "[quote"; const endQuote = "[/quote]"; for (let i = 0; i < src.length; i++) { const char = src[i]; if (src.slice(i, i + startQuote.length) === startQuote) { quoteLayers += 1; i += startQuote.length; continue; } if (src.slice(i, endQuote.length) === endQuote) { quoteLayers -= 1; i += endQuote.length; continue; } if (quoteLayers === 0) { output += char; continue; } } return output; } /** * @param {string} src */ function findCode(src) { const res = /\[code\]([\s\S]*?)\[\/code\]/.exec(src); if (res) { return res[1].trim(); } else { return null; } } /** * @param {string} src */ function getData(src) { const code = findCode(src); if (!code) return; const parts = code.split(/[\n\r]+/); const languages = parts[0] .split(/, ?/g) .map(a => { const language = a.replace(/ ?\([\s\S]*?\) ?/, "").toLowerCase(); if (language in LANGUAGE_MAP) { return LANGUAGE_MAP[language]; } else { return language; } }); const projectCount = Number((/[0-9]+/.exec(parts[1]) ?? ["0"])[0]); return { languages, projectCount } } /** * @type {{ [s: string]: number; }} */ const languages = {}; let projectCounts = []; for (const post of posts) { const bbcode = walkAndStripQuotes(post.content.bb); const data = getData(bbcode); if (!data) continue; // post with no data for (const language of data.languages) { if (BLACKLISTED_LANGUAGES.includes(language)) continue; const normalizedLanguage = LANGUAGE_CAPITALS_MAP[language] || toTitleCase(language); if (!languages[normalizedLanguage]) languages[normalizedLanguage] = 0; languages[normalizedLanguage]++; } projectCounts.push(data.projectCount); } projectCounts = projectCounts.map(a => Math.min(a, MAX_PROJECT_COUNT)); /** * @param {string} str * @returns {string} */ function toTitleCase(str) { return str.replace( /\w\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase(); } ); } /** * Returns an array of rows representing a AsciiArt column. * * @param {number} fraction Fraction of column filled * @param {string} label Label at bottom of column * @param {number} labelNumber Count * @returns {string[]} */ function getAsciiArtColumn( fraction, label, labelNumber, height = COLUMN_HEIGHT, width = COLUMN_WIDTH, barWidth = BAR_WIDTH, ) { const output = (new Array(height)).fill([]); const spacing = width / 2 - barWidth / 2; const barAreaHeight = height - 3; const barHeight = Math.round(barAreaHeight * fraction); if (label.length > width) { label = label.slice(0, width - 1) + "…"; } else { const emptySpace = width - label.length; label = EMPTY_BLOCK.repeat(Math.floor(emptySpace / 2)) + label; } const topLabel = String(labelNumber); for (let i = 0; i < height; i++) { if (i < barAreaHeight + 1) { // bar if (i === barAreaHeight - barHeight) { const leftPadding = Math.floor((width - topLabel.length) / 2) output[i] = EMPTY_BLOCK.repeat(leftPadding) + labelNumber + EMPTY_BLOCK.repeat(width - topLabel.length - leftPadding); } else if (i > barAreaHeight - barHeight) { // draw bar output[i] = EMPTY_BLOCK.repeat(spacing) + FULL_BLOCK.repeat(barWidth) + EMPTY_BLOCK.repeat(spacing); } else { output[i] = EMPTY_BLOCK.repeat(width); } } else if (i === barAreaHeight + 1) { output[i] = EMPTY_BLOCK.repeat(width); } else { output[i] = label + EMPTY_BLOCK.repeat(width - label.length); } output[i] += EMPTY_BLOCK; // spacer } return output; } /** * @param {number[]} values */ function median(values) { values.sort((a, b) => a - b); const half = Math.floor(values.length / 2); if (values.length % 2) return values[half]; return (values[half - 1] + values[half]) / 2; } /** * @param {{ [s: string]: number; }} languages */ function getAsciiArt(languages) { const rows = (new Array(COLUMN_HEIGHT)).fill([]); const maxLang = Math.max(...Object.values(languages)); for (const language in languages) { const column = getAsciiArtColumn(languages[language] / maxLang, language, languages[language]); column.forEach((value, index) => { rows[index] += value; }); } const width = rows[0].length; const title = TITLE + EMPTY_BLOCK.repeat(width - TITLE.length); const averageProjectCount = Math.round(projectCounts.reduce((a, b) => a + b) / projectCounts.length); const medianProjectCount = median(projectCounts); const projectCountMsg = ` On average, people have ${averageProjectCount} unfinished projects. Median: ${medianProjectCount}. `; const art = ` ┎${"─".repeat(width + 1)}┒ ┃ ${title}┃ ┃ ${EMPTY_BLOCK.repeat(width)}┃ ┃ ${rows.join("┃\n ┃ ")}┃ ┖${"─".repeat(width + 1)}┚ ┎${"─".repeat(projectCountMsg.length)}┒ ┃${projectCountMsg}┃ ${NOTE} ┖${"─".repeat(projectCountMsg.length)}┚`; return art; } console.log("Generating ASCII art"); return getAsciiArt(languages); } })()
Last edited by ZZC12345 (Aug. 7, 2022 08:30:42)
This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- ZZC12345
- Scratcher
500+ posts
Random AT Survey regarding programming languages
For me,
And yes, apparently Wikipedia counts block coding too. I don't actually know that many other languages.
JavaScript,Kotlin,Python,TypeScript,Scratch,App Inventor for Android's visual block language (MIT App Inventor),Blockly
4
Last edited by ZZC12345 (July 15, 2022 11:41:41)
This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- DifferentDance8
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
python, js, c++, scratch
1
To be honest, I don't know much JS and C++, and I probably know at most the intermediates of python. The 1 project I work on is Seartch.
Last edited by DifferentDance8 (July 15, 2022 12:35:05)
Mod's Protogen Maker v2 released. I will update it when I will update it
- ZZC12345
- Scratcher
500+ posts
Random AT Survey regarding programming languages
Sorry, to clarify – put your elaborations outside the code block since I'm going to parse it using RegExp. And the {} were just placeholders sorry lol{python, a little js, a little c++}
{1 (Seartch)}
Last edited by ZZC12345 (July 15, 2022 11:43:07)
This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- NFlex23
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
JavaScript,TypeScript,Node.js,Deno,CoffeeScript,Imba,Python,Ruby,Scratch
2
Help improve the Advanced Topics (Really!)
Before you create a topic:
Always search for duplicates or other similar topics before making an umbrella topic, e.g., “The Mac Topic”.
- Is it about something you are planning on making but haven't made yet? If so, please wait to post until you have created a working prototype. This is a key factor to keeping the ATs as clean as possible.
- The ATs aren't technical support. It is perfectly valid to ask questions about things related to programming, but not issues with external websites, apps, or devices. Most sites have their own support system; try asking there!
- Is it related to something you are making in Scratch? (This includes OSes and other Scratch projects) If so, please post in Collaboration, Show and Tell, or another similar forum.
- Is your topic questionably “advanced”? Try browsing the other forums to see if your topic fits better in one of those.
- Issues with Scratch itself should be put in Bugs and Glitches.
- skymover1239
- Scratcher
500+ posts
Random AT Survey regarding programming languages
js, python, bash
1
For God so loved the world that he gave his one and only Son that whoever believes in him shall not perish but have eternal life
First time a moderator got ninjaed??
500 Posts
Current Mainline projects
AquaCSS - A CSS framework.
Ink - An editor that does, lots of things.
500 Posts
Current Mainline projects
AquaCSS - A CSS framework.
Ink - An editor that does, lots of things.
- Socialix
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
scratch (i dont know how to properly use days since 2000), a little python (i gave up), a little lua (don't ask why)
16329271 (i can't stay motivated)
socialix - why is there a penguin breaking my window? - signatures are overrated
- DifferentDance8
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
At the very least a program of fizzbuzz running. the list would be far too long, I know at least one line of code from like 20+ languages already. What's the requirement?
Mod's Protogen Maker v2 released. I will update it when I will update it
- uwv
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
Typescript, Javascript, Java, C++, C#, Python
10+
i use arch linux (btw) with the linux zen kernel and enjoy writing silly things in silly languages using silly frameworks
- DifferentDance8
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
https://en.wikipedia.org/wiki/Fizz_buzz#Programmingno idea what that isAt the very least a program of fizzbuzz running. the list would be far too long, I know at least one line of code from like 20+ languages already. What's the requirement?
Mod's Protogen Maker v2 released. I will update it when I will update it
- Pufferfish_Test
- Scratcher
500+ posts
Random AT Survey regarding programming languages
JavaScript,Python,SQL,TypeScript,Rust,Scratch,Snap!,WebAssembly,ECMAScript
4
- I would put AssemblyScript, but I was surprised to see that it wasn't on the wikipedia page.
- I put webassembly because that wss what was on wikipedia's list, but really I mean WAT (webassembly text format)
- the number is a vague estimate of stuff I plan to continue working on
- I couldn't write fizzbuzz in sql of course
- I included the block based ones but I'm not really convinced you can ‘know’ them
- leading on from that, blockly is on the list but I decided not to include it because it can be used in so many different ways
- I put ECMAScript down because I suppose I know it, and it's on the list… but it's not really a programming language, more of a spec, so idk
It's definitely a thing, definitely relevant. That doesn't mean it's any good, or that it Like, is PHP still a thing?should be used.
This is my signature, and appears below eeevvvveeerrrryyy post I write
Try out Ocular
Good evening. I am a gerbil. Are you a gerbil? I know I am. Gerbils are possibly the most important beings in the universe; they are super intelligent and they eat carrots so we don't have to.
If you are reading this, you're probably thinking one of 3 things:
- This dude's not a gerbil, he's a pufferfish/human/bison/whatever other organism/inanimate object you mistakenly believe I am.
- Why am I reading this????????
- I'm hungry
The second one is a valid question, and one that has no satisfactory answer other than that you're really ,really, really bored.
As for the 3rd one - so am I. You're not alone.
- Seon8
- Scratcher
33 posts
Random AT Survey regarding programming languages
Scratch,Python,JavaScript,C++
5
- Seon8
This is a forum signature, where people explain forum signatures!
I follow most of the topics I post in. You can respond with another post or a comment on my profile.
Check out my profile!
- -EmeraldThunder-
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
Scratch, Python, JS, Lua, Java, C++, SQL
2
Nothing here.
- LegoManiac04
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
JavaScript, Node.JS, Scratch
3-5
- god286
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
Javascript,Python,Typescript,Scratch
3
Last edited by god286 (July 29, 2022 21:04:29)
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- ZZC12345
- Scratcher
500+ posts
Random AT Survey regarding programming languages
Well, according to this survey, no one who answered knows PHP… I'm going to go post on that sticky that claims it's relevantIt's definitely a thing, definitely relevant. That doesn't mean it's any good, or that it Like, is PHP still a thing?should be used.
> Results are out! <
Posted up top
I just got around to compiling them. The generation code is posted up top in an edit (all automated, don't judge my code).
Last edited by ZZC12345 (July 19, 2022 00:03:19)
This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
- Socialix
- Scratcher
1000+ posts
Random AT Survey regarding programming languages
(#19)This is pretty interesting. It proves that some ATers only came to Scratch because of AT, as more ATers know JS and Python than ATers who know Scratch.┎──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┒
┃ AT PROGRAMMING LANGUAGES - @ZZC12345 - https://scratch.mit.edu/discuss/topic/618337/ ┃
┃ ┃
┃ 11 11 ┃
┃ ████ ████ ┃
┃ ████ ████ ┃
┃ ████ ████ ┃
┃ ████ ████ ┃
┃ ████ ████ 8 ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ ████ ┃
┃ ████ ████ 4 ████ 4 ┃
┃ ████ ████ ████ ████ ████ 3 3 ┃
┃ ████ ████ ████ ████ ████ ████ ████ ┃
┃ ████ ████ ████ ████ ████ ████ ████ 2 ┃
┃ ████ 1 ████ ████ ████ 1 ████ 1 1 1 ████ ████ 1 ████ 1 1 1 ┃
┃ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ┃
┃ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ████ ┃
┃ ┃
┃ JavaScript Kotlin Python TypeScript Scratch App Invento… C++ CoffeeScript Ruby Bash Lua Java C# SQL Rust Snap! WebAssembly ┃
┖──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┚
┎─────────────────────────────────────────────────────────────┒
┃ On average, people have 5 unfinished projects. Median: 3.5. ┃ I mapped some names to others for consistency and removed some JS libraries claiming to be languages. I also edited some project counts to not offset the average.
┖─────────────────────────────────────────────────────────────┚
socialix - why is there a penguin breaking my window? - signatures are overrated
- Discussion Forums
- » Advanced Topics
- » Random AT Survey regarding programming languages