« first day (1545 days earlier)      last day (3416 days later) » 

1:00 PM
Good afternoon everyone!
 
@Jimbo they'll just use fake joins there too
 
user3949359
@HamZa and a transaction is a cross-collection/table operation that has to do everything it was asked in order to complete, or it won't complete at all. Right?
 
@DaveRandom about what?
 
@nosille No idea. I never used transactions in production
 
If there's any RNG expert around: how's RNG testing called again?
there was a name for it...
 
1:04 PM
@Ocramius Randomness tests ?
 
nope, there's a different name
 
@Ocramius statistical testing?
 
nope, not either
 
user3949359
What does a "shell" mean in computer science?
 
In computing, a shell is a user interface for access to an operating system's services. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operation. The design of a shell is guided by cognitive ergonomics and the goal is to achieve the best workflow possible for the intended tasks; the design can be constricted by the available computing power (for example, of the GPU) or the available amount of graphics memory. The design of a shell is also dictated by the employed computer periphery, such...
 
user3949359
1:08 PM
is the MS command line a shell for example?
 
Indeed!
 
Isn't DOS more the command line interface? And how it's communicating called Shell?
 
user3949359
@KevinMGranger Could you give me an example of a GUI shell?
 
user3949359
@Duikboot DOS is an OS
 
@nosille if you scroll down in the wiki article, there is a screenshot of it as an example...
 
1:10 PM
Wait wiki says it better: " The interface is usually implemented with a command line shell, which is a program that accepts commands as text input and converts commands to appropriate operating system functions."
 
user3949359
@Duikboot I was thinking about asking the same question.
 
user3949359
@Patrick From this description it looks like everything is a shell
 
@nosille everything that gives you access to the os services
 
I'm a shell of my former self.
 
gui or cli
 
1:11 PM
@nosille my desktop environment, Gnome. Basically, if it's an interface presented by the OS, it's a shell. However, shell is used colloquially to mean a commandline interface, typically. It depends on context.
 
@PaulCrovella lol =]
 
Rather, presented by the OS in order to interact with OS services, like Patrick said. A game wouldn't really be a shell.
 
user3949359
@KevinMGranger For a second I thought you were calling me a gnome, but then realized.
 
@KevinMGranger You've clearly never used doom to kill processes
6
 
bah. Security issue reported on public issue tracker
I want to strangle somebody.
 
user3949359
1:14 PM
@PaulCrovella mind=blown
 
@Ocramius linkie?
 
@salathe Install gogs they said. It should be rather painless they said...
 
yeah, @Ocramius, publicize the security issue to a room full of trolls.
 
@FlorianMargaine only after a fix
 
The last bite is always the best and the worst :(
 
1:17 PM
@PaulCrovella trolls? is that all we are to you? :(
 
@Patrick you aren't? GET OUTTA HERE!
 
@Ocramius first I want my mvc!
 
@Patrick is that not enough?
 
What are your suggestions for creating a higher pagerank in Google?
 
1:27 PM
@Duikboot Add a hidden div with all the keywords you can think of and some more
:P
 
Really? :D haha
 
@Duikboot lots of backlinks from high pr sites. lots of internal pages that are interlinked properly to boost pagerank. a bunch of other sites with a LOT of backlinks with links to your pages (and other of course to make it not obvious)
@Duikboot read the pagerank paper, it's explained how it works (or used to work in the beginning)
 
Where can I find that one? :-)
 
An SEO expert walks into a bar, beer, alcohol, drinks, restaurant, pub...
2
 
The thing is I am thinking about ( like I said yesterday) When you create a website wich sells... coffee for example when you type in Coffee that your website with as domain beans.com but with coffee related content can appear as first site.
 
Thank you @Patrick !
 
@Duikboot Pro tip: use adwords instead
 
I never considered it before, but the one search result you know you can trust is that for "seo expert"
 
@PaulCrovella so I'll go to wikipedia for seo? ;)
 
user3949359
what is a database instance? A specific database ?
 
1:40 PM
@nosille type that into google and find out...
 
user3949359
@Patrick since there are two keywords and both are popular, chances are results won't be relevant
 
then try bing, it works for porn
 
@PeeHaa Adwords,... Lets say there is no problem using that ( I've never done that before but I guess you have to setup a campaign "buy" some words. And after that you setup click-limit $$ for every day.

But what if company X - Company y - company z all are using Adwords? Is it then just a war? Who's paying the most?
 
user3949359
@PaulCrovella porn shows up no matter what the keywords are
5
 
1:42 PM
@Duikboot yes. guy with the best profit margin/conversation rate wins
 
that s*cks
 
@Duikboot Exactly that
 
Sorry, I had no other word for it.
 
A trick I heard: concentrate on smaller niches. For example, pay for "Honda car" and not for "car"
There will be much less competition
 
@Duikboot why?
 
1:46 PM
@nosille rule 34 at its finest
 
Why? :)
 
user3949359
@FlorianMargaine correct
 
user3949359
So the "instance" is sitting on the memory and "talking" to the database and using up CPU resources?
 
@FlorianMargaine Because I want to call Marine Le Pen and idiot on Twitter and I want to know if "Vous êtes un imbécile" is correct.
 
@DaveRandom I'm fairly certain he understands some Engrish ;)
 
1:59 PM
@PeeHaa One must make some effort to communicate with the natives in their own tongue. Even if they are fucking retards.
 
:P
 
@DaveRandom ur id10t
 
@webarto or maybe Y U NO KILL URSELF??!?!?!?
But no, I shall keep it simple yet articulate.
/me goes offline to install a fresh gfx card
 
this situation is already fucked, but bombing the kebab shop is just cutting off your nose to spite your face
 
blah
 
2:16 PM
blah
 
@PeeHaa I just saw something 'disturbing' out of your country... :D
 
@Naruto what is it?
 
@Naruto link or GTFO
 
hahaha, I don't think suck talk is allowed in here? :D
 
Now I really want to know! :)
 
2:20 PM
haha me too
@Naruto we post many times off-topic links here and even discuss them :P
 
@Naruto lolwut the title
 
@Naruto I'm still Dutch ;)
Old news ;)
 
tag nsfw things with nsfw please ...
 
@Naruto I can only read like 5 words of that article, but I think I get the gist.
 
2:23 PM
@JoeWatkins sorry
@PeeHaa why am I not suprised such things are considdered 'normal' in your country :D
 
:P
In my old job they signed me up for the pabo so I got the thing every month in the office :P
 
@PeeHaa ahahhahaha
 
@DaveRandom "une". Marine is a woman
 
As today and yesterday are my SEO 'days ... I have an other question: Is it a positive thing to own more then 1 domain wich leads to your website?
Lets say: www.bmw.com and you have www.germancar.com which leads to bmw.com
 
@Duikboot No. If anything it only hurts
 
2:30 PM
@FlorianMargaine Ahh of course, tnx
 
... What is good in doing this? Only people who directly navigate to that url will go to the 'real site'... so I don't know
 
That's the only reason I hang out here, go help insulting people in their native language
 
What would you do if, theoretically, you left a dev job for a 15k pay rise. Then 6 months later, friend (colleague) from previous company is authorised to employ a solutions architect for another 10k on top and he approaches you first? Take it?
 
@Jimbo it depends entirely on how I felt about working at each place. 10k isn't a significant difference
 
10k is a significant difference in some countries/valutas ;)
 
2:34 PM
@Jimbo By virtue of 2nd hand accounts/descriptions of the companies in question, I would stick with what you have. But 10k is a lot, I suppose, and it would be more about your opinion that opinions people have voice to me...
 
@Duikboot depends. lots of people buy domains with misspellings. as long as you 301 them it shouldn't really matter
 
@PaulCrovella It is a fairly significant difference...
 
@Duikboot but a better use would be to use those domain to set up other sites with their own content which link to your site...
 
@DaveRandom Also means rent goes down by £300.. which equates to an extra 6k payrise (ish)
 
@Jimbo Yeh and you do live in a weird place atm
 
2:35 PM
@PaulCrovella almost 830 a month more is not significant?
 
@Duikboot duplicate content is bad
 
Well, you'd live in a weird place then as well, but a weird place you're more familiar with
 
@Jimbo what about job satisfaction?
 
@Duikboot maybe some ads perform better with different urls.
 
Thanks for the repsonses, indeed duplicate content is bad.
 
2:36 PM
@PeeHaa 301 is not duplicate content though
 
if you live in the USA and you earn 100k, 10k is not really significant.
If you live in the netherlands and you earn 40k, 10k is really significant
 
permanent redirect no?
 
@Patrick It is not, but then there is no reason to use different domains
 
@Fabor Of course - can't know what job satisfaction in the new job is like though
 
@PeeHaa misspellings, tlds etc
 
2:37 PM
s/netherlands/uk
 
@Jimbo But were you happy enough at the old
And how happy are you with the current salary
 
@ErikBaan this, yes. thank you.
 
I think I could pay off debts and save faster on a higher one ;)
 
@Patrick None of them related to SEO :)
 
I had someone talking to me and he says my website scores bad on google. When I have visited their website I saw the following: a logo - a menu - a image slider as front page ( that's it )
I think when he should re-organize the content, and put some more unique and related content on his frontpage it would already improve the SEO stats
 
2:40 PM
@PeeHaa buying a domain with a lot of backlinks and 301ing it... ;)
 
lol
Those domains are shit expensive sadly
Stupid domainwhores cc @webarto
 
@PeeHaa unless you build the links yourself. That happens a lot in the shady niches. Build up a domain with a lot of backlinks, 301 it to your landing page, bank until it tanks. Then point it to the next landingpage.
Not sure if that still works
But it used to
 
Let's say the the current website ( homepage ) looks like: smartik.ws/wp-content/uploads/freshizer/… with a menu on top.
 
@Jimbo Save for?
 
@Fabor Nice Car / House, depends how mature I'm feeling. I'm not ready to settle down yet, might even move to the US / Canada still, so ... possibly car :P
 
2:45 PM
My suggestions where:
- Add more content to your frontpage.
- Add internal links to other pages
- Add a site map
- Add descriptions to your images *
- Pick some unique content which is especially related to your business.
 
Good morning
 
(*) - Are alt=".." elements alway being indexed ? Or is this something which is only used when the image is not available?
 
@Jimbo Well 10k is a lot, just factor in job satisfaction
 
@ircmaxell Morning
 
youtube.com/watch?v=-KIC1LXxcGM#t=30 <-- that guy is an idiot. Parroting marketing perception rather than fact
 
2:51 PM
@ircmaxell Thing is though - perhaps he needs to be educated if he's incorrect? He might think he's learned a lot and is passing it down to others
Something I'm worried about when giving talks at phpnw - might this year- is: what if there's a couple of you's in the audience thinking the exact same thing :-(
 
back up what you say
he just drew a graph, said that Mongo is way more scalable than a RDBMS, but provided no proof (anicdotal or otherwise) as to that
despite the fact that it's patently wrong
 
@ircmaxell Basically your statement stimulated me to ask a question I've been thinking for a while, it wasn't directly to do with your post specifically
 
@ircmaxell Not just scale. It's WEBscale
\o/
 
Is it wise to pass your talks through more experienced seniors so they can make sure you're not full of **** :D
 
You can definitely do that
 
2:54 PM
@ircmaxell omg, this video is so informative, must subscribe, wow
 
or give your talks in a fashion that they are more opinion than fact
in which case that's awesome
but when you get up, and pretend what you're giving is fact, it should be correct (or at least be able to be backed up by something)
 
Yeah, I tried to do that the first time at the phpnw usergroup - it was more "Here's what I've done, let me know what you think"
I had a few drinks, I think I might have offered people to throw glasses at me if I was wrong
 
> "it's missing transactions, but it's not so bad, because you dont really need transaction so often"
 
very basic unit testing question; lest assume we have a function for e-mail validation and we do it by regex. Should this regex repeat same way on unit test and production? Or should be shared ?
*let's assume
 
@Teomanshipahi don't use regex for email validation (unless it's really simple /\.+@\.+/)
 
