« first day (1652 days earlier)      last day (3289 days later) » 

5:11 PM
@NikiC fixed
 
Anonymous
has anyone ever faced a performance issue with an 8GB RAM laptop?
 
Can you people reach kickasstorrents.im ?
 
Anonymous
no ^
 
@PeeHaa haxxor
 
Anonymous
5:17 PM
> This page cannot be loaded via the Chrome Data Compression Proxy. Try reloading the page.
Debug info: CK2dsOb6kcUCFeb2wgod51AA4w==
 
Damnit
 
Anonymous
1 min ago, by samaYo
has anyone ever faced a performance issue with an 8GB RAM laptop?
 
Anonymous
I read some comments that suggested 8GB is inefficient for some vbox related tasks
 
@samaYo What answer do you expect?
Yes?
 
If the VM needs more than 4GB, the laptop might run out of memory. But most VMs are usually configured to use less.
 
Anonymous
5:19 PM
@PeeHaa what is your experience?
 
Anonymous
You guys are my treshold
 
@samaYo You really expect an answer on a generic question?
 
Anonymous
@PeeHaa I really do. No jokes. I mean I want to buy one, and all I need is to be able to open vbox, photoshop, firefox, phpstorm and not have my pc crash. I assumed, most people here would know if this could happen or not
 
Whether somebody has performance issues would depend on what you are doing
So to answer:
> has anyone ever faced a performance issue with an 8GB RAM laptop?
Yes somebody likely faced performance issues
To give a better answer which doesn't really answer you: make sure you have room for expanding ram
 
Anonymous
@PeeHaa You are a PHP developer, it is most likely I may end up using the same tools that you are using one day. My hope is to know, if you are doing fine with 8GB.
 
Anonymous
5:25 PM
Just tell me if you have an 8GB ram and you have no problems. By that measure I will decide to buy it or not.
 
@PeeHaa has 99 problems but a poorly configured VM ain't one.
 
Anonymous
@Danack so you had a poorly configured VM at some point? That never happend to me
 
I'm a php developer but I have to run 4 virtualbox VMs concurrently to work... Not everyone has the same workflow.
 
@FlorianMargaine … seriously?
 
I "only" have 8GB RAM but only since a year or so, had 4 or less before...
 
5:30 PM
@bwoebi a project requires that, yes
Simulating a hosting platform
 
Hi, is this really a sytax error? I found this code in a premium script. Not sure if some server configration needs to be done

wp_upload_dir()["basedir"] . AVO_DIR_NAME;
 
But then I also don't have any VMs in my workflow (maybe I should? dunno)
@Rizwan depends on the PHP version I think
 
@FlorianMargaine sure… that'd be one VM… but 4!?
 
@Patrick So, all I need to do is go though all the files and fix em up? :(
 
@bwoebi no, not one VM. We need to simulate the distributed nature of it
 
5:33 PM
@bwoebi Why are you surprised? 3 VMs would be reasonably standard....frontend, secure backend, DB all separate VMs. Having another one for logging or management wouldn't be that surprising.
 
@Rizwan you know it's possible to update php?
 
… Would you then not better have VMs on a dedicated server?
 
@Patrick Not in shared hosting, Lol
@Patrick No worries, thanks. I'll figure it out :)
 
@Rizwan which is one of many reasons why shared hosting sucks
 
@FlorianMargaine Okay, then please also simulate increased latency because in reality it's all on different machines.
 
5:35 PM
@Patrick yeah
 
Don't worry - you can just use virtualbox as the VM, and it simulates all the latency - and more!
 
@Danack that's not it though, but I don't know if I can give more details
 
@Danack huh?
 
Sorry about that
 
@bwoebi Virtualbox is crap...most of the time it's far slower than real separate servers would be.
So you don't need to add simulated latency, it comes free with Virtualbox.
2
 
5:37 PM
@samaYo I have 4G on my laptop and 8G on my desktop
 
@Danack … And yeah… please make instructions all have the same clock cycles than on a real server
 
Both are sufficient for running a text editor :P
 
Anonymous
damn you :)
 
@Danack If everything is slow… it doesn't detect race conditions though…
 
Neither would it if everything is fast. If you're programming something that contains race conditions, you've got bigger problems than a VM can help your with...
 
5:40 PM
Are there any good markdown editors? I am using atom w/ markdown preview right now but if it gets more than a page long it sucks
 
@Patrick Any texteditor? :P
 
@Danack I know… if you want to simulate it should be enough to have every service running in parallel on a single VM.
 
@PeeHaa I am trying to write a book, scrolling everywhere gets a bit repetitive :(
 
Writing a book in MD? wow
 
5:43 PM
Isn't that what leanpub etc use? I thought it was a good idea :(
 
@Patrick Dunno what leanpub uses, but how can you handle things like references or an index in plain MD?
 
@PeeHaa no idea, I just started writing... it's nice for the code snippets
But I guess I'll have to reconsider my choice
 
Ah it doesn't use plain MD
 
user895378
@Patrick I really like stackedit
 
user895378
 
5:48 PM
@Patrick Neh I think you should be fine. You just have to look into markua otherwise you will have to go back through the thing to fix it which is going to be PITA
 
Will do. Thanks for the suggestions
 
The leanpub manual is actually decent leanpub.com/help/manual
 
@bwoebi Having them in separate VMs means that the dev environment can match more closely the production environment, and also saves having to maintain separate chef/puppet/whatever scripts for 'deploying' them in dev as well as the stuff to deploy them in production.
Of course, all the cool kids are getting down with Docker these days...
 
> Previously we posted that KAT is moving to kickasstorrents.im domain name, but it was seized. So, KAT is moving to kat.cr domain. You all will be automatically redirected from kickass.to to kat.cr from now on.
 
Anonymous
@PeeHaa use piratebay through a proxy. I am tired of trying to reach kat
 
6:01 PM
@samaYo I like kat better
 
Anonymous
Same here. But I never failed to find anything on pb that's on kat
 
Anonymous
kat really lives upto it's name though.
 
6:20 PM
@rdlowrey @bwoebi btw, you're aware of the zlib.inflate / zlib.deflate stream filters right?
 
yes
@NikiC a) they're horribly slow b) they don't work with non-blocking streams
 
k
 
What we need is true incremental functions with work with all ZLIB types and compression levels ideally. And are fast.
Also, we'd like to be able to flush the stream without closing
 
When I look in LXR at the DOMNideList class, how can I learn where the Traversable is coming to live? I don't see it in there: lxr.php.net/xref/PHP_5_4/ext/dom/nodelist.c
 
@Danack docker actually can't be used, we deploy linux containers on the VMs... You can't have lxc in lxc unfortunately :-)
 
6:33 PM
@hakre what exactly do you mean? Where the internal iterator is fetched or what?
 
@bwoebi Yes, I can foreach a DOMNodeList so there must be some code where this is implemented, right?
That .c file only has two method defintions: item() and getter (read) for $length field.
 
@hakre look at the class handlers
 
@FlorianMargaine you mean this I guess: lxr.php.net/xref/PHP_5_4/ext/dom/php_dom.c#764
 
@hakre exactly
 
That was what I was looking for. I can now verify my assumption before posting an answer :)
@bwoebi thx. , /cc @FlorianMargaine
 
7:05 PM
@Tyrael Can you please make bugs.php.net/bug.php?id=55871 public?
 
7:18 PM
@Patrick maybe you should check out "LaTeX" for writing the book, I haven't personally used it yet but it seems like the right choice for big books
 
anyone there for help?
 
7:35 PM
I need help in .htacess
@Ronni are u still there?
guys , are you sleeping?
 
whats this?
I need help!!!!!!!!!!!!!!!!!
 
lol
calm down =]
 
@hsn0331 you "need help" yet you actually haven't asked a question or detailed what you need help with
 
ok, ok ok , I got it
need help about .htaccess
 
7:43 PM
hehe
 
want to redirect some url
 
@hsn0331 you can add comments to .htaccess using #
so you can write # help in your .htaccess
then you have help in .htaccess
 
like localhost/social_media/settings/
 
7:44 PM
@ircmaxell *RECURSION
 
@NikiC stack overflow
 
the actual url is localhost/social_media/settings.php
 
@NikiC @ircmaxell You shouldn't post a link to that document
:P
 
nice joker @MarcelBurkhard :P
 
@hsn0331 do you want to have pretty urls and .htaccess should turn /something/2 into ?something=2 or just a directory index where settings.php acts as index.php?
well anyway you should be more specific
 
7:47 PM
yes, nice urls, but I only need to change regular urls
urls that comes with vars I already managed them
this is not working :(
RewriteCond %{THE_REQUEST} /settings\.php [NC]
RewriteRule ^settings/?$ /social_media/settings/ [R=302,L,NE]
the actual url of this page is localhost/social_media/settings.php
and want to turn into localhost/social_media/settings/
 
@hsn0331 ok I still don't quite get what you're trying to do.. anyway check this out:

http://pastebin.com/JvcLEUGD

It's the default .htaccess file from the symfony2 framework
it uses app.php as DirectoryIndex, you would need to change that to settings.php I guess and If you request a image or something it will let it go through (RewriteCond %{REQUEST_FILENAME} -f)

maybe it helps if you look over that .htaccess they made, there's comments in it too
 
so you need more specification?
I told u
 
well yes, define "regular urls" and "not working"
 
see, I have a url like localhost/social_media/settings.php where localhost/social_media/ is root directory of project but not document root itself
 
I understand what you wrote, I just couldn't guess the parts you left out ;)
 
7:55 PM
regular urls like localhost/social_media/settings.php
want to change into localhost/social_media/settings/
just like WP urls
if you know WP , WP is WordPress
 
yeah I "know" WP ^^
Well now define "doesnt work", because it could be not rewriting, a looping redirect, or http 500 error
 
I tried this
RewriteCond %{THE_REQUEST} /settings\.php [NC]
RewriteRule ^settings/?$ /social_media/settings/ [R=302,L,NE]
and this is not working as I want
I want like localhost/social_media/settings/ and that does not do the trick
this rules taking me to 404 page localhost/social_media/settings/
the rules that kicks to 404 page is
RewriteCond %{THE_REQUEST} /settings\.php [NC]
RewriteRule ^ settings%1/? [R=302,L,NE]
I already defined 404 page too
ErrorDocument 404 /social_media/404.php
 
ok
 
it would also do example/ -> example.php
I used this answer from Stackoverflow: stackoverflow.com/a/8371815/982075 and changed the urls to fit your project
 
8:02 PM
what will you do if I have RewriteBase /social_media/??
I think that will not work
 
you could just try...
 
ok
that does the trick, but the ending trailing slash is missing
and other rules are corrupted :(
 
@hsn0331 ok wait a sec
 
want to see my existing rules?
there is only few lines or just a 1 rule for single page
 
yeah sure why not, make a pastebin
now this shouldn't corrupt your other rules: pastebin.com/VasCze4D but I can't test it yet
 
8:10 PM
 
or if the above doesn't work, this could: pastebin.com/GnJAzaep
 
ok let me c
 
@RonniSkansing how are you doing?
 
nope, :( thats not working
 
hmm alright
I need to mimic your setup, wait a sec
probably more than a second ... ^^
 
8:15 PM
@Danack VirtualBox is excellent
 
ok, take your time.
 
@Andrea vboxfs is the slowest thing out there
 
@FlorianMargaine And doesn't support sendfile(), yes.
 
@hsn directory structure would be
/social_media/user.php
/social_media/settings.php
/.htaccess
/ <- Docroot

?
 
People use NFS over vboxfs
 
8:16 PM
VirtualBox is pretty good in some other aspects though
 
Oh yeah
 
@MarcelBurkhard yes
 
Or no one would use it
 
/social_media/ is directory, but not document root
and .htacces is also located there
my whole .htaccess
RewriteEngine On # Turn on the rewriting engine
Options -MultiViews
RewriteBase /social_media/


# user page request
RewriteCond %{THE_REQUEST} /user\.php\?u=([^\s&]+) [NC]
RewriteRule ^ user/%1/? [R=302,L,NE]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{THE_REQUEST} \s/+(.*?)[^/][?\s]
RewriteRule [^/]$ %{REQUEST_URI}/ [L,R=301]

RewriteRule ^user/([^/.]+)/$ user.php?u=$1 [L,QSA,NC]
IndexIgnore *
 
@hsn0331 .htaccess is in docroot or social_media?
 
8:21 PM
/social_media/
 
@FlorianMargaine Really? Filesystem inside vbox feels 1000 faster than filesystem on windows
 
@hsn0331 ok good, all setup, I report back when I figured it out
 
/social_media/
because docroot is htdocs, where is much more projects
 
yes that makes sense
 
guys what's the best MD php implementation?
 
8:23 PM
u can see, I have to write this RewriteBase /social_media/
to work existing rules, before this they wasn't working
 
(trailing slash)?
 
the next one with slash
and you can also suggest me best way to which one should I use and why
 
@hsn0331 I got it working without the slash, but with the slash it doesn't...
 
@Worf Not sure which is best, this is adequate for most things.
 
I already faced this problem before about moments ago
 
8:27 PM
@hsn0331 also localhost/social_media/user/bla works but localhost/social_media/user/bla wouldn't... is that something you could use?
 
but when u have correct rule written that will work
I already have working rule with this url localhost/social_media/user/hsn0/
 
thanks @Danack going to try it
 
ok so the trailing slash needs to be gone
 
means the ending one?
 
yes.. hsn0/
 
8:30 PM
It might not be the most feature complete, but it works and is stable, which is nice.
 
I think both ways right
what best u think will be fine
 
well with the slash in the end it works if you add

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]

after

RewriteBase /social_media/

but If you request the url without a slash you will get a 500 error :S
@hsn0331 I'm still working on a better solution
 
and yes, what about the other pages which have more than 1 vars like post.php?id=32&u=hsn0
please find the best solution, I don't want any errors :3
 
@MarcelBurkhard you are asking about canonical URLs, which is historically about this trailing slash but for directory listings/indexes. See as well en.wikipedia.org/wiki/URL_normalization
 
@hakre Thanks but I was just asking him If he needs it to work, 500 error is kinda uncool anyway :D
404 would be ok I think
 
8:36 PM
in that case a 301 redirect looks fitting to me: .../settings -- 301 -> .../settings/
 
I already wrestling with 404 error
 
@MarcelBurkhard hey =] I am doing quite okay .. how about you?
 
the snippet you gave is kicked me of to 404
 
is there is anyone here who understands the internets , plz halp
 
as you said @Marcel
 
8:37 PM
@hakre maybe you can make a snippet that works ? he wants somepage/something/3/anotherthing/4 -> somepage.php?something=3&anotherthing=4
 
@MarcelBurkhard for .htaccess?
 
I have a problem with implementation of REST responses: how do you hguys go about rendering a resource, which contains a collection where each resource in collection also contains a collection ?
 
yes @hakre
 
Just pipe it in a frontend controller and dissect the the URL in there.
 
@hakre yes... I'm struggling to understand how to combine symfony2's .htaccess (http://pastebin.com/JvcLEUGD) with this: http://stackoverflow.com/a/8371815/982075

symfony2 handles the vars part well, but all to -> app.php
 
8:39 PM
keeps .htaccess simple, makes application more safe with different servers and you can apply PHP logic onto the URLs which is more powerful than just regexes in a growing .htaccess file.
 
@hakre thats what I would do but I was wondering if it would be possible to do it all .htaccess way
 
basically, I have REST endpoint for user details, which has the standard description crap, but it also contains a gallery
is there a way to somehow arrange it in a nice template ?
the REST is implemented using JSON
 
@RonniSkansing I'm overloaded at work, doing the work of 3 people starting on monday, the work of 2 people for the last month
@RonniSkansing other than that I'm fine, motorcycle season :)
 
8:40 PM
that pastbin is out of mind :3
too big to see and unerstand @hakre
 
@hsn0331 I'm struggling too. I think you should go with the advice frome @hakre and make a front controller, basically /social_media/index.php, read this: stackoverflow.com/a/10275945/982075
 
@tereško what do you mean template?
 
@hsn0331 I think you will need to spend some additional time on this, I couldn't find a .htaccess-only solution for now and my motivation to dig deeper is now gone, sry
 
@MarcelBurkhard nice and simple Q&A on the topic, well picked.
 
You want to exclude array->json mapping logic from controller?
 
8:43 PM
@hakre thank you for your input too :)
 
evening
 
@MarcelBurkhard what means "all .htaccess way" to you? Like FallbackResource?
 
oh OMG @Marcel :O
 
@hakre not having a front controller, because he currently has, afaik, a user.php "controller" and a "settings.php" controller
 
I am still spending my time on it @Marcel
 
8:46 PM
@hsn0331 yes. Check out the last link I posted, you will need another php file but other than that It will slim down your .htaccess and I think you will benefit from that
 
the long pastbin? @marcel
 
@MarcelBurkhard technically you have two frontend controllers there :)
 
