Hacker News new | past | comments | ask | show | jobs | submit | szabgab's comments login

In the Rust Digger project we collect data from crates, at this point it is only the meta-data from crates.io, but we plan to include data from the GitHub repositories.

However, this data is already useful for some minor contributions to Rust crates. Specifically, crates that have a link to their VCS are going to be easier to find if someone wants to contribute to them.

So we created a report listing all the crates that do NOT have such a link. See the first report.


I am doing some research into how various organizations handle open source and contribution to open source and I just bumped into this page listing various Government agencies around the world and their GitHub organizations. It's a goldmine.


Thanks for posting. Several new subscribers have arrived!


It seems many people don't know about .gitignore or misunderstand its use.


I think one of the best ways to learn and practice software development is by participating in Open Source projects.

I've organized quite a few Meetups and Hackathons where the goal was to help people get started with Open Source.

I am now thinking on how to extend this into a full course or a longer hacking session, maybe similar to Google Summer of Code.

I published my plan on the linked pageand I keep updating it as I read more about the topic and as I get feedback on various forums.

Your input would be more than welcome!


Based on this article A-GPL sounds like a good idea for applications and maybe for libraries used in products. Probably not so good idea for libraries used primarily by sysadmins and other in-house engineers.


... and Java and C and C# and even PHP gets more complex as the code base grows. I am sure you don't pretend that naming one, or 3 does not send the message that that the others are not.


I only named those three because they were within the context of the discussion. Nothing more. The idea that complexity increases over time and become a barrier to entry applies to a great many things.


nice!


Unfortunately that Perl code is not a good representative of how one should write Perl in 2011.


Do you care rewriting it for us(me)? Just curious for how perl should look like now


I'm a complete cowboy, and would probably write something like: http://pastebin.com/mvjTG9XG

Edit: spot where I missed a comma :-P


Don't quote the variables, use placeholders. It's much simpler, and it's safer.

$dbh->do( 'INSERT INTO movie_collection VALUES ( ?, ?, ... )', undef, @{ $data->{movie} }{@fields} );


  > knee-jerk reaction
Fixed that for you.


Sure. Where's the dbh coming from in this example though? And how do I get it out again nicely to print the SQL to the command line?


It doesn't exist in the example, which is only creating the INSERT statements, presumably to pipe into, e.g., the mysql command line client:

mysql -u user -p < inserts.sql

If the $dbh were in the example, then:

(a) you could avoid that (eek!) archaic escapeSingleQuote() sub, e.g., my $released = $dbh->quote($released), but much better:

(b) as mentioned, use the SQL placeholders to avoid quoting altogether, but

(c) if you really want to print the INSERT's, just do method (a). Start by declaring the $dbh, e.g. for MySQL:

my $dbh = DBI->new( 'DBI:mysql:my_db', 'db_user', 'db_pass');


Made the SQL portion a little more readable: http://pastebin.com/MNzD0NSE


Ah, much better.

[It doesn't need saying but one could be even lazier and instead of generating a timestamp, one could use NOW() or an automatic timestamp field.]


I don't have time for that..

Looks good though, much more readable.


Thanks for posting the link. I just added my HN id along with 10 other ids to my account: https://metacpan.org/author/SZABGAB


You're welcome.

BTW I have this little script which lists all MetaCPAN / HN users: https://gist.github.com/1222875

Currently it lists 5 users....

  PHAYLON (hn: phaylon)
  DRAEGTUN (hn: draegtun)
  JAITKEN (hn: LoonyPandora)
  SZABGAB (hn: szabgab)
  WOLDRICH (hn: trapd00r)
Hopefully thats just the start :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: