« first day (2031 days earlier)      last day (2933 days later) » 

Wes
11:00 AM
last time i tried to make my own site, i spent 6 months on it and nearly went bankrupt
so i'm not doing it on purpose now
 
@Wes lol
 
why did you have to spend so much $$$?
A server doesn't cost so much...
 
@Saitama he probably bought an office and a datacenter
 
I suppose github.com/Room-11/Feedr is okish as a soft guideline. Although I am working on a complete rewrite as we speak @Victor
But before you dive into stuff like that. Are you writing unit tests yet?
 
Wes
yes but if you don't work for 6 months to make your site then you're going to have problems @Saitama
 
11:02 AM
> Oh yeah, the code sucks BTW don't look...
@PeeHaa Yes I am. I have like 2k tests for the part of framework I have so far
 
ThW
Morning
 
@ThW good afternoon :D
 
5 hours ago, by Saitama
http://motherfuckingwebsite.com/
@ThW nin'
 
Are they real proper unit tests or half assed integration tests?
hey @ThW o/
 
ThW
@Victor And how many assertions?
 
11:03 AM
Also is it public?
 
Wes
we have a way of saying here, translates to "the shoemaker always has broken shoes" and it's valid for web developers as well :B
 
well, actually there are only around 500 tests with 2k assertions in total
@PeeHaa no, not yet
@ThW but I haven't covered the entire code I have yet, workin' on it
 
I am more than happy to provide critique once you have some public. In general some other people too in here. Although it can be harsh at times up to the point it is brutal
 
Wes
brutal = truth
 
It adds up tereško is there too
 
11:06 AM
@Wes truth should not be brutal for a student who wants to be a programmer some day :))
 
ThW
You will have to remember that it only about the code not about you :-)
 
They are honest indeed
 
well, that's good
 
Wes
@Victor better than being told that you are the next bill gates
 
@Victor Yeah I am totally agree with @ThW
Good advice
 
11:07 AM
@Wes we'll see in 5 to 10 years
but yeah, I agree
 
Wes
@Victor that's what i said to myself 15 years ago. i'm not even a programmer yet
 
@PeeHaa pst, that's "cultural appropriation" :P
 
:-D
 
Hey guys!
 
hey @Eugene o/
 
11:13 AM
@Eugene ohai
 
ThW
@Victor but writing unit tests is a useful design tool, if it is difficult to test it is a good indicator that you need to improve something.
 
@ThW good point
 
Soooo refactoring feedr js...
durrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
I shouldn't be allowed anywhere near jabbasrit
 
you sure, you couldn't use $().append()
 
ThW
@PeeHaa no escaping?
 
Wes
@PeeHaa if it's nerd only stuff, you could have a try at developer.mozilla.org/en/docs/Web/HTML/Element/template
 
tell me what you think, it's part of a class
 
@ThW That's the only thing that's wrong with it? :P
 
it might suck, but it's working :))
 
@Wes !!mdn <template>
!!mdn <template>
 
11:19 AM
[ <template> ] The HTML template element template is a mechanism for holding client-side content that is not to be rendered when a page is loaded but may subsequently be instantiated during runtime using JavaScript.
 
@Wes I hate client side templates. I'm going to refactor it so it gets rendered on te serverside where it belongs
 
Y U NO USE TEH PLUGIN?
 
Came across an issue in my app, that doesn't track infinite redirects. e.g. One page redirects to itself due to some incorrect logic in some conditional statement or something like that. Thought about using cookie for that, to track it, but if I have X tabs/windows open and they refresh all the same time, then this tracking is pointless. So I was wondering is there a way to track each window somehow? Or maybe some other logic, that would solve it.
 
ThW
@PeeHaa Well it is jQuery :-P, but missing escaping can end in HTML/JS injections.
 
Wes
@PeeHaa ew :B
 
11:21 AM
@ThW It's a feature :P
But yeah I'm going to fix that on the serverside
 
> When somebody says something about JS, reply him that it was feature :B
 
Passing a fully rendered html template back to the client dealwithitsunglasses.gif
 
Wes
@PeeHaa ew2 :B
 
Screw you and your mustache :P
 
ThW
@PeeHaa I prefer using a static html fragment with class/data- attributes, match them and set the text content.
 