I am still looking on it, that is very simple and is only or 1 single page, or file
 
@hakre yes that's not the point. But with my limited .htaccess knowledge I was unable to get localhost/user/someone AND localhost/settings/something to work
 
8:48 PM
@marcel would have to write much rules as your project have files
 
@MarcelBurkhard ah okay, now I see.
 
this is what I currently use as templates for my REST API side
just glorified arrays that get parsed using json_encode()
but this method sucks for nesting
 
@hsn0331 yes it's fairly simple. You will not need to write rules for every page. You can transform $_SERVER['REQUEST_URI'] automatically to $_GET vars... except for the first one which will determine which .php to include
@hsn0331 basically you end up with a router
 
so
has anyone here had ANY experience with making RESTlike APIs ?
 
8:51 PM
@marcel :/
 
@tereško that's on my todo list for now :(
 
so .. anyone else ?
 
@tereško yeah it does, I used almost the same thing, only that it was a class that implemented Output\Mapper interface (which is only map method) with a factory for these kinds of classes where you could register new mappers. Better way is JMS serializer but it's slow as fuck for cases when you have to go through a lot of elements in an array
I had something that I intended as a solution for this
But abandoned it
Actually it works currently
github.com/nikita2206/scalarizer you may be horrified by the code-generation stuff (and architecture in general - I don't like it), but the main idea of having a declarative way to define output format is the way to go I think
 
@marcel do you know anyone who can help me here?
 
@nikita2206 you do know that there are no test or examples
 
9:00 PM
@hsn0331 you read the link I gave you last? try it... make an index.php file, rename your .htaccess to .htaccess_backup and make a new one with the contents, then print_r($_SERVER['REQUEST_URI']); in your index.php.
 
yep sorry, I didn't get to write any of that stuff at the moment. The main idea was to have a config that would look like

'ClassName => [
'propName' => [
'getter' => 'getProp',
'expose' => true /* can be set to false in an child class to exclude this property, configs for inheriting classes are also inherited */,
'groups' => ['all', 'user_details'] /* groups are the same as in JMS serializer - when you ask it to serialize anything you also provide groups that you want to include */
]
]
oh indentation doesn't work here
 
