« first day (911 days earlier)      last day (4263 days later) » 

00:28
@salathe Should we talk about this more?
how do i insert an element into an array as the first element?
cool ty @Jocelyn
@crypticツ removed by author...
@crypticツ One day after I close-voted such a question, I got a comment from the OP "No, it is not a duplicate, don't you see the source code is different??"
3
@Jocelyn mine uses spaces instead of tabs too!!
++
:)
@crypticツ some people really don't deserve to get help :-/
@kaᵠ C++?
thatt= too :))))
01:26
I made a new meme =o)
user image
4
enjoy "Help Vampire"
hey
user142019
herro
user142019
I'm a Haskell fan
nice one @crypticツ :D
morning @Zoidberg fancy seeing you here :D went on codejam?
@Zoidberg I can tell from your awesome avatar
user142019
@kaᵠ yes, I'm through the qualification round.
01:31
@Zoidberg how'd ya do?
@Ocramius hi
@Eugene heya
user142019
@kaᵠ I'm bored as hell.
why @Zoidberg ?
@Eugene PR :P
01:32
@Ocramius wanted to let you know, that it seems to me, that I found bug in docs. :)
@Eugene you're reading 2.0.x docs. That's stuff of 2 years ago
@ScottW not! justa bunch of guys with glasses eating pizza here
@ScottW we're all fans, our job is to be cool
@Ocramius What can I say, Google proposed))
user142019
@ScottW TOOL <3
01:34
hmm @Ocramius seems we have opposing opinions :)
@ScottW they're the source of coolness \o/
@Ocramius you are right. It is correct here docs.doctrine-project.org/projects/doctrine-orm/en/latest/…
@Eugene anyway, if you find bugs, edit the docs online :)
user142019
@ScottW that video clip is hilarious.
@Ocramius sure
01:40
@ScottW well that is a valid "suggestion"
holaaaaaaa
yellow
@kaᵠ wat
01:53
@Ocramius nvm, joking
user142019
@kaᵠ United Nations Blue
Would anybody a good example of DM Factory off hand?
@Zoidberg no idea what you mean
@NickFury what's DM in this sentence?
unless it's blue cheese, yum
user142019
01:55
@kaᵠ you name a color, I name a color.
@Ocramius DataMapper
user142019
#4B92DB is called "United Nations Blue".
@Zoidberg color: beer
0
Q: What's the best way to optimize a MySQL Table containing 5 millions rows?

Jonathan HughThe table has an ID which is a primary key. The table contains 5 million items, and they are 15 types of items. All the items have a certain Number. What I did is the following: I split the table into 15 tables, then I re-split each of the 15 types into 10 tables according to the first digit of...

user142019
@Jocelyn Switching to PostgreSQL.
01:56
sometimes people have strange ideas...
@NickFury well, that's just an abstract factory, no?
user142019
@Jocelyn haha
user142019
OP forgets that databases are made for large sets of data.
@Zoidberg what runtime you got for code-jam C->large(2) ?
@Ocramius uhh maybe lol, let me google around
user142019
01:58
@kaᵠ what
@Zoidberg yes, 5 million records is for from being a large table
@NickFury this one looks quite generic but ok as an example: rlacovara.blogspot.de/2010/04/…
does anyone know of a framework that doesn't use MVC, MVC is really not my cup of tea!
user142019
@Connor Web framework? Express, Sinatra, Flask, Nancy, Noir…
02:00
@Ocramius switch statement? really? isn't there be a better implementation?
thanks, wow ill check them out!
@NickFury well, first of all, factories are crap code
with views, that's where you hide your horrors :P
anyway, it really depends then. The factory could reference some sort of container and then do fancy stuff from there
@Ocramius I've been following some of tereško's Model concepts. Why are they crap ?
@Zoidberg I just checked my own database: my 2 biggest tables have almost 8 million rows, and another table has 4.5 million rows. Of course everything works fine with the mysql server...
user142019
Meh MySQL.
02:10
@NickFury what exactly are we talking about?
user142019
I wish there was a good relational database that didn't use SQL.
user142019
There is Mnesia but it doesn't have useful stuff like constraints.
user142019
PostgreSQL does support Perl and Python but I'm not sure to what extend and whether you can use them to perform arbitrary queries without SQL.
@Zoidberg Neo4J ?
user142019
That's a graph database.
user142019
02:12
It stores graphs.
yes, I know, but it still has some of the stuff we use in RDBMSs
I really dislike the perl syntax
user142019
@ScottW A dialect of JavaScript that doesn't have retarded Unicode support.
user142019
SQL is case-insensitive. :(
user142019
@ScottW Perl. :v
user142019
02:14
Its Unicode support is quite good.
user142019
Perl is a language specialized in text manipulation.
user142019
Of course it has good Unicode support. :P
user142019
C is terrible.
Writing slides is sooo boring :(
user142019
Almost as terrible as PHP.
user142019
02:15
Or Java.
@Zoidberg hardly :D
user142019
I don't understand how PHP could ever happen.
user142019
It's a mayhem of lamentable design. Except it lacks design.
@Ocramius Lol I was told to not use ORM and instead use DataMappers. So I've been reading up on tereško's answers on Model2 MVC. I was just looking for some code to work off of
@NickFury an ORM can be a Data Mapper...
Doctrine, Hibernate, JPA, SQL Alchemy are all data mappers after all
user142019
02:19
Use SQL.
user142019
Stored procedures FTW.
@Zoidberg ARRRRRRRRRRGH! Kill it with fire!
I thought ORM's were an anti pattern? I'm so confused lol
user142019
Stored procedures are awesome.
user142019
02:20
ORM is not a pattern.
@Zoidberg they're the quickest way to get a fix income from a company: if something explodes, it's gonna be so fucked up that they will need YOU regardless where you are or how much you cost :D
user142019
DELETE FROM Languages WHERE Name IN ('PHP', 'Java');
user142019
@Ocramius ideally, I would also write the application in Haskell.
user142019
Because there are about 10 Haskell programmers on the entire planet.
02:23
So does what would you call this stackoverflow.com/a/5864000/710827 ?
@NickFury I don't get the question :\
ohhhh im thinking of active records
durrrppp
aaaah, yeah, keep away from AR
it's gonna hurt you
My bad I feel really stupid
user142019
Use stored procedures. In your application, write functions that take connection pools as arguments and invoke the stored procedures.
02:25
@Zoidberg stop it! I now got fanta in my nose XD
user142019
Who needs AR or ORMs seriously.
@Zoidberg lol what are the other alternatives?
user142019
Maybe stored procedures are bad if you use abysmal DBMSes like MySQL. Never used them in MySQL.
user142019
@NickFury stored procedures and application-side functions that wrap them.
@NickFury if you're taking him seriously, stop doing it now ;) /me goes wash nose - bleah
02:27
what about unit testing :P?
user142019
You can unit test the functions with a test database that you reset before every test.
not well..
user142019
Why not?
user142019
I do it all the time and it works great.
I don't know, I have no idea what I'm talking about. I confused ORM and Active Records
02:29
@NickFury ORM and Active Record are not the same thing. An ORM could or could not use Active Record.
user142019
AR is a way to do ORMs.
user142019
@Ocramius what's wrong with stored procedures, really?
user142019
They're easy to maintain, very versatile and fast as hell.
user142019
And you don't mix SQL with application code.
So should I not have a DataMapper Factory :P ?
user142019
02:32
You should have an AbstractDataMapperProxyFactorySingleton.
@Zoidberg fastest way to build something completely untestable. And they're an attempt to scale applications at DB level when you should focus on scaling the layers before that
user142019
I don't see how stored procedures are untestable really.
user142019
You write a program that invokes them on a test database that contains dummy data. It ain't rocket science.
@NickFury depends on what your data mapper(s) do
user142019
void prepare_test() {
    wipe_database();
    insert_dummy_data();
}

void test() {
    // whatever you want
}
02:34
@Zoidberg right on that. Yet you are still storing logic in your storage where it should just be storage
I guess I don't really need it on a small application
user142019
@Ocramius You are doing all data access in your database. That's what databases are extremely good at.
@Zoidberg I'd consider stored procedures only at a level where the income from a speedup in DB performance causes a dramatic revenue increase with minimal effort. I'd consider EVERY other solution before that
@Zoidberg data access, not data mixing-up-rewriting-on-the-fly-scrambling-returning-something-completely-different
That's not 1:1 with what my app requests to the db
I still think that moving any app logic to the persistence layer is conceptually wrong. I see this all the time since we implemented trigger-alike events in the ORM, and people just use it to build any possible imaginable crap :P
@ScottW so far I only saw abuses there, but maybe I didn't have the luck to see a good use case
02:56
Current hashrate: 800 Mhash/s
@ircmaxell wth O_o - did you already get news on the 50GH/s box?
nope
got a good deal on a 7970 board
I see...
had to install a few new fans in the case for that boy
heh. I tried to run with my poor 80MH/s here, but it's not worth it considering that my box eats 100W
03:03
I did the math, I'm profitable with this rig down to about $25 exchange rate
@ircmaxell I'll wait for the 5GH/s box... maybe will be too late, but won't lose hope :)
true, but when I get that box, I'll just add it to the overall capacity
well, the 50GH/s
yup. Saw how the 1500GH/s is built. It's just a jalapeno array with 2 usb hubs :O
that's a lot of jalapenos
wait, that's 300 of them...
that's more than addressable devices on a USB hub (256 max IIRC)... something doesn't sound right...
<- No idea whatsoever on hardware architecture here
But here's a mini one just fyi
03:10
127 devices per host controller
@ircmaxell then there must be more hubs for sure
@Ocramius it's 30 50GH/s models.
No, 127 per controller at the computer. Not per hub.
and hubs are counted as devices
2
A: What is and how to increase the maximum number of usb devices?

David CostaIt's by standard as explained here: https://en.wikipedia.org/wiki/USB_device#System_design You can't have more than 127 devices (hub inclusive) connected to a single host controller. Now: the host controller+3 hub (1st layer)+18 hub (2nd layer) = 22 devices that DON'T appear as disk devices. 1...

I see. Then they're no hubs for sure
@Ocramius They are hubs. Those aren't jalapeno's, but the one I ordered (30 x 50GH/s)
Aaaaaah, now that makes more sense
03:18
this GPU increased my average reward per share by an order of magnitude
03:31
@ircmaxell what's the mining $ output [$/hash] ?
There are estimators online
why estimate? is't there a fix value till 2029 or something?
, its statistical, and gets harder approx every few weeks...
03:34
ha:) thanx guys
what's the 'difficultyfactor' ??!?!
so... at your rate @ircmaxell (800MH/s) you'll get ฿1.59 (or $159 USD) in a month, seem accurate?
About that...
got it's some kind of auto-adjust factor...
03:51
laters
laters @Ocramius
 
