Domain: rosettacode.org
Stories and comments across the archive that link to rosettacode.org.
Comments · 57
-
Re:Hasn't Ada fixed all of this decades ago?
I used Ada circa 1997 for a DoD project.
Ada felt like industrial-strength Pascal. It was generally cool -- why *wouldn't* I want the compiler to range-check array index operations by default, at least for non-critical code paths? This could help me today, on *real problems*. Why *wouldn't* I want an enforced, specified order of initialization for global/static objects? I also strongly preferred the generics and exception syntax over their C++ equivalents. Ada's OS-agnostic task support was ahead of its time (hard for the language to support threads when the underlying OS doesn't).
Going back to C afterwards felt like returning to something
... primitive. But, I develop in C++ today.Ada had historical issues and feature lags, some of which still plague it today, such as:
-- historically, no free compiler (today, there is FSF GNAT)-- the object.method() - style syntax didn't show up until 2005; standardized bitwise operations didn't show up until 1995
-- small standard library, which in general has lagged behind even what C++ supports. Containers didn't appear until 2005. Also, AFAIK Ada still has no equivalent of say, C++'s Boost or Rust's crates.io (though there are at least some Ada projects and libraries on Github). Want to call epoll() directly on Linux? In C++ you can use it directly; in Rust you can find a wrapper, in Ada you need to roll your own (to be fair, Ada's C interface support is excellent). Want standardized smart pointers? Maybe in Ada2020. If you want to make Ada more popular, I think this general problem of "I have to write my own version of xyz" is the single most important thing you could tackle.
-- Some things are just relatively awkward to express in Ada, even beyond the normal verbosity of the language (some of which there are good reasons for). Here for example is a comparative look at closures. As another example, C++'s operator overloading is ripe for abuse, but it also enables a nice abstraction of, say, bignums or half-precision floats. AFAIK Ada has nothing like that. To be fair, you can make this criticism about any language for a given feature that might be important to your problem domain.
-
Rosetta
I want to start an online solution that other programmers find helpful
Have you considered rosettacode.org? It has almost 1,000 little problems and puzzles in multiple programming languages.
-
Re:Creating interactive fiction to learn programmi
Inform7 is something unique. As a special purpose tool, I hear that it's fantastic. If you're a developer, however, I expect you find it a bit maddening.
A sample from Emily Short's Bronze:
The iron-barred gate is a door. "An iron-barred gate leads [gate direction]." It is north of the Drawbridge and south of the Entrance Hall. It is closed and openable. Before entering the castle, try entering the gate instead. Before going inside in the Drawbridge, try going north instead. Understand "door" as the gate.
After opening the gate:
say "You shouldn't be able to open it, heavy as it is, but it swings aside lightly at your touch. The Beast said that it knows friend from enemy; and the castle, at least, still regards you as friend."
[... snip
...]Before going outside in the Entrance Hall, try going south instead.
The fireplace is scenery in the Entrance Hall. The description is "Unlit, vacant[if Search is happening]. It is almost as though you are not expected[end if]." The sound of the fireplace is "whistling wind". Understand "fire" or "whistling" or "wind" as the fireplace. Instead of burning the fireplace: say "There is no fuel prepared for a fire."
You can do other things with it. Towers of Hanoi looks like this: Towers of Hanoi, and is surprisingly readable. Though I can't imagine trying to use Inform7 in an intro to programming class.
-
Corporate data grab
Rosetta code does http://rosettacode.org/wiki/Ro... exactly this. It is freely licensed under the GNU FDL.
Microsoft just wants you to hand over your code, train their AI, and then live from the results of the AI. Similar to how google's "map creator", where your "creation" (the google map) is owned by google, all rights reserved.
I'm okay with the statistics based stuff google is doing for its search results, but if these companies want people to work for them, they should hire them, or they should release the results for free as well.
Otherwise its the same kind of arrogance where nestle goes into some indian community that lives perfectly fine, builds a well that's deeper than any other wells, and which dries up all already existing wells, and now starts selling the inhabitants their own water.
-
Re:It's not entirely a lie
> I had a professor in college who would actively and zealously apply this principle.
Me too. His name was Jerry Sussman, and he made the freshman learn Scheme, which he helped write. Thing was, *all* the freshman at MIT at that time were pressured by their family and guidance counselors to go into programming, and the department was overwhelmed. So that course served as an early winnowing of the herds. It was exacerbated by the shortage of systems to do the actual programming, and the tendency of bad code to never terminate and suck up more resources as the problem sets became due. If you couldn't get in early, couldn't get your code to run on the first pass or at least report meaningful errors, or couldn't lie, cheat, or steal your way to getting a console, you tended to fail. Freshmen were on "pass/fail" grades, so your grade didn't exist beyond that, but it pushed a lot of students where weren't that interested in computing away to other departments that could handle them better.
Invaluable lessons, all of them. I also tended to tick off the TA's. You know the "counting ways of making change" one, at http://rosettacode.org/wiki/Co...? The length of the programming run grows factorially? I reversed it, starting with largest coins and working my way down, which reduced run time from some ridiculous N! runtime to something like N^2, and which the TA's tried to mark my grade down for. They refused to acknowledge that I did it *both* ways, their way and my way.
Jerry bumped my grade back up, and gave me a pretty weird look. But that lesson of "when someone insists on something stupid for philosophical reasons, give them that answer *and* the better one" has worked well for over 30 years.
-
Re:The PM writes good code
No idea how to run it.
... all you get is "Row[1] :"Try this:
$ echo -en "5...7....\n6..195...\n.98....6.\n8...6...3\n4..8.3..1\n7...2...6\n.6....28.\n...419..5\n....8..79\n" |
./a.outCredit where credit is due: That sudoku puzzle instance came from here, which was linked elsewhere in this thread by UnknownSoldier.
-
He didn't check online??
C version, 67 lines of code
... -
Is this unaffiliated substantial coverage?
Since no one answered this question, I did a simple google search which threw up these results
:-Nimrod: A New Systems Programming Language
Category:Nimrod
Consider the Nimrod Programming Language
What I like about the Nimrod programming language
Araq/Nimrod
Nimrod: A New Approach to Metaprogramming
Nimrod: A new statically typed, compiled programming language which supports metaprogrammingI am just a layman when it comes to Wikipedia editing, but it looks pretty substantial to me. It would appear that the complaint that notability requirements are too strict has just cause.
-
Rosetta Code
I'm surprised to see that no one has mentioned Rosetta Code yet. It provides many examples of different (real-world) problems being solved in many different languages. It's interesting for comparisons between languages and it's very useful for finding already-implemented solutions to problems in whatever language a user may require.
-
Re:He describes how he learned to sing, too
Rosetta Code is a wiki composed of the same problems solved with many different computer languages. Rosetta Code currently has 626 tasks, 101 draft tasks, and is aware of 486 languages. http://rosettacode.org/
-
RosettaCode shows solutions in diff languages
RosettaCode.com shows solutions for common programming task written by experts in each of the different languages http://rosettacode.org/wiki/Main_Page
I think over 400 languages are shown for hundreds of common problems.
-
Re:Doubt
We've got a fair amount of tasks over on Rosetta Code that could use your attention, I suspect.
-
Re:C++ Making its way to the web?
Let me know when they replace Javascript with Forth!
:-) ....I'm not holding my breath! :-)ttyl
Farrell
It's a way to run native code. If your Forth interpreter or compiled program is native code and can access the necessary ABIs, it'll work. There are various ways to call foreign functions.
-
Re:Excuse me
All of the features touted in this language are things that either already exist, or for any well designed application be a non-issue.
There's more to language design than creating new features. Most languages I've seen introduce few, if any, new or fundamental features, but instead seek different balances in the various tradeoffs involved. Off the top of my head, those tradeoffs include things like raw speed, syntax expressiveness, syntax flexibility, memory consumption, number, breadth and convenience of builtins and number, breadth and convenience of libraries.
Most languages even seek to remove some mundane aspects of architecting a "well-designed application;" it's been a long, long time since most programmers had to manually keep track of their memory consumption or object interaction models for trivial applications, but applications which we would consider trivial today would have required extraordinary amount of programmer effort thirty years ago for such things. Non-issues in a well-designed application eventually become non-issues in any trivial application; even the painstakingly-well-designed application itself may eventually become trivial.
"Advanced primitives" isn't an oxymoron if you evaluate it in the right context; you're missing the implicit "when compared to {other language's primitives}". Granted, it's still a vague term; compared to what? Compared to C primitives? Possibly. Compared to Java primitives? Possibly.
Oz's syntax doesn't look any stranger to me than comparing a C-like syntax with a FORTAN-like syntax, or either of those with a Lisp-like syntax.
If you want a bizarre syntax, see J. Before you knock it, consider its heritage, and figure out which you'd have an easier time entering on your average keyboard.
No, I don't know Oz. I don't know Scala. I don't know Ozma. I just watch a lot of language advocates and designers compete with each other, and learn a thing or two every now and then--and it irritates me when I see people knock langauges and tools because they don't have enough perspective to see that those tools might not be right for them, but might be right for someone else.
-
Re:Excuse me
In programming, "paradigm" usually refers to a mindset or a "way of doing things." You might find this useful.
-
Re:what I did
Start with what ever you have.
RosettaCode has a ton of different tasks for 385 (and growing) languages. Find one (python, perl, php, bash, c, c++) that you can get for free and thenThe biggest problem isn't syntax (IMHO) it's that people (at least mechanical engineers) don't grasp the concept of what a for loop, while loop, if statement, etc DO. If you break it down and explain it to them they "get it" a bit, but most are lost on their own. So pick something that you 'get'. Find a language that you think makes sense in your head and go from there.
I cut my teeth on TI-89 Basic. That's where I 'learned' to program. From there it was MATlab, Java, PHP, C, C++. I still use most of those rather extensively.
-
Re:what I did
Start with what ever you have.
RosettaCode has a ton of different tasks for 385 (and growing) languages. Find one (python, perl, php, bash, c, c++) that you can get for free and thenThe biggest problem isn't syntax (IMHO) it's that people (at least mechanical engineers) don't grasp the concept of what a for loop, while loop, if statement, etc DO. If you break it down and explain it to them they "get it" a bit, but most are lost on their own. So pick something that you 'get'. Find a language that you think makes sense in your head and go from there.
I cut my teeth on TI-89 Basic. That's where I 'learned' to program. From there it was MATlab, Java, PHP, C, C++. I still use most of those rather extensively.
-
Re:Perl6
I've been playing around with Perl 6 a little this week. Rakudo works well enough that I'll be using Perl 6 where I've previously been using Perl. I find it useful to follow the Perl 6 Planet, as it has a bunch of Perl 6 developers' perspectives and musings as they use the langauge. (For example, one guy wrote his blogging engine in Perl 6, and commented on speed differences between a couple Perl 6 implementations.)
I'm also helped that Larry Wall has been doing active code review of the Perl 6 code over on Rosetta Code, a site I run; it's nice to have an active source of idiomatic code for understanding the language.
-
I've been playing with Markov models lately
And I intentionally used a phonetic hash I threw together in the key lookup. The script produced some cool output, but didn't do quite what I wanted to do.
Then I learned about Soundex. And then, even better, Metaphone. Better still, Double Metaphone. DM's benefit is that it returns multiple keys for a processed symbol, under the assumption that the symbol might be pronounced multiple ways. It was *almost* what I wanted, except it was still more or less limited to mostly-English words. I'd like to work with IPA, but whenever I asked about a library that attepts to take text and convert it to IPA symbols, I'm reminded that different dialects will say the same words different ways (engaging the vocal chords or not, for example.), and the same word may have a different meaning depending on how it's pronounced, which is also related to its context. A first-order markov model is likely to grant some self-correcting accuracy, though while a second-order or third-order model should do a decent job, they'd represent *huge* data sets.(When I was working with a 1st-order model, and considering moving to 2nd-order, I almost convinced myself to buy an SSD to dedicate to InnoDB.)
It seems obvious to me that you should be able to apply Metaphone's approach (a returned key for each possibility), and then use a markov model to refine which key has the most likely meaning in context. (Feeding it a language's dictionary with word/part-of-speech/IPA tuples would be most excellent)
As for speech recognition, aren't there any libraries or code bases out there that convert sound to IPA? It seems the most obvious solution. Heck, you could probably get away with some on-body sensors for more accurate detection of particular IPA symbols.
Incidentally, if you want the data and code I was playing around with, I put it here. Read the thirty or so lines of disclaiming comments before you complaint about it being a 65MB Perl script. (I didn't want to bother packaging multiple files, among other concerns.) LZMA compressed, so install the lzma package or grab 7zip, depending on your OS. Compressed, it's 6.4MB.
-
Re:He seems to want reading options
I see a lot of posts suggesting that he start writing real programs. That's good advice, but it might not answer the question. The submitter says he works as a security guard. As such, sitting focused at a laptop writing code might not be an option. He seems to just want suggestions for books to read. As such, I reckon a book on algorithms wouldn't be a bad direction to head (provided he's got enough math to follow along).
I can recommend the O'Reilly Java Examples nutshell book (especially if you try to understand why the examples work) and Mark Grand's books on Software Patterns in Java.
After that, well, you're at about the point where your best approach involves getting practice trying to do real things (or at least solving problems somewhere like RosettaCode, where many of the problems don't yet have Java solutions). I don't know how well that sort/depth of study mixes with a job as a security guard.
-
Re:Go!
Might as well just name his next programming language "AND" or "IS" so he can whine about people talking, period.
There is already a language named Brainfuck, so we can already whine about people posting on slashdot.
-
Re:SQL, Just because...
Show mathematically how its NOT possible to do the same with SMEQL. As described nearby, it may actually be *easier* with SMEQL because it has a simpler linguistical foundation to its structure. It may make a better teaching language than SQL for that reason at least.
By the way, Here's a quick intro to SMEQL:
-
Re:Excellent Post
Here's what I got, so far. Sorry it's not tabbed and cross-referenced...
http://ask.slashdot.org/article.pl?sid=08/09/17/224230 -- in case anyone wants this page, too
http://www.quickref.org/
http://gotapi.com/
http://www.regular-expressions.info/ -- regular expressions
http://www.perlmonks.org/
http://www.rosettacode.org/wiki/Main_Page
http://perldoc.perl.org/
http://www.perlbuzz.com/
http://java.sun.com/reference/
http://forums.sun.com/index.jspa
http://developer.mozilla.org/ -- javascript
http://www.w3.org/MarkUp/Guide/
http://www.w3.org/MarkUp/Guide/Advanced.html
http://www.w3.org/TR/html4/
http://www.w3.org/TR/xhtml1/
http://www.w3.org/Style/Examples/007/
http://www.w3.org/Style/Examples/011/firstcss
http://www.w3.org/Style/CSS/learning
http://en.wikibooks.org/wiki/Programming:Tcl
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/
http://cprogramming.com/
http://www.cplusplus.com/
http://cm.bell-labs.com/cm/cs/cbook/
http://www.parashift.com/c++-faq-lite/
http://en.wikibooks.org/
http://developer.apple.com/
http://cocoadev.com/
http://www.cocoabuilder.com/ -
All +5 moderated links
http://www.perlmonks.org/
http://en.wikipedia.org/wiki/Scheme_(programming_language)
http://www.schemers.org/Documents/Standards/R5RS/
http://srfi.schemers.org/
http://mitpress.mit.edu/sicp/full-text/book/book.html
http://www.quickref.org/
http://java.sun.com/javase/reference/api.jsp
http://www.rosettacode.org/wiki/Main_Page
http://cprogramming.com/
http://www.stackoverflow.com/
http://cm.bell-labs.com/cm/cs/cbook/
http://yutaka.is-a-geek.net/
http://www.gotapi.com/
http://www.open-rsc.org/
http://www.users.bigpond.com/robin_v/resource.htm
http://www.geocities.com/orion_blastar/contact/
http://en.wikibooks.org/ -
Re:Perl and Python
Yep, those are good too.. but I'd also add something that was basically born from Slashdot, it's Rosetta Code For common solutions with multiple code for different programming environments.
-
Internet access is integral to education...
Eh? What about those of us whose extracurricular activities depend on the Internet? And those of us who colleges offer courses online? Those of us who take classes in the evening, and catch up with our social lives afterward?
Glad I don't live in a dorm. -
Re:Already done
That's pretty cool, but it's not quite the same as Rosetta Code. You've got 18 simple tasks, and RC has 36. You've got 13 programming languages, while RC has 50. This is largely because RC is a wiki, while your site isn't community-expandable.
I received lots of "This has been done before"-type responses, with the most similar site being Code Codex. I created a page on RC, linked off the navigation bar, listing all the sites Slashdotters mentioned. -
Re:Already done
That's pretty cool, but it's not quite the same as Rosetta Code. You've got 18 simple tasks, and RC has 36. You've got 13 programming languages, while RC has 50. This is largely because RC is a wiki, while your site isn't community-expandable.
I received lots of "This has been done before"-type responses, with the most similar site being Code Codex. I created a page on RC, linked off the navigation bar, listing all the sites Slashdotters mentioned. -
Re:if you like this...
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:Towers of Hanoi
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:CodeCodex
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:PLEAC
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:Nice idea, but
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:Syntax Across Languages
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:Software Rendering in Four Languages
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:if you like this...
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:Will they support these programming styles ?!?
Heh. I added it to the page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:In a more focused form
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:I was working on something exactly like this...
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:LiteratePrograms
I created a page that lists all the similar sites that Slashdot users mentioned in their replies.
-
Re:Internal Server Error? A true Rosetta error
It's been up for a couple days now. Take a peek.
-
Re:Should I be impressed?
Take a look now. Last time I checked, we solved 22 tasks in 43 languages. There are probably more, now.
-
Re:Usage
The site's back up. I believe this is the page you're interested in.
(Gah! I've been working on Rosetta Code day-and-night, while eating, working, and in class, since the Slashdotting, just to keep up with all the new material. I tried to create the link using wiki syntax.) -
Re:It may prove useful.
Check out this page. That'll be the basis of browsing the site soon.
:-) -
Re:Pointless, don't bother!
-
Re:Pointless, don't bother!
-
Re:Pointless, don't bother!
-
Re:Pointless, don't bother!
-
Re:I made it through!
Stop by blog.rosettacode.org. I'll make an announcement there.
-
Re:I made it through!
At the moment, it's a PHP misconfiguration on the server. Hopefully, this will be taken care of tomorrow morning.
Updates will be at blog.rosettacode.org.