@marcel what would that will give me?
 
@hsn0331 then you access some urls like /social_media/user/someone/ and you'll notice a pattern from which you can split your request_uri and turn it into $_GET variables
and also find out which .php file to call
 
anyway, I'm not really suggesting to use it because it's not even half baked, you can just implement this idea, I don't think it will take lots of work
 
@hsn0331 it will give you a solution to your problem, that will also work for any other .php files you will introduce and an unlimited amount of variables to your urls
 
9:02 PM
I think $_GET vars automatically executes , but I am looking for a solution for non vars pages
 
(well it is not technically unlimited but yeah you won't hit that restriction)
 
Is there a way to debug how many connections PDO has open?
 
Also I intended this as a tool for getting arrays from objects, whereas right way would be a to have a tool that just maps arrays or objects to array of a predefined structure
 
@hsn0331 and you will now need to create that solution with the information provided, I can't help you anymore... sry
 
its ok bro.
 
9:05 PM
@hsn0331 .htaccess won't be enough
 
and what is more enough?
 
a .htaccess that routes everything to a front controller which dispatches it to the right controllers based on $_SERVER['REQUEST_URI']
-> you get pretty urls
 
@tereško are you talking about the discoverability of an API? Or you don't know how to represent your gallery in json? I'm not sure what you want
 
@FlorianMargaine I am talking about templating a resource (user) which contains a collection (gallery) which in turn contains resources (image)
 
@Danack this is way more bad ass github.com/kzykhys/Ciconia you can even customize the output html :P
 
9:14 PM
@tereško so having a template for the gallery items, and in the user template something like {{foreach user.gallery_items as item}} {{render item}} {{/foreach}}?
 
kinda, yes
in JSON
fast
 
in my json api, I usually have a "render_document" method where I define the object to be json_encoded
so for user I just add the gallery items in the user document
but it seems obvious... so I'm not sure that's what you want to talk about
 
I don't think you understand what I am aiming for
 
indeed :/
 
"document" is a template FILE
and I need to add to it nested collection of other template FILES
 
9:23 PM
you have templates for json responses?
 
yes
 
hmm, isn't json usually just json_encode of an array?
when working with php?
 
@MarcelBurkhard yes
 
you have to build that array
 
yeah sure but if you build it with json doesnt that give you parsing overhead?
 
9:34 PM
wwat
 
@MarcelBurkhard he means that one of the json fields is "html body"
 
what ?!
 
well, that's an example of using templates for json responses
 
sorry for hijacking the discussion, i was kinda OT
 
1 min ago, by Florian Margaine
@MarcelBurkhard he means that one of the json fields is "html body"
who is the "he" ?
 
9:36 PM
you
that's what I thought your use case was
 
47 mins ago, by tereško
this is what I currently use as templates for my REST API side
 
and then I understood that I was wrong
 
I don't understand why you need templates then, but I guess it doesn't matter...
 
ah, cool, every symfony component has its own base exceptions
 
9:38 PM
@Worf you're from switzerland, right?
 
nope
i'm from kronos
 
@Worf interesting.
. you posted a picture from digitec.ch the other day thats why I am asking
@tereško I don't get what you are trying to do, do you need like a template engine with includes for json?
well I guess not cuz thats what Florian posted as an example
sort of
 
> On Thursday I was flying back from LA. When I landed, I had 3,500 new messages. Hmmm. Looks like we did something to piss off the Internet.
 
@tereško are planning on playing GTA V on your rig?
 
yes, but not without some substantial discounts
I am not really a GTA fan (haven't even played 4th yet)
 
9:47 PM
ok
 
After I get bored with Skyrim the plan is to play some Deus Ex: HR
 
I bought it, I had GTA IV on xbox360/ps3... but I only ever drove around for 30 minutes until it got boring. Now with GTA V it took quite a bit longer... amazing graphics and details
i imagine it will be awesome with the first consumer version of oculus rift
riding a bike in first person view
i mean like 30 minutes once a week
 
Anonymous
I have't owned/played any video games since my last PS2 console in 2006. It feels all new about hearing stream, steem, minecraft ....
 
Anonymous
I hope I will get back to old habbits soon
 
9:52 PM
@tereško but there was some crashes and it didnt like my gamepad so waiting for discounts is a very good idea
 
Anonymous
You people are lucky :/
 
@samaYo its probably better, gaming is objectively wasted time, sort of
 
@samaYo gonna build your own rig ?
 
Anonymous
But most of my best memories are filled with me playing tekken 3, 4, 5 / gta vice city, onimusha with friends @MarcelBurkhard
 
he needs to save uo first iirc, 150 bucks so far
 
Anonymous
9:55 PM
@tereško read above, I don't know what those terms mean.
 
@samaYo thats the thing, i dont think i have more fun now then with pokemon on a gameboy ten years ago
@samaYo Rig is a computer, built from parts
@samaYo steam is a amongst other things a marketplace for games
 
Anonymous
@MarcelBurkhard so no one buys a console anymore? You are playing on a PC?
 
@samaYo rig: noun a device or piece of equipment designed for a particular purpose.
 
Anonymous
I heard alienware are best gamming PCs, is that true @MarcelBurkhard
 
@samaYo please no
they have like 50% "trademark tax"
at least
 
9:58 PM
@samaYo well people buy consoles, they are cheap and you can play games almost in full hd at 30 frames per seond
second
 
"almost in full hd"
 
Anonymous
ok, ok. Last time I played was in 2007. I am far too behind the gamming world now. so what is the benefit of using a pc than a console?
 
@samaYo with a proper gaming pc you can get a more fluid experience with more frames per seconds
and also more pixels
 

« first day (1652 days earlier)      last day (3289 days later) »