1 hour later…
05:00
anyone still here?
@tereško I think I noticed a syntax error in one of your answers in particular public function create( $name )**;** ?
edit it @NickFury if you're sure
@kaᵠ I don't think they allow 1 character edits
what's the error?
you can after 2k rep
the added ; no?
05:04
actually he's gonna see your ping and fix it himself
I know, hence the pinging
I don't have 2k rep
yeah, added ; was looking below for some reason
ahh, yeah I just feel bad I triple ping'd him
there's just one ping
I edited it three times
05:06
:)))
yea
do you know how to get to all the values from an array by a key range? say i'm interested in keys 20 - 400 and the array has keys: 1 6 93 133 312 366 489 992 1000 ... etc
@NickFury ^ @igorw ?
uhh not really sorry. Without just iterating?
i don't have some of the values in between so iterating is a waste of time, looking for more efficient sollution
how slow is it? I guess it also depends on your ranges
05:17
slow enough
45
@kaᵠ I see what you mean lol, I just tried it out.
There's gotta be a better way!
05:34
@NickFury :) that's what i'm saying, at least using a builtin something
This is how I would have done it lol.
interesting site, also codepad.viper7.com and 3v4l.org
@NickFury that's very inefficient gonna die fast with a large array
lol yeah, what about array_keys() ? php.net/manual/en/function.array-keys.php
how? looks the same as foreach($arr as $key=>$val)
What's up with w3schools? A person who begins her answer with such a manifest is suspicious. — Green 4 hours ago
Green should:
1) Zoom to your avatar... (her ?)
2) Be punished by learning php from w3Schools ...
:)
Hi ...
monring Ihsan
mornings
monring teresko
@Ihsan did you just miss google code jam ?
06:13
@kaᵠ I do not miss it, I have no interest in it...
I do not understand, comprehend their english...
@Ihsan yeah, a bit too 'notational' :P
@kaᵠ Harvesting "global potential" of donkeys like me showing a carrot of 15K bucks... Cheap...
:D
@Ihsan the prize is really cheap indeed
@kaᵠ I think so..
@tereško I added a comment there. To enlighten "Green", I hope he/she/it will turn "Red" :D
@kaᵠ Hamza brought my attention to them here, together we had a look... The section he has shown me was the Afro-Arabian competition....
@Ihsan edit your comment (selling) instead of sell
@Ihsan 'without any authorization' => "without any authority"; 'in industry' => 'in the industry'
otherwise +1 nice one
@Ihsan i think i know of it from hamza too, or maybe web wandering ? dunno about that particular comp.
06:31
hmm .. should i shave or not ..
My decision on that is: Google is fooling people... Or making fun of them ... and actually telling "do not even dream of" :)
@kaᵠ Ok corrected but had to make it a new entry...
@tereško definitely! start with your legs :P
@kaᵠ Hahaha!
@Ihsan +1(bis), i don't see it that way, why 'make fun of people'? because of the low prize?
06:35
@kaᵠ No, overall, think about it, you are talking an audience of non - english native tongued people with that english...
What does it mean? Snobness?
maybe they just don't know better... it may be the way they talk :P
Playing the "high priest" of the web?... I find that puny...
and you're kinda right...
had to re-read each problem trice+ to get it... it actually isn't optimally worded
btw , your own native tongue is shining through .. you might put some effort in fixing that
@kaᵠ I first thought it like you, what if they reserved every useles people (specially the academic ones) to that job?
@tereško Kicking me?
I am not English...
06:39
neither am i
@tereško Well nice to know... :)
@tereško fix who what?
i just noticed that @Ihsan is talking funny
it's ok
.. don't mind me ... it's morning, i have to shave and then go to work
i'm somewhat pissed off at the world in general and humans in particular
06:42
@tereško that's normal for you, don't worry, go on :P
@tereško I just inhaled too much Helium
:D
yesterday , while walking from work (some time around midnight) i counted how many hours i have worked this month: since 1st it has been already over 165
@tereško And that is why you look ill-tempered every time...
Are you working under some form of slavery or what?
@tereško you working for a mob-boss?
@Ihsan that was not what i meant and you know it. I was referring to your sentence structure. I would recommend some audiobooks .. it would improve you syntax and expand the vocabulary
06:45
:))))
@tereško I know more than 65000 words in english... My english is fine. My current state of mind is not so... :D
You know the words, but you order them as in your native tongue.
I am not fully awake...
@Ihsan i really could never even approx how many words i know in eng or may native lang.
@tereško you're using 'tongue' a bit off too :) better 'language' in that context
i suspect that he was going for 2 ^ 16
06:49
@tereško Oh! That is hardly possible... Turkish word ordering is so different and awkward with respect to that of primitive English language...
++ :))) too bad i can't star that, out of context
@tereško Lol... 65536
@Ihsan maybe, but english is not primitive anymore:))) it evolved :)))
Exact number of words I know in English = 2 ^16
65535!
06:50
in pascal there was variable type: word .. that was it's limit
@kaᵠ I meant the count not the limit... LimitLo = 0, limitHi = 65535. count = 65536
@tereško yea! not in C++, was looking for it :P
@tereško Is it your word or machine word ? :D
true @Ihsan
not going back @tereško, sorry
@zigzag.bond place it outside your document_root
Downvoting of answers should cost -5 (at least)... Making the downvoter rethink it 5 more times...
7,163 Votes Cast
603	up
6,560	down
@tereško yure in top10 fo that
but php brings all the crap q's lately
06:58
@tereško If you attack uneducated repwhores, no problem...
@kaᵠ naah , you just have learned enought to start recognizing it
@tereško It rains sometimes.

« first day (911 days earlier)      last day (4263 days later) »