Wes
11:23 AM
@PeeHaa haha, it's my teeth :B
 
lol
 
@PeeHaa, have you taken a look at that gist?
 
Nope missed it. Hold on
 
Any thoughts/ideas guys?
 
Wes
@Saitama still waiting for you to tell me OMG DAT MOVIE SO EPIC or something
 
11:25 AM
haven't watched it yet, was busy, doing some work on that thing... Gonna watch that in the night..
 
Imo you are havinh the wrong abstraction @Victor
 
what do you mean?
 
ThW
@Victor too large, I would split it.
 
You created a function that writes SQL statements
Why?
Also it's doing waaay to much (what @ThW said)
That's fact that is doing too much is also visible by that "method overloading" that's happning
 
@PeeHaa because I get to reuse that SELECT statement in more functions. I have selectRow, selectField etc. SELECT is the only one implemented this way
 
11:28 AM
I would also like to know why people do that ...
Map<string, mixed> ... you meant to type "array" ...
 
@Victor If you really want to abstract that (you are going to hate yourself later, because sooner rather then later you can't use it) create specific functions for specific tasks
Every sql abstraction turns out with having to write sql manually at some point
 
@JoeWatkins it's hack, you cannot type array, I would have to use array<string, mixed> because I am using strict mode
 
Wes
^
 
@PeeHaa In my case, or in general?
 
In general
 
11:31 AM
there's nothing wrong with reuse ... trying to invent a function that can handle all eventual use cases, (or class, or set of classes, by the way), is trying to solve a problem you don't have, and should never have ...
but but ORM, but but Active ... I don't care ...
 
Wes
!!xkcd automation
 
Wes
!!xkcd worth the time
 
@Jeeves lol so true
@JoeWatkins I think I get your point
 
Wes
11:36 AM
sorry for the xkcd wall. i thought previews were resized to 300p?
 
I'm still not sure why you are using a map<string, mixed>
 
Wes
@JoeWatkins hacklang?
 
@JoeWatkins hhvm.com
 
but isn't that just a normal array ?
hehe, I know what hack is :)
 
nope
it's a class, like the std::vector instead of type[]
 
11:38 AM
it has a different api, sure ...
 
basically yes, but things look nicer
yeah, exactly
they say it is better in terms of performance
 
right, so you are just using the different api, got it ...
 
Thanks guys. "You are awesome" :)
 
Wes
@Victor ish, apparently php 7 is a bit faster
but depends, right?
 
I think he means generic vs array
 
Wes
11:40 AM
types are checked statically in hack, no? so it doesn't matter
 
@JoeWatkins yep
 
@Wes yeah
I dunno if it doesn't matter
but it doesn't care about types at runtime
 
@JoeWatkins they are working on syntax for type-safety of local variables
@JoeWatkins it cares about types at runtime
@Wes if this is up to date kinsta.com/blog/… then php7 is slower than hhvm
 
don't think so, think they are stripped by the parser actually ...
only hhclient cares about types ...
@Victor never trust a benchmark you didn't fake yourself ...
 
@JoeWatkins hmm. :))
 
11:43 AM
@Victor Who told you that? My last state (not necessarily up-to-date) is that vector and array share the same underlying implementation, there is no specialization going on.
 
I wondered if that might be the case ... looks same to me :)
 
@NikiC good to know then. I moved away from vector/map because I didn't like the initialization with Map {} instead of [].
 
user1804599
Hi guys.
 
@Victor This so called "definitive benchmark" uses 15 concurrent users on a 16 SMT thread machine. (Not to say the end result is necessarily wrong, this just tells you this person doesn't know what they're doing)
 
Wes
hi doc
 
11:46 AM
ha
 
@NikiC I am going to do a benchmark some day myself
 
user1804599
Wrote another PHP code generator.
 
user1804599
I naturally forgot about use() again.
 
@Zoidberg Is it called YAPCG?
 
user1804599
no it's called SNEK
 
11:51 AM
@Zoidberg What does it generate (from)?
 
user1804599
S-expressions.
 
user1804599
And it type-checks them!
 
@Zoidberg How generic is the type system?
 
user1804599
Higher-kinded types and rank-N polymorphism are supported.
 
nice
 
user1804599
11:53 AM
Type argument inference is yet to be implemented.
 
user1804599
Also there's no syntax yet for rank-N polymorphism, but the type checker copes with it fine.
 
user1804599
I ran into HKT issues with Hack, hence.
 
12:08 PM
15 mins ago, by Zoidberg
Also there's no syntax yet for rank-N polymorphism, but the type checker copes with it fine.
 
^ that
 
I know what each of those words mean but I don't know it means when they're put together like this.
 
I was really an idiot to set the content-length header before compressing the string...
 
user1804599
It means that you can do something like this, in pseudo-Hack: function f((function<T>(T): T) $g): void { $g(1); $g('s'); }.
 
Wes
12:24 PM
@Zoidberg nice, do you have it on a repo?
 
Well, yes, but there is awful and then there's throwing error messages in French.
 
12:33 PM
https://www.youtube.com/watch?v=Ccoj5lhLmSQ (I Know Some of These Words►)
 
I hate javascript so much
 
but why?
 
Because it's horrible
 
s/javascript/jabbascript
 
@PeeHaa +1
 
12:37 PM
@Zoidberg Hrm, that signature makes it look like the type is fixed
 
user1804599
T is for the body of f to decide.
 
user1804599
Just like when you have function f<T>(T $x): T, and you call f, you decide what T is.
 
@PeeHaa no
 
@PeeHaa TypeScript isn't very horrible
 
@Zoidberg True, makes sense actually
 
12:39 PM
@littlepootis Sure it is. Part of the solution is accepting it
@iroegbu That's okish yeah
 
What part of JS is horrible?
 
All the parts that stuff like typescript try to fix
 
user1804599
The part where it has no type checker.
 
like?
 
@Zoidberg Yes
And I'm not even going to metnion the stndard library
 
12:45 PM
There's no standard library
 
Exactly
 
@PeeHaa What are you missing?
 
Even basic string stuff
 
(If you say left-pad Imma smack you)
 
hehehe
 
12:46 PM
It doesn't need one IMO.
 
Sure it does
Just look at all the crappy libraries
 
@PeeHaa I dare you, go say those in the JS room
 
@littlepootis Yeah, it does.
 
Jan 9 '15 at 19:32, by Danack
https://github.com/blakeembrey/swap-case https://github.com/blakeembrey/is-upper-case https://github.com/blakeembrey/title-case https://github.com/blakeembrey/snake-case https://github.com/blakeembrey/dot-case https://github.com/blakeembrey/path-case https://github.com/blakeembrey/camel-case https://github.com/blakeembrey/param-case https://github.com/blakeembrey/upper-case-first https://github.com/blakeembrey/lower-case https://github.com/blakeembrey/upper-case
 
Let's talk about PHP's standard library
 
12:47 PM
wow :P
@littlepootis k
 
String padding as a general function is something I'd expect to have
 
better trimming can also be nice
@Saitama They know I hate js
 
Is it left_pad or padleft lefpad or lefti_pad or padlef.
 
@littlepootis PHP's standard library is an unmaintainable, crappily named mess
But at least, you know, it's there :P
 
@littlepootis Yes that is bad, but we have it
Also note that nobody in here will defend it
9 mins ago, by PeeHaa
@littlepootis Sure it is. Part of the solution is accepting it
 
user1804599
12:49 PM
I use PureScript these days, and TypeScript at work.
 
user1804599
They're both very good.
 
I don't know purescript
 
Never heard of PureScript
 
!!google purescript
 
user1804599
Learn it. :D
 
