22

Thank you for voting the challenge is live. Everyone is welcome to participate.


We at the JS chat room want to throw short monthly challenges where everyone gets the same task in a new language/library/framework.

The idea is to learn a new technology, code something fun and share knowledge, opinions and experience. The scope is meant to be rather small. It's something one should be able to hack together in an evening of work.

Please suggest challenge ideas.

Format:

Language/Framework/Library

Task: Description here

Please try to suggest something new that it is unlikely room members already did:

Here's an example:

Scala

Task: Write a parser in scala that accepts a .json file and reads all the numbers in the file. The output is a JSON file containing all the numeric values in an array. You may not use any existing JSON parsers.

As you can see - it uses a non-JS technology (Scala) has a clear and small goal and is doable.

Voting and submitting ideas will start today and end in 5 days.

You may vote even if you're not going to participate. If you're not a room regular in the JS chat room you're welcome to join us in the challenge.

Good luck.

11
  • Note: discussion about posting it on meta. Commented Nov 12, 2014 at 17:09
  • Is the idea that people post their completed challenges somewhere? If so where? Will it be as an SO question and answer pair? Commented Nov 12, 2014 at 17:15
  • @MartinSmith that's a good idea, maybe a GH repo Commented Nov 12, 2014 at 17:16
  • 1
    See also: How do weekly topic challenges work? (Obviously, this is different in terms of goal. But the plan of attack is similar in mechanics. Great minds...)
    – Jon Ericson StaffMod
    Commented Nov 12, 2014 at 17:18
  • 27
    Seems more like the kind of question you might see on programming puzzles and code golf than SO though. Commented Nov 12, 2014 at 17:19
  • But this isn't about codegolfing. I think dropping repos in chat and RO's pinning them is the best idea. This has moderator approval (see discussion about posting it on meta) so if you feel this belongs somewhere else, refer there and don't close vote without a good reason ;) Commented Nov 12, 2014 at 17:31
  • @SterlingArcher based on some of the hot questions I occasionally see in the super collider the golf and puzzles site also hosts questions that are "popularity contest" rather than just golf. Not my close vote BTW. Commented Nov 12, 2014 at 17:38
  • Sorry, didn't mean to infer it was your close vote, the last part was for anybody who voted/is thinking about voting. We're just going off of what Shog said, and he said Meta was fine. Commented Nov 12, 2014 at 17:39
  • Just a note: you can mix and match the languages and tasks if you prefer. Commented Nov 12, 2014 at 17:57
  • 12
    I don't think this is really intended to be a contest (in the PPCG sense with clear, objective criteria) as it is a personal challenge (learn something new, compare your results with others as an educational technique) @Martin. Looking at what's been proposed so far, they could be SO questions - but they wouldn't really be asked in good faith and I don't really think that's the intent here; more "constructive conversation starters" for a rather active chatroom when there's nothing else going on.
    – Shog9 Mod
    Commented Nov 12, 2014 at 18:06
  • 4
    Meta: The place where people hate the community trying to do something together; according to the close-votes, at least. Jeez guys, where's any shred of community spirit?
    – Matt
    Commented Nov 14, 2014 at 15:02

8 Answers 8

11

Clojure

Task: Write a CSS minifier that takes a .css file as input and returns a minified version of it - the shorter the better. You may use any tools you'd like except libraries that perform actual CSS parsing.

4
  • For the record, I've already written such tool, and the CSS parser was barely 150 lines in Go. It's not a "hard" challenge. Commented Nov 12, 2014 at 17:38
  • @FlorianMargaine does it also do stuff like transforming a { x: y; } b { x: y; } to a, b { x: y; } or only remove whitespace?
    – user1804599
    Commented Nov 13, 2014 at 8:42
  • @rightfold your choice, but this is not the job of the parser, only of the analyzer you'd run afterwards. Commented Nov 13, 2014 at 10:43
  • 1
    I was referring to "such tool," not "the CSS parser."
    – user1804599
    Commented Nov 13, 2014 at 11:13
9

KnockoutJS

Task: Use Knockout 3 and the SE API to create a form for searching SO question bodies and dynamically returning those that match a criteria. The questions returned should refresh once every minute. Question should be formatted nicely.

9

Ada

Task: Write an IRC client. It can be a simple bot answering !!bot with Yes, I'm a bot!. It does mean implementing the IRC protocol. A simple way to understand how it works is using irc over telnet.

1
  • +1 This sounds like a good chance to learn ADA which I'd otherwise probably not learn. Commented Nov 12, 2014 at 19:58
7

Dart

Task: Get the video and audio resolution of MPEG-4/h.264 encoded videos.

  • The video must be taken from an http url (like this one) available as SOP (so using a CORS proxy is fine).

  • The web-browser must not download more than 768kb/s.

  • The values must made available for the standards JavaScript files of the page.

  • The script need to work for GPL browsers (those which don't support proprietary codecs like MPEG-4)

2
  • FYI, if you're not too familiar with video/audio encoding, the free online book dive into html5 has an excellent section on video. Commented Nov 18, 2014 at 16:20
  • @LukeWillis : There's nothing about\tkhdor hex addresses... It only tell about patents.. But there's no software patents inside European Union members... You can only protect code not methods... With only one exception. Also, this is only about decoding some metadata. Commented Nov 18, 2014 at 18:08
5

PhaserJS

Task: Implement a simulation of a Double pendulum which runs in real time and shows the chaotic dynamics. The user should be able to set the basic parameters, i.e., m_1, m_2, l_1, l_2, theta_1, theta_2.

3
  • 1
    Didn't want to use PhaserJS, but I made this! Really enjoyed it too; thanks for the idea :D codepen.io/AmaanC/details/wBvjqa
    – Some Guy
    Commented Nov 15, 2014 at 15:31
  • @SomeGuy Nice! It refuses to work on Chrome 34.0.1847.137 on Linux due to CSP, but does work on Firefox 34.0.+1 Commented Nov 15, 2014 at 17:11
  • Oh, thanks! It should be fixed now!
    – Some Guy
    Commented Nov 15, 2014 at 18:13
4

F#

Task: Write a calculator program that takes in a string and outputs a number. You can choose between infix, postfix, and prefix notations, but I'll use infix here.

Example:

  • input: -2 * (5 + 3 - (4 + 6)).
  • output: 4

Minimally: Support integers, parentheses (), multiplication *, addition +, subtraction -.

Optionally: Support decimals, division /, modulo %, exponents ^.

For fun: implement a factorial operator, !, with operator overloading.


TryF# is a great introduction to the language and functional programming concepts.

3

Emscripten

Task: Write a Pac-Man game.
Just a labyrinth with ghosts, dots, and the yellow thing should be fine.

-4

C/ASM

Task: Compile the mainline Linux kernel or Glibc with intel's "-ip" option (which is similar to -flto in GCC).


You can get the compiler for free as "Non-Commercial Software Development" here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .