Coding: Fleeting Thoughts

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Re: Coding: Fleeting Thoughts

Postby Thesh » Mon Oct 24, 2011 4:53 am UTC

I'm not sure where you came up with 16^160 or if you really understand rainbow tables, but do you have any clue how large 16^160 is? You talk about building a table of 16^160 entries like it's a simple task.
Eppur si mouve.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 2573
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Southern California, USA

Re: Coding: Fleeting Thoughts

Postby Steax » Mon Oct 24, 2011 5:00 am UTC

I know it's ridiculously large. For all intents and purposes, I'm pretty sure nobody will attack my sites in such a manner. It does provide additional security over not using it, and the implementation is trivial (I really just use 2 salts, one of which being the original password, and alternate between them). So in the end I just use it anyway.

The 16^160 was for all the hexadecimal results of SHA-1 (160 characters, if I remember correctly).

I admit I'm not sure if the choice of using the original password as a salt is a good idea, but the guys over at security probably know more about that.
In Minecraft, I use the username Rirez.
User avatar
Steax
SecondTalon's Goon Squad
 
Posts: 2770
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Coding: Fleeting Thoughts

Postby Jplus » Mon Oct 24, 2011 11:36 am UTC

Jplus wrote:(Excuse me for ignoring the hash/salt discussion.)

I've been going through A Tour of Go. I used to be very sceptical about Go ("oh, yet another high level language"), but today I heard it was designed by Rob Pike so I got curious and I went through the tutorial. To my surprise it's really a modern reincarnation of C.

headprogrammingczar wrote:Actually... It's a modern reincarnation of Algol 68.

Well that seems like a moot point to me, since C was also a modern reincarnation of Algol at the time.
To be honest, I found the article you linked to a bit shabby because the code examples contain many little errors and the rationale behind the design decisions in Go is mostly ignored (often the motivation is similar to the motivation for design decisions in C). That said, I do think Go has some peculiar quirks, and I agree the language shows some surprising similarities with Algol. Or perhaps the similarities are not that surprising at all.
Hey, like coding? Perhaps you should check out the red spider project.
Feel free to call me Julian. J+ is just an abbreviation.
User avatar
Jplus
 
Posts: 1096
Joined: Wed Apr 21, 2010 12:29 pm UTC

Re: Coding: Fleeting Thoughts

Postby b.i.o » Mon Oct 24, 2011 11:48 pm UTC

An attacker doesn't have to compute extra rainbow tables per entry just because there are extra salts involved. For each database entry (I'm assuming each user has a unique set of salts, which is how it should be), the attacker needs to compute one rainbow table, to find the mapping from whatever the original password was to that one entry. The function to compute one entry in the rainbow table takes an input string (the password "guess") and does the same hash-with-multiple-salts process your application is doing to get the output hash. Adding more iterations slows it down. Interspersing more salts does not.
User avatar
b.i.o
Green is the loneliest number
 
Posts: 2514
Joined: Fri Jul 27, 2007 4:38 pm UTC
Location: Hong Kong

Re: Coding: Fleeting Thoughts

Postby Thesh » Tue Oct 25, 2011 12:41 am UTC

If each entry has a different, sufficiently large, random salt, you don't even compute a rainbow table. You just do a straight-up dictionary attack.
Eppur si mouve.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 2573
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Southern California, USA

Re: Coding: Fleeting Thoughts

Postby b.i.o » Tue Oct 25, 2011 1:01 am UTC

Right, sorry, that's what I meant. I was conflating the two terms.
User avatar
b.i.o
Green is the loneliest number
 
Posts: 2514
Joined: Fri Jul 27, 2007 4:38 pm UTC
Location: Hong Kong

Re: Coding: Fleeting Thoughts

Postby Steax » Tue Oct 25, 2011 1:51 am UTC

Yes, you could just do a dictionary attack. That particular route depends on the quality of the original hashed string, however.
In Minecraft, I use the username Rirez.
User avatar
Steax
SecondTalon's Goon Squad
 
Posts: 2770
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Coding: Fleeting Thoughts

Postby Thesh » Tue Oct 25, 2011 2:22 am UTC

No, it depends only on the quality of the password and the time to run the hash function (which is dependent on the number of iterations).
Eppur si mouve.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 2573
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Southern California, USA

Re: Coding: Fleeting Thoughts

Postby Steax » Tue Oct 25, 2011 3:14 pm UTC

Thesh wrote:No, it depends only on the quality of the password and the time to run the hash function (which is dependent on the number of iterations).


I agree, yes.
In Minecraft, I use the username Rirez.
User avatar
Steax
SecondTalon's Goon Squad
 
Posts: 2770
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Coding: Fleeting Thoughts

Postby phlip » Wed Oct 26, 2011 10:13 am UTC

Oh yeah. Guess who has two thumbs and just took a misbehaving buggy third-party library, bent it over backwards, and taught it who's boss?

Man, I'd probably stay at work until 8:30 more often if it meant feeling this good about what I'm doing.
... Don't tell my boss I said that, though.
While no one overhear you quickly tell me not cow cow.
but how about watch phone?
User avatar
phlip
Restorer of Worlds
 
Posts: 6779
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia

Re: Coding: Fleeting Thoughts

Postby Windowlicker » Sat Nov 05, 2011 2:55 pm UTC

More (possibly stupid) questions!
For one of my modules this year we're doing group projects, which means version control is needed. We've been doing fairly well with it so far I think, but I'm still not entirely sure if we're doing it... 'properly'.
I guess most companies would use version control for their projects, so I have (I think) two questions:
1) What is the most effective amount of work to commit? After a function is changed? After a class is changed? At the end of the day? We've been mixing between committing after a line is changed and after the entire file has been rewritten. It doesn't really help that these projects are so simple, we haven't really needed to go back to any previous versions or anything like that at any point.

2) I'm still not entirely sure how restoring to previous versions works. Is the entire thing undone? For example, say we want to create two functions. I write down the headers and leave the bodies blank, then commit that. Then I fill in function 1, and commit again. Function 2, then commit. Can I go back to the first version of function 1 whilst function 2 keeps its body? The word 'function' doesn't appear to be a word anymore. Function. Fuuunc.Tion.
Windowlicker
 
Posts: 323
Joined: Wed Dec 23, 2009 6:57 pm UTC
Location: St Andrews, Scotland

Re: Coding: Fleeting Thoughts

Postby phlip » Sat Nov 05, 2011 3:11 pm UTC

Windowlicker wrote:2) I'm still not entirely sure how restoring to previous versions works. Is the entire thing undone? For example, say we want to create two functions. I write down the headers and leave the bodies blank, then commit that. Then I fill in function 1, and commit again. Function 2, then commit. Can I go back to the first version of function 1 whilst function 2 keeps its body? The word 'function' doesn't appear to be a word anymore. Function. Fuuunc.Tion.

As long as the parts changed don't overlap, then yes, that's totally doable. It's called a three-way merge, mainly because the technique is usually used when you make changes to a file (but don't commit them), and then check out an update to that file - you have a base file, and two files with changes made, and it generates a file with both changes (as long as they don't overlap). But the same tool can be used to revert an old change without affecting later revisions (again, as long as they don't overlap). There's probably an option for it in your version control tool, whichever one you're using... look for terms like "revert" or "undo".
While no one overhear you quickly tell me not cow cow.
but how about watch phone?
User avatar
phlip
Restorer of Worlds
 
Posts: 6779
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia

Re: Coding: Fleeting Thoughts

Postby Xanthir » Sun Nov 06, 2011 7:52 am UTC

Windowlicker wrote:1) What is the most effective amount of work to commit? After a function is changed? After a class is changed? At the end of the day? We've been mixing between committing after a line is changed and after the entire file has been rewritten. It doesn't really help that these projects are so simple, we haven't really needed to go back to any previous versions or anything like that at any point.

Commit after you've done a logical unit of work that can be described in a short commit message. If you have to provide a bulleted list of changes, you've probably gone too long.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4021
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: Coding: Fleeting Thoughts

Postby Steax » Tue Nov 08, 2011 5:42 am UTC

So how does forum software usually track unread posts? A table that tracks when a user has visited a thread, with a timestamp? Sounds reasonable, although it could grow to huge numbers (at least no rows are needed for threads the user has never visited, which can simply be marked as unread). Or a cookie? That sounds more reasonable, but then it's specific to a computer...
In Minecraft, I use the username Rirez.
User avatar
Steax
SecondTalon's Goon Squad
 
Posts: 2770
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Coding: Fleeting Thoughts

Postby coyotebush » Tue Nov 08, 2011 5:53 am UTC

This forum site, for one, would seem to be tracking the most recent post I've read per topic. In particular, I can read page 1 of a multi-page thread and have it remain "unread".
User avatar
coyotebush
 
Posts: 54
Joined: Sun May 09, 2010 5:09 am UTC

Re: Coding: Fleeting Thoughts

Postby Steax » Tue Nov 08, 2011 6:11 am UTC

Perhaps, then, track the timestamp of the last post in the thread which a user has read. That seems closest to how it works here.
In Minecraft, I use the username Rirez.
User avatar
Steax
SecondTalon's Goon Squad
 
Posts: 2770
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Coding: Fleeting Thoughts

Postby phlip » Tue Nov 08, 2011 6:41 am UTC

If post ids are chronologically ascending, you can store the id of the last-read post, for each thread for each user... might be slightly cheaper than storing a date, and would avoid some possible corner cases when several posts are made at the same time...

As for what phpBB does... I remember that phpBB2 used to store the information in the session - so while you were browsing around it would remember your last-viewed post in each thread, but when the session ended all it stored was the last-visited date... so essentially it would mark every post as "read", whether you read it or not, when you left the site. But now in phpBB3 it stores the last-viewed post per thread per user in a more persistent way.

And sure, it'd be a lot of rows in that table... but each row wouldn't be that big, and it'd be all indexed and such. So it wouldn't be that bad.
While no one overhear you quickly tell me not cow cow.
but how about watch phone?
User avatar
phlip
Restorer of Worlds
 
Posts: 6779
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia

Re: Coding: Fleeting Thoughts

Postby mfb » Thu Nov 10, 2011 2:24 pm UTC

phlip wrote:If post ids are chronologically ascending, you can store the id of the last-read post, for each thread for each user...

In general, they are not, as posts can be copied (so you can get old posts with new ids) in most forums.

vBulletin 3 lets the administrator choose:
- cookie-based: The read threads (I think the postIDs*) are stored in a cookie, inactivity marks all threads as read.
- database-based: Same as with cookies, but the status is saved even when the user logs out.
Threads with no new posts in the last x days are marked as read.

*I can check that later
mfb
 
Posts: 803
Joined: Thu Jan 08, 2009 7:48 pm UTC

Re: Coding: Fleeting Thoughts

Postby mister_m » Fri Nov 11, 2011 5:36 am UTC

I aspire to become a master of C. Does anyone know where I can find a decent writeup about heaps and maps? I'd like to implement these data structures.
User avatar
mister_m
 
Posts: 33
Joined: Fri Feb 04, 2011 2:51 am UTC

Re: Coding: Fleeting Thoughts

Postby EvanED » Fri Nov 11, 2011 4:17 pm UTC

Any algorithm book, probably. This is one of the standard suggestions.

For maps, you have to decide whether you're more interested in tree-based or hash-based maps.
EvanED
 
Posts: 3781
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI

Re: Coding: Fleeting Thoughts

Postby Anonymously Famous » Fri Nov 11, 2011 4:27 pm UTC

ThinkGeek reminded me on Facebook that today (in mm/dd/yy or any variation thereof) is the last binary-friendly day until 2100. Anyone planning on doing something binary?
Anonymously Famous
 
Posts: 240
Joined: Thu Nov 18, 2010 4:01 am UTC

Re: Coding: Fleeting Thoughts

Postby Robert'); DROP TABLE *; » Sat Nov 12, 2011 6:43 pm UTC

Code: Select all
List<BotListener> objects;
...
foreach (Type type in Assembly.GetExecutingAssembly().GetTypes())
            {
                if ( typeof(BotListener).IsAssignableFrom(type) )
                {
                    var Const = type.GetConstructor(new Type[] { });
                    if (Const != null && Const.GetParameters().Length == 0)
                    {
                        object o = Const.Invoke(null);
                        objects.Add(o as BotListener);
                    }
                }
            }

Should I be ashamed? :P
(In case it's not clear, this code looks through the program its running in for classes which implement an interface called BotListener, and then instantiates them dynamically.)
...And that is how we know the Earth to be banana-shaped.
User avatar
Robert'); DROP TABLE *;
 
Posts: 635
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

Re: Coding: Fleeting Thoughts

Postby Steax » Wed Nov 16, 2011 8:43 am UTC

Throwing this out for my fellow web app developers: Twitter's Bootstrap library/framework/template/whatever is a great place to start when you need to whip up a simple but usable app. It has a bunch of basics you might need. I couple this with the Flourish Library for PHP and it's really soothed my soul of late.
In Minecraft, I use the username Rirez.
User avatar
Steax
SecondTalon's Goon Squad
 
Posts: 2770
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: Coding: Fleeting Thoughts

Postby cemper93 » Wed Nov 16, 2011 4:53 pm UTC

Bobby Tables: The fact that I really don't want to know for what kind of messed up design this code is needed (if it's not for fun) aside, I'll randomly be nitpicky and rant on a single Expression:
Code: Select all
 objects.Add(o as BotListener);

Specifically:
o as BotListener
o as BotListener
o as BotListener
o as BotListener!

Please, a C# cast works like this:
Code: Select all
objects.Add( (BotListener) o );

Your version has the disadvantage that if the cast failed, it would not throw an error - it would just silently fail and return null, which may not really be what you desired. Of course, in the example at hand, failing is quite impossible, it's just that the "as" keyword in general is a mighty, but dangerous force to play with and should never be used if its specific behaviour isn't needed, whether it looks more nicely or not.

Nice trick, though. ;)
Hello good friend.<br>Thank you for the kind insight. To gain free XBOX, please click this link <a href="http://forums.xkcd.com/viewtopic.php?f=53&t=37971">for m&ouml;re information visit our website.</a><br>Also more can be found.<br>Best regard
cemper93
 
Posts: 160
Joined: Sun Feb 20, 2011 2:35 pm UTC
Location: `pwd`

Re: Coding: Fleeting Thoughts

Postby Sc4Freak » Thu Nov 17, 2011 12:47 am UTC

I dunno, I've seen that "trick" everywhere and IMO if it's blindingly obvious that the cast can never fail, using "as" is okay.

eg.

Code: Select all
if(sender is TextBlock)
{
    (sender as TextBlock).Text = "Hello, world!";
}
User avatar
Sc4Freak
 
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: Coding: Fleeting Thoughts

Postby Robert'); DROP TABLE *; » Thu Nov 17, 2011 1:00 am UTC

I wrote it like that because I wanted dynamic plugins, and couldn't be bothered writing it "properly" the first time around. (i.e. have it to load DLLs or something more sensible) Also because I wanted to see if it would work. :P
...And that is how we know the Earth to be banana-shaped.
User avatar
Robert'); DROP TABLE *;
 
Posts: 635
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

Re: Coding: Fleeting Thoughts

Postby Ended » Fri Nov 18, 2011 12:01 pm UTC

Code: Select all
state = [st for s in state for st in states[(s,letter)]]

from http://swizec.com/blog/strangest-line-o ... wizec/3012

Makes my brain hurt a bit.
Generally I try to make myself do things I instinctively avoid, in case they are awesome.
-dubsola
Ended
 
Posts: 1458
Joined: Fri Apr 20, 2007 3:27 pm UTC
Location: The Tower of Flints. (Also known as: England.)

Re: Coding: Fleeting Thoughts

Postby RoadieRich » Fri Nov 18, 2011 2:32 pm UTC

