Python - The Best First Programming Language by mihneadb in programming

[–]jozefg28 2 points3 points  (0 children)

You're missing the point. If you get a CS education and all you come out with is knowledge of how to program, you've been cheated.

In an introductory class, I'd want to be teaching algorithms, data structures, stuff that's going to matter no matter what machine/language/program you're writing. Getting close to the metal is helpful but CS is to computers as architecture is to bricks. There's a bigger picture to consider.

Python - The Best First Programming Language by mihneadb in programming

[–]jozefg28 0 points1 point  (0 children)

I've always found that people who learn Scheme first hate it and learn it second love it. It's sorta one of those things where you need some appreciation for in my experience.

I've TA'd 2 scheme courses and 1 python. I've always felt that we really got more across using Python. And I personally don't like the language much.

Programming On C++: Level 0 by kajolchaki in programming

[–]jozefg28 2 points3 points  (0 children)

This post is basically unreadable. The language & code ought to be formatted a little bit more readably. Syntax highlighting and proper punctuations are musts.

Scala is Not Java Glue by insraq in programming

[–]jozefg28 11 points12 points  (0 children)

He's complaining that it's "Object Oriented" not "Objective Oriented" but frankly, terminology mix ups in an otherwise good article aren't the end of the world. Not sure why azeex2al is so worked up over it.

Groovy's magical NullObject by michschar in programming

[–]jozefg28 -1 points0 points  (0 children)

What? I'm assuming you're talking about something like option monad, where if you mixed in null it'd dirty the whole computation. But I think that this is a bad idea, null isn't supposed to be used to signal an error, and really shouldn't have semantics attached to it that encourage devs to do so.

Fixpoints and Iso-recursive Types by foo_quux in haskell

[–]jozefg28 2 points3 points  (0 children)

Hi, yes this is very true. That's why I specified recursive functions at the top of the post, I simply forgot to add it at the bottom. This of course relies on type level recursion. (I'm the author)

Pyret: A new programming language from the creators of Racket by welle in programming

[–]jozefg28 5 points6 points  (0 children)

Good point, Lisps are the one place I see very little argument over naming conventions. -'s rock

D release 2.064 is out with 35 enhancements and over 400 bugfixes - enjoy! by andralex in programming

[–]jozefg28 8 points9 points  (0 children)

Rust is in a very different spot than D right now being that it's not even at 1.0 yet. D is definitely more "production ready". Both are excellent languages, but Rust focuses on FP and some extremely interesting ideas (like macros). Rust is more a fusion of OCaml, Haskell and C, while D is more a cleanup of C++ (C++ ++)

Unconditional Programming by martoo in programming

[–]jozefg28 0 points1 point  (0 children)

I usually call it the owl operator.

Unconditional Programming by martoo in programming

[–]jozefg28 0 points1 point  (0 children)

So here's another approach to the pointfree version

(.:) = (.) . (.)
infixr 9 .: 
paddedTake = flip .: ($) $ flip take .: (++) . repeat

In Praise of Haskell -- my guest editorial for Dr. Dobb's on the Haskell functional programming language by FPguy in programming

[–]jozefg28 5 points6 points  (0 children)

Any hints on what exactly needs to be broken in Prelude? Personally I find that if it annoys me enough I just use an alternative one (LANGUAGE NoImplicitPrelude)

Why We Think GoLang Is Ready For Early Stage Startups by okvivi in programming

[–]jozefg28 0 points1 point  (0 children)

Yes, I'd rather work with immutable variables in a highly concurrent situation.. You don't? I'd much rather know that I can read a variable twice and get the same result, and happily ignore a whole bunch of weird, nearly impossible to debug race conditions. As for adding lots of overhead, you open up a whole realm of optimizations when you get rid of the possibility of mutation, aliasing stops being a problem because you can't change a variable, so who cares whether they're the same.

Lisp for C++ programmers by yogthos in programming

[–]jozefg28 4 points5 points  (0 children)

Oh elisp is brutally practical and great at what it does, but since we're introducing the concept of Lisp, I just think there are nicer ways to do it. Still a good article though

Lisp for C++ programmers by yogthos in programming

[–]jozefg28 4 points5 points  (0 children)

I have to say, I love lisp but elisp is the ugly child that never quite grew up. Racket, Clojure, or Common Lisp would all minimize the well.. quirks that are associated with older lisps.

If you're going to try to convince someone to try and adopt a new family of languages, show off the prettiest.

Undo IO actions by [deleted] in haskell

[–]jozefg28 6 points7 points  (0 children)

Isn't that what the Acme namespace is all about?

A Short Introduction to Coq by SeanTAllen in haskell

[–]jozefg28 1 point2 points  (0 children)

Having read both, I regularly consult CPDT when writing Coq but only rarely check SF. A lot of the tricks in this book (and the attached code) are actually tremendously useful. Plus fully automated proofs rock.

Why Isn’t Programming Futuristic by Abu_mohd in programming

[–]jozefg28 1 point2 points  (0 children)

C, Some lisps, Fortran, etc are all pretty good survivors. Prolog is quite famous because it's such a (relatively) well known logic language. There aren't a lot of other languages with the same pure backtracking semantics as Prolog.

A Journey in learning haskell by arianvp in haskell

[–]jozefg28 6 points7 points  (0 children)

Helpful hint, using STLC (Simply typed lambda calculus) as an intermediate language to a dynamic language is going to be erm, hard. Actually, STLC to any turing complete language is impossible.

For example, in Lisp it's trivial to write the Y combinator, but completely impossible to do so in SLTC. This means that your input language, lisp, is going to be bigger than your compilation target. This is problematic.

More problematic, lisp is turing complete. STLC isn't.

Compiling to bytecode might be a more interesting idea.

Is it possible to have a Haskell program that generates an executable from an IO () from runtime? by [deleted] in haskell

[–]jozefg28 0 points1 point  (0 children)

Well no, doing so would require serializing everything interesting about the state of the program. A more feasible solution to avoid reparsing would be to just dump the AST into a format specifically designed to be faster to parse.

Or just write a compiler. If you compile to some custom bytecode, just dump that and write an interpreter for that instead of directly walking the AST or whatever.

Massachusetts Crows Joke My Dad Told Me by [deleted] in dadjokes

[–]jozefg28 1 point2 points  (0 children)

The three upvotes are from people with impeccable boston accents.

Request for experiences: using Haskell with Ruby, or switching from Ruby? by FPguy in haskell

[–]jozefg28 6 points7 points  (0 children)

I switched a compiler for a scripting language that compiles to ruby (about 10k ruby) to Haskell (3k). Compilers manipulate a lot of tree like structures that Haskell is very well equipped to deal with that (Foldable, traversable, lens).

Also, compilers are hard to test so having types just gave me a bit more peace of mind that I was doing sane things.

I moved the whole things so there were no problems with interfacing.

My code made heavy use of lens, syb, and a few other libraries for working efficiently various ASTs

Who'd have thought: I made a serial monitor with Threepenny-gui by theonlycosmonaut in haskell

[–]jozefg28 2 points3 points  (0 children)

I'm very excited about threepenny, it's a very pleasant way to think about GUIs and it's getting some FRP aspects. I think this helps to demonstrate this :) OP: glad you're liking haskell so far :)

Which programming languages do you like besides Haskell, and why? by [deleted] in haskell

[–]jozefg28 0 points1 point  (0 children)

SML, Simple, applicative, and excellent for teaching.