2:56 PM
you really should use filter_var()
 
@tereško no
 
@Teomanshipahi just don't
 
but to answer your question, why would you need to repeat the regex? The test shouldn't need the regex, but instead should have known good (and bad) values
 
@ircmaxell what then ?
 
filter_var() is useful to verify it's at least an attempt at an e-mail, from what I've read
 
2:57 PM
@tereško I just check for an @ sign, then actually send them a verification email with a verification link.
 
@Teomanshipahi the unit test should not fail just because you push your code to a different environment
 
filter_var fails on valid emails, and lets through invalid emails
just send an email, it's the only full test
 
@ircmaxell seems reasonable
 
My question is more about, unit testing mentality not about email validation.. I mean if I Use regex for "something" is that regex value must be both on test and production function?
 
validation and verification are completely different things, and verification does not necessarily cover the use case for validation
 
2:59 PM
2 mins ago, by ircmaxell
but to answer your question, why would you need to repeat the regex? The test shouldn't need the regex, but instead should have known good (and bad) values
 
@ircmaxell In all honesty all sane addresses are correctly handled
As in it works better than most mailservers :P
 
@Teomanshipahi You could make the regex for it a class constant within the class that it's used for perhaps?
This gives you static access if, for some reason, you'd need it in a unit test (I've seen well known devs like igorw do this)
Which must mean it's right ;-)
 
@ircmaxell Hmm, so unit test function will not truly validate email with regex or filter_var but should know about good and bad values?
 
@PeeHaa the source mailserver only needs to know the domain, and if the destination mailserver accepts an invalid address, who are we to say no?
@Teomanshipahi yup.
@Teomanshipahi knowing about the regex is an implementation detail. Unit tests should test functionality, not implementation
 
@ircmaxell got you, thanks for clafication :)
 
3:02 PM
after all, it's a regex today, but may be something else tomorrow
you don't want your tests to break because you made a functional change that still works correctly
 
but test will not know changes in production code right, even if production fails it will keep saying it is passing
I mean implementation of production code fails
 
if you test implementation, then correct
but if you test behavior, you're validating what's happening
 
posted on January 08, 2015 by kbironneau

/* by bgallagh3r */

2
 
When writing the implementation, think of the tests as a black box. Don't think how they test, think what specifically they are testing. And when writing the test, don't think of the implementation, think of the concept or behavior you're implementing and test that.
 
From RFC-2821: The standard mailbox naming convention is defined to be "local- part@domain": contemporary usage permits a much broader set of applications than simple "user names". Consequently, and due to a long history of problems when intermediate hosts have attempted to optimize transport by modifying them, the local-part MUST be interpreted and assigned semantics only by the host specified in the domain part of the address.
 
3:10 PM
exactly why I don't even try to validate it
 
Let the user validate it themselves, by clicking the link sent to their email, right?
 
yup
because that ensures it's not only valid, but correct
 
waz up?
 
nothin' much, looking for distraction ...
 
3:21 PM
build a tracing JIT as a PECL extension
 
Build an analyzer for pure PHP functions
shouldn't be too complex <_<
 
@ircmaxell I saw some talk of this the other day ...
 
I know, I have a basic foundation layed :-)
 
sharing yet ?
 
nothing worth sharing
yet
the big thing I need to do is figure out how to handle the bailout
 
3:26 PM
you can't use bailout built into zend ?
longjmp
 
no, because it's not a bailout of the entire engine
but a bailout of the JIT into the VM
so if a guard fails, it doesn't need to unwind the execution and start it again
basically, I'm thinking of encoding the opline number into the guard instruction, so that when the guard fails, I get the opline number it failed for, and can hence seek to that opcode and then resume the VM
but that means that variables must be shared
 
@rdlowrey Where art though!
 
for simple types that's not really a problem ...
I wonder, what kind of things you would look to optimize, gimme a pseudo trace in whatever form it makes sense in ?
just because the most obvious things are either really quite difficult (to work with ht and share it) or would introduce weird edge cases ...
 
@Fabor Must be touring atm
 
heh
 
3:44 PM
@Jimbo you need to tell us something?
 
