« first day (320 days earlier)      last day (4611 days later) » 

3:03 PM
one of my potential final year projects is a CPU emulator
 
a CPU emulator?
 
yeah
 
Emulate ALL the things!
 
one of the first year modules is about learning very basic assembly
instruction pointers, that sort of thing
and they want an online emulator to help teach the module
 
oh kewl :P
sounds like fun
 
3:06 PM
well, I'd do the site in ASP.NET, and I've already done stuff like a Brainfuck interpreter
so it shouldn't be too hard
 
oh wow
 
As if a Bra*nfuck interpreter was something of similar complexity.
 
it's pretty simple to write simple emulators, really
it's a pretty simple CPU I'm looking at emulating
it'd be easier to emulate this CPU because I don't have to write my own loop instructions and only have to deal with individual jumps
 
Rob
@DeadMG I proposed a CPU emulator for my senior project
 
Well, if you're not aiming at efficiency, then emulator is rather straightforward.
 
3:08 PM
exactly
 
Oh, I'm not saying it'd be difficult.
 
what kind of programs are these guys gonna write, anyway?
a little too much use of inheritance and problem solved
 
Rob
But got stuck with writing software that automates battery testing for lithium ion cells :/
 
But a Bra*nfuck interpreter is like what? 20 lines?
 
I'd spend more time attempting to parse the input
 
Rob
3:09 PM
Serial communication in Java != fun
 
nah, I did something a bit more involved than that
did the whole List<IInstruction> thing
 
My *rainfuck compiler was about 100, but it wasn't the best of codes.
 
Rob
lolol
 
oh, yeah
I had it actually compile, like, down to a full .NET assembly
 
Rob
First time I've seen the B starred.
 
3:10 PM
it's a habit in this room to star everything except the "fuck"
 
Rob
Yea, I've seen the i starred plenty of times ;)
 
Because "Bra*nfuck" is an offensive word, somehow..
 
It ought to be policy to randomise the *s
 
lol
 
3:11 PM
I'm a robot, I can't randomise.
 
Raisin Bran Fuck
 
Rob
Ahhh! Python!
 
It can even optimise the size somewhat.
 
Cut out redundant stuff like <>?
Or do some reorderings?
 
+++ => +3 ?
 
3:12 PM
@CatPlusPlus Ah, that works, too.
 
Naw, make +++++ into add instead of 5 inc. :P
 
Rob
I like almost everything about Python, but refuse to write in a language where code blocks are determined by indentation.
 
It's the best feature.
 
@CatPlusPlus - assuming the target supports it ;)
 
Rob
I disagree ;x
 
3:13 PM
@Rob Shut up and go write some Haskell.
 
I like layouted syntax.
It stops idiots from not indenting their code.
Every language should enforce that.
 
@CatPlusPlus It isn't. The best feature is the "has-everything-standard-library".
 
nothing can get between an idiot and unindented code :)
 
Rob
Yea, I'm not so sure enforcing code style should be a language feature.
 
@RMartinhoFernandes That's another best feature!
Some languages go much further in enforcing code style.
 
Rob
3:14 PM
@RMartinhoFernandes Actually that was what turned me off of Haskell too
 
@Rob Liar! Haskell is cool enough to make you forget that entirely.
 
Rob
@RMartinhoFernandes I still think it's way cooler than Python ;)
 
And really, indentation is something your editor does anyway, there's nothing to complain about.
 
Rob
I'd rather code blocks be visually delimited by something other than whitespace.
But it's a personal preference, oh well.
@CatPlusPlus Maybe I really like my tab key ;)
 
Also I like vim's cursorcolumn. Other editors should implement that, too.
 
3:18 PM
@CatPlusPlus Other editors should implement every vim thing!
:P
 
Rob
Watch out, there may be someone who favors emacs in here
 
Honestly, the only way you're going to have trouble with indentation in Python (or Haskell for that matter), is if you use some crazy indentation scheme.
 
Rob
All hell will break loose
 
@Rob I've prodded before. The room's clean.
 
We don't talk about them crazy people.
 
Rob
3:19 PM
I don't have trouble with it per se.
 
So?
It's transparent.
 
Rob
I'm not even arguing against it, or trying to justify my position. It just annoys me.
I guess I just really love my curly braces.
 
Python has some problems, but really, layout is not one of them.
 
0
Q: C++ Syntax error

omgI have a file "injectdll.h", code: #include <windows.h> #include <tlhelp32.h> void GetTargetThreadIdFromProcname(char *procName); bool LoadDll(char *procName, char *dllName); And a file "injectdll.cpp" with following code: #include "StdAfx.h" #include "injectdll.h" void GetTarg...