12:49 PM
Search for "purescript" (http://bit.ly/1ZtfedP)
• PureScript - PureScript's expressive type system and lightweight syntax mak… (http://bit.ly/1ZtfedR)
• GitHub - purescript/purescrip… - purescript - A small strongly typed language that compiles to… (http://bit.ly/1Ztfc5u)
• Differences from Haskell � pu… - Evaluation strategy. Unlike Haskell, PureScript is strictly ev… (http://bit.ly/1Ztfc5v)
 
@PeeHaa Really? bit.ly?
 
@DaveRandom encoding is hard v10 ^
@MadaraUchiha Yeah it sucks, but it's the character limit
although...
 
@PeeHaa Wat
Character limit is much higher than that for multiline
 
Now we have multiline we don't have that problem anymore
@MadaraUchiha 500
@MadaraUchiha It's unlimited
\o/
 
@PeeHaa Yeah well
 
12:50 PM
Let me fix it
 
Infinity > 500; // true
 
@MadaraUchiha Only true for small values of 500
 
I tested it with the largest wiki page @Saitama. it works fine
 
It'll make it respond faster too, generating 4 bit.lys can't be fast
 
:P btw which wiki is the largest?
 
12:52 PM
!!wiki largest page
 
@PeeHaa Sorry I couldn't find that page.
 
poop
Search the sandbox for my name
 
k
 
WTH I am getting heavily throttled by so chat
What did I do?
 
The 1918 New Year Honours were appointments by King George V to various orders and honours to reward and highlight good works by citizens of the British Empire. The appointments were published in The London Gazette and The Times in January, February and March 1918. Unlike the 1917 New Year Honours, the 1918 honours included a long list of new knights bachelor and baronets, but again the list was dominated by rewards for war efforts. As The Times reported: "The New Year Honours represent largely the circumstances of war, and, perhaps, as usual, they also reflect human nature in an obvious form....
 
12:54 PM
Hmmm I thought I had something else at the time
 
user1804599
@PeeHaa I wrote this in PureScript: rightfold.github.io/lambda-playground
 
user1804599
You can insert lambda terms and see how they are reduced.
 
You wrote lisp in purescript? :P
 
user1804599
E.g. #y f, or (\f.(\x.f (x x)) (\x.f (x x))) f, press b-reduce.
 
Ooooh that's kinda cool
 
user1804599
1:00 PM
@NikiC Even if it didn't, wouldn't matter. DuckDuckGo !php var_dump
 
@Zoidberg oooooh
that would require using duckduckgo tho ^^
 
Damn you @Zoidberg. Don't take this one thing away from us :(
 
user1804599
Hey, you have another thing.
 
user1804599
You're the only popular untyped language with proper interfaces.
 
1:02 PM
me grumbles about calling php untyped
 
user1804599
Ok, it type-checks overrides.
 
and params and return values
 
@Saitama changes default search engine to duckduckgo
 
@littlepootis atleast, it's better than having google take blood samples
 
I'm pretty much addicted to google search :(
 
1:11 PM
gtg, got an english exam tomorrow.. o/
 
gl
 
tx
 
Hey, everyone. I had an edit rejected on an answer that I think contains a typo. The answer is helpful, but the typo might confuse other people. Unfortunately, my rep is too low to comment. Is anyone willing to comment on the answer on my behalf (assuming you agree with my proposed edit, of course)? stackoverflow.com/review/suggested-edits/12259341
 
!!google github jeeves
 
Search for "github jeeves" (https://www.google.com/search?q=github+jeeves&lr=lang_en)
• GitHub - jeanqasaur/jeeves: Python implementation… - jeeves - Python implementation of the Jeeves programming language. (https://github.com/jeanqasaur/jeeves)
• GitHub - peperzaken/jeeves: Narrowcasting system… - jeeves - Narrowcasting system written in JavaScript and HTML5 using the Meteor framework. (https://github.com/peperzaken/jeeves)
• GitHub - Room-11/Jeeves: Chatbot attempt - Chatbot attempt. Contribute to Jeeves development by creating an account on GitHub. (https://github.com/Room-11/Jeeves)
 
1:17 PM
Thanks @MadaraUchiha cc @PaulCrovella / @others complaining about shortened urls
 
user1804599
> peperzaken
 
user1804599
lol github.com/zout that user name
 
@Zoidberg :P yeah it still is biased to dutch stuff, because as we both know dutch is just superior
 
@PeeHaa Huzzah
 
@twistofreality Hmmm looks like drunk reviewers again
 
@PeeHaa Haha. You think so? I was wondering why it got rejected in general, but I think a comment would do the trick, too, if I could only comment.
 
@PeeHaa Radical! Thanks!
 
np
 
While I'm here, does anyone have any experience with unit testing functions that call error_log in PHPUnit? That answer was helpful as a starting point, but I'm still running into some issues.
 
1:26 PM
OK PHP sucks but we have the best mascot(s)
 
That is true
@twistofreality abstract the call away
Ao that you don't call ut throughout your codebase
 
So that you don't call ut throughout your codebase
 
hot take: if your programming language does not have adorable elephant plushies then you're doing it wrong #PHP https://t.co/hCQUm6BiGC
7
today is the day that comes afterwards when tomorrow is Saturday
 
@PeeHaa :) That would be the easy way out, I guess. The thing is that the class that I'm testing is itself an abstraction for other classes that I ultimately want to output using error_log.
But you're probably right. I guess testing difficulties point so some issues in the class/code organization itself.
 
The stuff shouldn't have to know where it is going to. Whether it is the error log/mail/dev bull or whatever
Morning @AnmolRaghuvanshiVersion2.0
 
@PeeHaa Thanks again.
 
np
 
:-)
 
Wes
:P
 
when i shift website from one server to other i need to update DNS and linked it to new IP address of server is that right??
 
@AnmolRaghuvanshiVersion2.0 If you know you are going to move adjust your ttl to 300 or something in advance
Maybe help with smoother propagation of changes
 
and how much time it take to update new DNS?? and do i need to create name server on new server?
 
1:41 PM
How much time it takes depends on the ttl and the refresh time and the dns gods
You can use whatsmydns to check propagation
@AnmolRaghuvanshiVersion2.0 Just use the nameserver of the registrar
 
ok,Thnks PeeHaa :)
 
yw
 
1:57 PM
@AnmolRaghuvanshiVersion2.0 I'm wonder, why this comment doesn't get any star. Usually this kind of comment get some stars (favorite)
 
@Shafizadeh depends if anyone finds it interesting or not..
 
o/
 
3:22 PM
The last message was posted 1 hour ago.
 
Wes
ate too much carbonara. i'm dying
 
Wes
still recovering from this morning :B
walked/jogged for 7km. me. crazy
 
Wes
it's not much really. would be a lot if i ran, tho
 
3:28 PM
i could not jog/walk 7km in dreams :P you fit boy
 
Wes
ahah fit? me? lol
 
:)
i recently gained lot of weight..
 
Wes
i used to ran 10km in half the time
took me 55min to do 7km. it's more not moving than running :B
 
Nginx people
I want to use nginx as a sort of a hack proxy
I want all requests to /path/anyfile.js to take from the local filesystem
But any /path/anydir/anyfile.js to take from proxy_pass
(cc @DaveRandom @PeeHaa)
 
@PeeHaa errrr... yes? I would assume so, SE are pretty good at that sort of thing. Although it may be worth keeping a global option for debugging purposes.
@MadaraUchiha That should be trivial
 
3:36 PM
        location ~* /libtrc/([a-z.-]+)\.js {
                root /srv/proxy;
        }

        location /libtrc/ {
                proxy_pass cdn.taboolasyndication.com;
        }
Didn't do what I wanted
 
That root directive isn't likely to be what you want
maybe try_files?
That basic approach looks sound though
 
@MadaraUchiha Probably alias instead of root, otherwise it will try to load from /srv/proxy/libtrc/....
 
alias, that's what I was trying to think of
too lazy to google things today
 
I'm getting 403
For some reason
Entire directory is 777
 
from which branch?
The local one?
 
3:44 PM
@DaveRandom How can I tell?
I can tell that nginx returned 403
But I don't know if it got it back from the proxy_pass
 
Well just comment out that block
 
@MadaraUchiha Just have a look at the error log.
 
wait @MadaraUchiha are the remote files at http://cdn.taboolasyndication.com/libtrc/* or http://cdn.taboolasyndication.com/*?
 
@DaveRandom /libtrc/*
 
I think you'll need that in the proxy_pass url then
IIRC
 
3:47 PM
@DaveRandom Yeah, that was it.
 
yeh you do
 
But now the target file (that's supposed to be matched in the regex) isn't matched
And is proxy_passed too
Wasn't ~* more specific than no selector?
Got it, thanks all :)
 
Rubber duck/#11 combo fix
 
\o
 
@DaveRandom Yes SE is fantastic when it comes to ssl /s
 
3:55 PM
> 418 I'm a teapot (RFC 2324)
This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by tea pots requested to brew coffee.[52] This HTTP status is used as an easter egg in some websites, including Google.com.[53]
Really?
 
Yes really
 
(whispers to flight attendant): "I don't want to upset anyone, but I think the man in 15C is modeling credit default swaps".
 

« first day (2031 days earlier)      last day (2933 days later) »