Ended wrote:
Code: Select all
state = [st for s in state for st in states[(s,letter)]]

from http://swizec.com/blog/strangest-line-o ... wizec/3012

Makes my brain hurt a bit.

Code: Select all
state = []
for s in state:
    for st in states[(s,letter)]:
        state.append(st)


I don't see what's so hard about that.
roband wrote:Mav is a cow.

UniJam 2012: Inter-university Games Jam hosted by Nottingham Trent University DevSoc.
nlug: Nottingham Linux User Group
DevSoc: The Nottingham Trent University Software Development Society
User avatar
RoadieRich
The Black Hand
 
Posts: 1030
Joined: Tue Feb 12, 2008 11:40 am UTC
Location: Somewhere only we know

Re: Coding: Fleeting Thoughts

Postby not baby Newt » Fri Nov 18, 2011 2:47 pm UTC

Ended wrote:
Code: Select all
state = [st for s in state for st in states[(s,letter)]]

from http://swizec.com/blog/strangest-line-o ... wizec/3012

Makes my brain hurt a bit.

Me too. I keep trying to understand it by decomposing into the 1-loop version.
Code: Select all
[st for s in state]

[state for st in states[(s,letter)]]
Either fits the basic syntax pattern but makes no sense.

That blog post had comment link to http://www.python.org/dev/peps/pep-0202/ which I found enlightening even though it didn't really explain anything.

I now think it better to see the construct as [<Return value/expression><one or many loops><zero or more conditions>] and not try to express the two-loop version as two single-loop expressions.

st -- result.
for s in state -- first loop.
for st in states[(s,letter)] -- second loop

I understand.. neat!


RoadieRich: Perhaps I made the/my source of confusion clearer.
not baby Newt
 
Posts: 108
Joined: Wed Feb 03, 2010 11:30 pm UTC

Re: Coding: Fleeting Thoughts

Postby Xanthir » Fri Nov 18, 2011 4:50 pm UTC

Ended wrote:
Code: Select all
state = [st for s in state for st in states[(s,letter)]]

from http://swizec.com/blog/strangest-line-o ... wizec/3012

Makes my brain hurt a bit.

This is just written confusingly. With better variable names it's clearer:

Code: Select all
current_states = [new_state for current_state in current_states for new_state in state_transitions[(current_state,input)]]


This is implementing an NFA. You take the list of states you're currently in, and for each one, collect all the states that result from transitions from that state using the given input. This gives you a new set of current states.

Something missing from that is the uniquifying step, since you'll often end up with multiple starting states ending up in the same end state. That may be present in code that we can't see, though.

Edit: That said, nested list comprehensions are somewhat hard to read in any situation.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
My HERO!!!
 
Posts: 4021
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex

Re: Coding: Fleeting Thoughts

Postby mister_m » Mon Nov 21, 2011 11:45 pm UTC

EvanED wrote:Any algorithm book, probably. This is one of the standard suggestions.

For maps, you have to decide whether you're more interested in tree-based or hash-based maps.


How would you make a data structure generic in C?
User avatar
mister_m
 
Posts: 33
Joined: Fri Feb 04, 2011 2:51 am UTC

Re: Coding: Fleeting Thoughts

Postby TheChewanater » Tue Nov 22, 2011 2:42 am UTC

mister_m wrote:
EvanED wrote:Any algorithm book, probably. This is one of the standard suggestions.

For maps, you have to decide whether you're more interested in tree-based or hash-based maps.


How would you make a data structure generic in C?

void* ?
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.
User avatar
TheChewanater
 
Posts: 1264
Joined: Sat Aug 08, 2009 5:24 am UTC

Re: Coding: Fleeting Thoughts

Postby EvanED » Tue Nov 22, 2011 4:15 am UTC

mister_m wrote:
EvanED wrote:Any algorithm book, probably. This is one of the standard suggestions.

For maps, you have to decide whether you're more interested in tree-based or hash-based maps.


How would you make a data structure generic in C?

Short answer: go cry; maybe God will hear your tears and reward you with a better language. :-)