when i query the database for example "select * table_name where id=5" does the database get that id in O(1) time ? or O(log n)
?
 
@Naruto He likes pictures of men wearing watches
 
You people didn't know @rdlowrey is in a boyband?
 
@Machavity lol :P
 
can someone please tell me ?
 
3:46 PM
@PeeHaa Nope..
 
Well you do now :)
 
I think his band is named Rebase and The Commits
 
if i had a database with 1 Billion record i want to get the record O(billion) is it the same speed as getting the first id (1) ?
 
@someone Do you know what indices are?
 
yes
 
3:50 PM
@PeeHaa more than one indian ?
4
 
lol
 
trolol
 
@PeeHaa the id as primary key auto increment i'm interested in how the database is retriving that record internally. does the database use a btree for getting that id
?
 
@Machavity That is an awesome band name
 
@someone with an index it should be O(logn), without O(n)... I have no idea where you get the idea a select would take O(1)
 
3:52 PM
If you have database with 1 billion rows and not sure what if faster - to get first row or the last - then you should hire DBA
 
@someone Check your index. It should tell you exactly that
 
i don't have that idea
 
@PaulCrovella wrong
 
i'm just asking
if it's possible
 
@AlmaDo oh?
 
3:52 PM
@PaulCrovella index != B-tree index
 
Heavy metal band called: Fatal Error
 
@PeeHaa is getting a file from a directory takes o(1) ? i know it's a silly question i just have a silly idea that i'd like to implement
 
@someone EXPLAIN SELECT * FROM table WHERE id = 5 Should tell you if the SELECT is using an index or not
 
@Machavity i know how to do that actually
 
@someone You are trying to beat a DBMS?
 
3:54 PM
@AlmaDo I'm not presuming any particular structure or algorithm, just that what's used is sensible.
 
no not a chance
 
:)
 
@PeeHaa i'm just learning
 
yay for learning
 
@Jimbo Their top single is Love Conflict
 
3:55 PM
I (finally) haz 3 monitors
 
lol, but seriusly is getting a filename from a directory takes o(1)
?
 
@PaulCrovella if you're not, then stating that time would be O(log N) is wrong, since different structure/algo of index will lead to different results
 
@PeeHaa i.e file_get_contents('file'); ? o(1)
 
@DaveRandom How big?
 
@AlmaDo do you know a particular struct/algo that has a better worst-case time?
 
3:56 PM
@DaveRandom I have two monitors and laptop screen (:
@PaulCrovella sure. Hash-indexing
 
i searched a lot for this but never found an answer for getting a file from directory takes o(1) or what it depends on
 
you'll be happy with O(1) there
 
@Jimbo 22", 1920x1080
 
my idea is, if i stored records as in files 1.txt,2.txt, ... billion.txt will i get them faster ? the content is just plain text ? no advanced searching no anythin
 
poor FS ..
 
3:59 PM
@someone hell no
You cannot even put that many files in a single directory
depending on os
 
@PeeHaa good, but i need to know why (separate directories)
 
> my idea is, if i stored records as in files 1.txt,2.txt, ... billion.txt will i get them faster ?
6 mins ago, by PeeHaa
@someone You are trying to beat a DBMS?
 
@PeeHaa i just need to know why this approach doesn't work
well
 
@AlmaDo that's average time, worst case is O(n)
 
this will not work as - you need to learn difference in reading from FS / from memory
 
4:02 PM
Well it all depends as always, but a dedicated dbms has some nice tricks to make it faster (like smart indices) and caching
 
@someone depends on the filesystem, but most filesystems get REALLY slow when you put lots of files in a single directory
 
@PaulCrovella no. If you got O(n) - you're using indexing wrong.. DBMS is about to apply correct indexing.
 
@someone When something goes wrong, and it's completely proprietary and very likely incredibly poorly coded, you're on your own
Hence companies prefer solutions with already well built, tested and freely available software
 
@ircmaxell separate directories would be fine
 
O(n) means your hashing function results to same value for all data, which is just nonsense.
 
4:03 PM
@ircmaxell You forgot the blink tag in there :P
 
Normally you may consider it as O(1)
 
@someone no
 
@AlmaDo huh?
 
what if he want to make 1 directory for each index? And put 1 file in every directory? :Ooooo ^^
 
There is no sane way to distribute that
@Naruto Than you would have 1bil directories... ;)
 