lol
 
Anyone saying otherwise is just arguing for the sake of arguing. :P
 
Rob
3:21 PM
Like I said, not trying to argue, just stating an opinion. :)
 
But we are trying to argue! So argue back dammit! Stop being rude!
 
Rob
lol.
 
Python is lovely. Compared with C++ my productivity is like 10000 times higher.
It's still zero, but that's beyond the point.
 
hmmmm
10,000 * 0 > 0 ?
 
prod(Python) = prod(C++) * 10000
 
Rob
3:24 PM
I will eventually have to just suck it up and start a decent sized project in Python or Haskell
I'm sure that once I've written more in that style, it will become more pleasant.
 
a "large" python app/system is like 30Kloc
above that productivity suffers
 
Rob
There was a guy in my programming languages class who would write everything in Ruby, no matter what. We called him ruby Dave.
@AlfPSteinbach Didn't Twitter do a rewrite of a bunch of their site when their Python code base grew too large?
 
not sure
 
Rob
I seem to recall reading something about them switching a large portion of their back-end from Python to Scala
Ohh, nope. It was a Ruby -> Scala migration.
 
> I'm trying to convert A to B , but I get the following compiler scream
lol
 
Rob
3:30 PM
lolwhat
 
@Rob Haskell's standard library turned you off? I don't get it.
 
Rob
@FredOverflow No, indentation for code blocks (up a little further)
 
Oh. Well, you can use braces and semicolons in Haskell if you want to. At least in the do-notation.
What I really like about Haskell is the community. Haskell programmers seem to be very friendly and well-mannered in general. I wonder why that is.
 
Rob
Hmm.
 
I have never seen a Haskell programmer talk crap about other paradigms and languages.
 
Rob
3:34 PM
I would say it's probably because most Haskell programmers are fairly experienced.
 
@FredOverflow Because Haskell makes them happy people, of course!
 
Rob
Not that experience == politeness
 
@RMartinhoFernandes You mean there is nothing in Haskell with the potential of driving one crazy? :)
 
@FredOverflow Crazy and happy are not mutually exclusive!
I hope.
 
Speaking of functional programming, has anyone here ever played with FC++? Is it worth getting into?
 
Rob
3:36 PM
Functional C++ sounds scary in and of itself.
 
Boost Phoenix is based on FC++
 
What does it do differently?
 
Dunno
 
any good link where i can see source code (c++) ?
 
Difference namespace names :)
 
3:37 PM
@Srle bitbucket.org, github.com, launchpad.net, etc?
 
@Srle Stackoverflow.com
 
  struct Map {
    template <class F, class L>
    struct Sig : public FunType<F,L,
      List<typename F::template Sig<typename L::ElementType>::ResultType> > {};
    template <class F, class T>
    typename Sig<F, List<T> >::ResultType
    operator()( const F& f, const List<T>& l ) const {
      if( null(l) )
        return NIL;
      else
        return cons( f(head(l)), curry2( Map(), f, tail(l) ) );
    }
  };
Hm, looks interesting.
 
thank you
 
@FredOverflow Anything there you couldn't do with "regular" C++?
 
3:38 PM
@RMartinhoFernandes FC++ is just a library, providing FunType and cons, among other things, for example.
 
Oh.
Well, Boost.Phoenix comes to mind.
 
i dont want to read code, just to compare mine with someone else
 
> Source code itself, pure, unadulterated and unaccompanied, is a rather impotent learning tool — from an entirely objective standpoint. This isn’t an issue you can reasonably contest with abstract arguments about a person’s “learning style.” You cannot learn from what isn’t there. Unlike a tutorial, which is at least attempting to be educational, the purpose of source code is to communicate a programmer’s intent to a machine.
> Source code is devoid of context. It’s simply a miscellaneous block of instructions, often riddled with a fair bit of implicit assumptions about preconditions, postconditions, and where that code will fit in to the grand scheme of the original author’s project.
> Lacking that information, one can’t be sure that the code even does what the author wanted it to do! An experienced developer may be able to apply his insight and knowledge to the code and divine some utility from it (“code scavenging” is waxing in popularity and legitimacy, after all), but a beginner can’t do that.
 
You could post it on Code Review and get opinions.
 
Rob
Aw, too slow.
 
3:40 PM
I win!
 
Rob
Like Charlie Sheen!
 
@Srle In any case, it makes little sense to compare code that does different things.
Damn, bad space bar.
 
"the purpose of source code is to communicate a programmer’s intent to a machine" no that's just a secondary purpose. if the source code doesn't communicate well to a programmer reading it, it's fail.
 
that's what I thought
bad code will fail to communicate intent to the dev looking at it
 
@AlfPSteinbach But the purpose is certainly not to teach the reader.
 
Rob
3:42 PM
@RMartinhoFernandes It's a fine line between teaching and communication, given the reader has a bit of good sense
 
The article talks about beginners.
 
Rob
Ah, sorry
 
wouldn't make sense for me to start reading Haskell code, to learn it, cause I don't have the basic concepts
 
I have never accidentally written source code in a way that would help beginners understand a new concept.
 
There's some quote like "Every truly good comment represents a failure of the language." (I'd add something like "or the way it's being used")
 
3:43 PM
Francis Glasborow once remarked (several times, over the course of some months) that the nice thing about syntax coloring is that you can configure comments to display as white on white
2
 
Rob
Yea, sorry, I should have read the full article
 
I like my comments.
 
// I like mine too, cause they remind me of the shitty job I just did
 
@HostileFork I totally agree, implementation comments suck.
 
3:44 PM
Comments are sometimes required to clarify irreguarlities in the business logic. So the need for comments it's not always due to the language.
 
It's always better--if you can--to invest in something both the programmer and the machine can read instead of just throw away.
 
@FredOverflow Do you only agree for implementation comments (and thus not totally) or do you agree for all comments?
 
Rob
I think I probably over-comment my code, but I'm glad I do
 
All other things (time, etc.) being equal.
 
@RMartinhoFernandes I think interface comments are absolutely necessary for non-toy projects.
 
3:45 PM
@HostileFork You're using that word.
 
@FredOverflow Hai!
 
Yup.
I am.
Unless you're doing something for artistic purposes.
 
But then you add "if you can".
 
Like formatting your code as ASCII art and using comments to help do it.
 
3:46 PM
So, there are exceptions.
 
@RMartinhoFernandes Well, it's just my personal preference, anyway. I don't teach it as holy word :)
 
0
Q: C++ compiling needed

Jacer Omrii know that seems noobish but i have no idea about c++ and i need to compile this code below, all what i know that it needs gmplib (mpir on windows). i got hundreds of problems while building. So i need someone to compile it for it (win32). thanks in advance. //****** la classe rsa_gmp.h *******...

 
Not exceptions in the bandwidth/context being discussed.
 
are we a compiler service? lol
 
@HostileFork Sorry, I didn't get what the context was.
@TonyTheTiger Two minutes. That was quick.
 
3:49 PM
I saw this a while back: delorie.com/djgpp/compile
 
You know what's awesome about Java? It spawned a toy language called "Pizza", and pizza tends to be quite delicious!
 
Of course, the only reason for Pizza's existence was Java's suckage in the camp of generic code, so...
 
awesome and Java in the same sentence?? Blaspehemy!
 
@TonyTheTiger "Java is not awesome."
 
Rob
3:50 PM
@FredOverflow Also, Scala.
 
@RMartinhoFernandes you ruined it
 
And thought "hm, more of that kind of thing would be nice". There should be a virtual appliance for every major open source project that you load up and it's all ready to go with a debugger set at the first line of that project.
 
@Rob So Scala only exists because Java sucks so badly? Thank you, Java!
 
Rob
Err, not what I meant
 
Pretty much every other JVM language exists to fix Java.
 
Rob
3:50 PM
Scala is another awesome thing about Java
Which also tends to be quite delicious ;)
 
@Rob Well, I'm pretty sure Martin would not have invented Scala if he was satisfied with what Java had to offer.
@Rob Okay, but "scala" is not the name of something to eat like "pizza", is it?
 
can you generate a lib from a DLL?
 
Rob
@FredOverflow Well yes, what you said is true, but that's not what I was trying to say in the first place. lol.
 
I doubt it, but thought I'd ask
 
@TonyTheTiger For static linking?
 
Rob
3:52 PM
@FredOverflow Of course not, just joking that Scala would be delicious if it were ;)
 
damn you, stop talking about pizza, I'm feeling like that now
@RMartinhoFernandes yea
 
@TonyTheTiger here you go:
Pizza is an open-source superset of the Java programming language with the following new features: * Generics * Function pointers * Class cases and pattern matching (a.k.a Algebraic types) In August 2001 the developers made a compiler capable of working with Java. Most Pizza applications can run in a Java environment, but certain cases will cause problems. Work on Pizza has more or less stopped since 2002. Its main developers have concentrated instead on the GJ project, another attempt to add generics to Java which was eventually adopted into the official language version 1.5. The pat...
oh, function pointers!
 
1
Q: Creating and linking against a .lib file generated from an old DLL file