But barring that, there are two options to actually do it, both sucky. One option is to lose the small amount of type & memory safety you get from C, and just use void*. The other is to use macro hackery. If you define your implementation in a header file, you can arrange things so that something like
Code: Select all
#define HEAP_DATA_TYPE double
#include "my_heap.h"

(I suggest actually undefining HEAP_DATA_TYPE in my_heap.h, but that's personal preference. There is a reason though -- it seems like it would reduce the risk of including my_heap.h with the wrong type.)

I think the latter option sucks less, but that's me. (It means that merely the implementation of your heap is terrible, whereas with a void* interface, the use of it is as well.)
EvanED
 
Posts: 3781
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI

Re: Coding: Fleeting Thoughts

Postby Jplus » Tue Nov 22, 2011 3:41 pm UTC

Personally, I'd just say that you don't do generic programming in C.
Hey, like coding? Perhaps you should check out the red spider project.
Feel free to call me Julian. J+ is just an abbreviation.
User avatar
Jplus
 
Posts: 1096
Joined: Wed Apr 21, 2010 12:29 pm UTC

Re: Coding: Fleeting Thoughts

Postby headprogrammingczar » Tue Nov 22, 2011 4:07 pm UTC

Fleeting thought: self-modifying Perl code is way too much fun.

Code: Select all
sub load {
  my ($state, $module) = @_;
  my ($fh, $code, $error);

  open($fh, "<", "modules/$module.pl") || $error++;

  $code = join('', <$fh>);

  eval $code;
  if ($@) {
    warn $@;
    return 0;
  } else {
    return 1;
  }
}

sub callback {
  my ($state, $name, $func) = @_;

  $state->{$name} = sub {
    $func->($state, @_);
  };
}

$pm = sub {
  my ($state, $dest, $line) = @_;

  $state->{'write'}->("PRIVMSG $dest :$line");
};

&callback($state, "pm", $pm);
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you
User avatar
headprogrammingczar
 
Posts: 2953
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: Coding: Fleeting Thoughts

Postby EvanED » Tue Nov 22, 2011 5:03 pm UTC

Someone I knew in undergrad told me about a script he wrote (I'm guessing Perl) that would compute factorial by reading in its own source, changing, say, 10 to 9, and then rerunning itself. He said he mainly wrote it so that he could say "if (10 == 1) ...".
EvanED
 
Posts: 3781
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI

Re: Coding: Fleeting Thoughts

Postby TheChewanater » Tue Nov 22, 2011 7:41 pm UTC

Jplus wrote:Personally, I'd just say that you don't do generic programming in C.

Alternatively, if you really crave generic programming, use C++. Or maybe Python, which uses duck-typing, depending on your other requirements and preferences.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.
User avatar
TheChewanater
 
Posts: 1264
Joined: Sat Aug 08, 2009 5:24 am UTC

Re: Coding: Fleeting Thoughts

Postby headprogrammingczar » Thu Nov 24, 2011 3:51 pm UTC

Or Haskell, where "generic programming" can mean parametric polymorphism, type classes, GADTs, type families, functional dependencies, kind-polymorphism, ...
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you
User avatar
headprogrammingczar
 
Posts: 2953
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: Coding: Fleeting Thoughts

Postby TheChewanater » Fri Nov 25, 2011 6:48 pm UTC

FT: Does anyone know of a roguelike or RPG with really well-written and comprehensible source code?
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.
User avatar
TheChewanater
 
Posts: 1264
Joined: Sat Aug 08, 2009 5:24 am UTC

Re: Coding: Fleeting Thoughts

Postby Thesh » Tue Nov 29, 2011 8:30 pm UTC

Attention person who used to work here before me: mm is months, mi is minutes. If you want to create a unique file name using the time stamp yyyymmdd_hhmmss is not necessarily going to work... Not as well has yyyymmdd_hhmiss.
Eppur si mouve.
User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
 
Posts: 2573
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Southern California, USA

PreviousNext

Return to Coding

Who is online

Users browsing this forum: No registered users and 10 guests