4:04 PM
@ircmaxell hashing index may be considered as O(1) in terms of time
 
@Naruto nope i each directory may hold a million file
 
That is enough to bring some os'es to its knees
 
Hey if I build a skyskraber, would you come live in it?
 
@AlmaDo "normally" yes, hence average time. worst-case is still O(n).
 
4:05 PM
@PaulCrovella you're playing words (:
 
@AlmaDo best case is O(1). Average depends on number of elements / size of table. Yes, as a first-order approximation it'll approach O(1), but that doesn't tell the full story
 
@PeeHaa but nice and complicated?! ;)
 
No, stupid and useless ;)
 
@ircmaxell sure. I'm with "real case". where collision chain size will be "more or less" fixed-length
 
@someone I don't quite believe what I am reading ...
 
4:06 PM
that is why I'm saying about O(1). I'm not interested in theoretical hash-functions, giving you "worst-case O(n)"
 
@JoeWatkins lol i'm not actually going to do that just a silly idea came to my head
 
otherwise we should change context from DBMS to something... theoretical
 
So 1 billion files in a directory... I think we all know what's going on here
 
@AlmaDo I'm really not, I specifically asked if there was something with a better worst-case time than O(logn) ... that's not playing, it's being precise
 
@JoeWatkins i'm might give it a try and see how the filesystem will act
 
4:08 PM
Fantasy is going crazy when I wonder what he's building when he has 1 billion files :P
 
@PaulCrovella you are. Since it's about DBMS, not about "some theory case". Or else - yes, you "covered yourself" with this "worst-case", but then discussion is done. Again, I'm not interested in theory when it comes to real stuff with managing data. Cheers (:
 
@Naruto dummy data for testing !
 
theory kinda matters when you're talking about algorithmic complexity...
 
@someone I prefer to go with my fantasies ^^
 
conclusion use a database, nevermind
:)
 
4:11 PM
But you should keep the context in mind
 
so there is no way in computer science to ever get the O(1) that's bad
 
@salathe you have access to a running gogs install by any chance?
 
Pure. Genius.
 
awesome
 
GitLab is better than Gogs in everyway
 
@Danack those bastards! (:
 
cc @salathe ^
 
4:45 PM
@PeeHaa gooood
then I have made the correct choice
 
Yes you have. It certainly has potential (because lightweight), however for now riddled with bugs and security issues
And missing functionality
 
@PeeHaa not doing things is the magic sauce of webscale. I'm sold.
 
:-)
 
@ircmaxell in your mail client, if you encrypt something for a public key you don't ultimately trust, does it ask for confirmation because "you don't trust this user etc"?
 
in what mail client?
 
4:55 PM
Yours.
When you use gpg to encrypt a mail
 
I didn't know I made a mail client
/me doesn't use gpg to encrypt emails
 
Well, the one you use.
Oh damn :(
 
I use gmail
 
Yeah... I'm making an extension to use gpg in gmail. And I'd like to know the behavior of other mail clients
 
I thought about using plugins for having gpg support in gmail
but ultimately, I don't trust my browser having my private key.
 
4:57 PM
@Ocramius I use a native application to use the local gpg
 
Same
 
so OSX has a new security issue
that's unpatchable
 
very annoying though. No email client beats gmail IMO :-\
 
@ircmaxell awesome (not)
 
4:58 PM
because their hardware relies on a CRC32 "checksum" to check the private key to ensure it wasn't tampered with
 
@Ocramius how is it the same? The browser never sees the private key.
 
man, Apple's security team must really be losing it these days
 
@FlorianMargaine if I need to decrypt mails, I need my private key
same if I want signing
well, yeah, there's the daemon, but ultimately, you are giving privileges to an extension
I used to write extensions, that's why I don't trust them
 

« first day (1545 days earlier)      last day (3416 days later) »