ashyuI have inherited an old VC++ project that requires an old proprietary .lib file to link against. I have the header file for the lib, but the original developers seem to have lost the .lib file. I did find a DLL file that I believe a driver from this software package uses that has the same name ...

 
@RMartinhoFernandes - The context of the desktop wallpaper I have behind this window which points an arrow down into it and says "Pretend in this window as if you're speaking to professional developers about serious issues." Sorry you didn't see it.
 
@FredOverflow that's not food
Pizza (; ) is an oven-baked, flat, disc-shaped bread typically topped with a tomato sauce, cheese and various toppings. Originating in Italy, from the Neapolitan cuisine, the dish has become popular in many parts of the world. An establishment that makes and sells pizzas is called a "pizzeria". Pizza is one of the national foods of Italy and the Italian people. History The Ancient Greeks covered their bread with oils, herbs and cheese. In Byzantine Greek, the word was spelled πίτα or pita, meaning pie. The word has now spread to Turkish as pide, Serbo-Croatian and Bulgarian as pita...
 
Rob
3:53 PM
Hmm
 
^this
 
Oh gosh, someone thought we were serious here!
 
That's also not food, but merely a jpg.
 
Rob
If the developers of Pizza followed up with GJ, and GJ got integrated into Java itself...
 
3:54 PM
@TonyTheTiger You mean *this, right? ^this looks like Pascal syntax ;)
 
@RMartinhoFernandes ghosh, what a mistake
@FredOverflow lol
 
i have never tasted jolt cola
 
Rob
Are Java's generics still bad?
 
In one of my FAQs, there was the following error:
*return this;
 
has anyone actually ever implemented Dijkstra's shortest path first, just for fun?
 
3:54 PM
@FredOverflow hehe.
 
It took months before someone saw and fixed it :)
 
@TonyTheTiger For fun? Not really. But I did it for class.
 
Rob
@TonyTheTiger Not for fun, for class
lol.
 
@FredOverflow That wouldn't even compile
 
@TonyTheTiger Funny that you should ask, I implemented it today :)
 
3:55 PM
Hm, is my remark all that terribly serious? You must be new to reading stuff I write...
 
@RMartinhoFernandes oh for class
 
1
A: What good is the NERFIN loop operation in LOLCODE?

Hostile ForkThere was design discussion from 2007 on this exact topic. Consensus at the time seemed to suggest adding a FROM as a solution the working group wanted fast-tracked into 1.2: http://forum.lolcode.com/viewtopic.php?pid=2484 The issue was tabled and didn't make it in to the 1.2 spec. However, i...

 
@FredOverflow oh wow, for class?
 
@TonyTheTiger Yes, that's why you should not post uncompiled code...
 
@FredOverflow Literate programming comes to mind.
 
3:56 PM
I'm implementing it just to solve a euler project problem, but I"m kinda lost
 
@TonyTheTiger My students were given the exercise, and I wanted to make sure I was up to the job :)
Set<Weg> bekannt = new HashSet<Weg>();
PriorityQueue<Weg> nachbarn = new PriorityQueue<Weg>();
nachbarn.add(new Weg(startKnoten, 0));
while (!nachbarn.isEmpty())
{
    Weg min = nachbarn.poll();
    if (bekannt.add(min))
    {
        if (min.knoten == zielKnoten) return min.entfernung;
        for (Knoten nk : min.knoten)
        {
            nachbarn.add(new Weg(nk, min.entfernung
                    + min.knoten.gibVerbindungsgewicht(nk)));
        }
    }
}
return -1;
 
Most SIGFPE blog posts are compilable literate Haskell.
 
@FredOverflow lol, in German too :)
 
Gibberish again!
 
@FredOverflow I"m sure you're up to it
 
3:57 PM
@TonyTheTiger Well yeah, but I wanted to make it as concise as possible.
I'm quite satisfied with the result.
 
yea
so it seems the Priority Queue is the best data structure to use for implementing?
that's the one I've seen most often
 
Although a while/if/if/for nesting in a single methods calls for at least one "extract method" refactoring.
 
@FredOverflow I can only read the keywords. The rest must have been garbled by the internets.
 
no it's in German dude
Weg = Path
 
I think I did Dijkstra for algo class.
 
3:59 PM
Knoten = node
nachbarn = neighbour
 
@TonyTheTiger Yes, because the algorithm is based on insertion of neighbors and pooling of the nearest, so that needs to be efficient.
 
@TonyTheTiger Why would you want a knot-on for a node?
 
@TonyTheTiger Actually, nachbarn is plural, so neighbours.
 

« first day (320 days earlier)      last day (4611 days later) »