« first day (2923 days earlier)      last day (2040 days later) » 

6:06 PM
who hasn't finished TNG?
smh
 
@rlemon taking a break
 
for 20 years? 😉
 
@rlemon tbh, I haven't ever watched it :P
 
I don't even know what to say anymore
 
@rlemon I didn't watch it growing up... and I had an aversion to Star Trek cause I have daddy issues and my dad loves Star Trek
 
6:08 PM
@Tiffany I have daddy issues as well, but TNG is just too good
 
@rlemon @Wes convinced me to watch it
 
Wes is sometimes a smart man
3
might I also suggest StarGate
 
already watched that
 
SG1 > SGA, but both worth watching
SGU doesn't exist
and the movies (other than the first) all suck
 
@rlemon I love SGU
 
6:09 PM
and Farscape, and several other sci-fi series I can't remember at the moment
 
1 min ago, by rlemon
I don't even know what to say anymore
 
@rlemon Well, I am 20 yrs old, so it was before my time, but I might watch it
 
@rlemon The last SG-1 wasn't so bad
Continuum was meh
 
@rlemon Robert Carlyle is one of my favorite tv actors
 
SGU might have been okay had they not made it a stargate
stand alone show.. I could see that
but trying to sell it to stargate fans was a mistake
 
6:10 PM
The Ark of Truth
 
@Tiffany it was better, but I still wasn't a fan
 
@rlemon Well I haven't watched any other stargate, so, maybe that helped.
 
@rlemon yeah... we were expecting something that wasn't so serious
SGU was a drama, SG-1/SGA are more comedy
 
@Shafizadeh sound like some "marketing bullshit". It is not a real term.
 
@tereško I see
 
6:11 PM
McKay having a woman's consciousness stuck inside of him... how is that not funny?
 
man, now I wanna grind SG1 again
 
"But Jack!"
"NO DANIEL"
 
I have the dvd box set. but who has time for dvd's
gotta find a streaming service for it
 
it's on VRV right now
 
@Shafizadeh if I had to guess, it's what app developers call "superuser". As in: user who actually knows how to use a computer.
 
6:12 PM
netflix had it a while back
sad they took it off
 
I started watching Battlestar Galactica recently, stopped watching after 2nd season, seems too boring.
 
@tereško Ah I see
thx
 
@mega6382 I haven't finished it. It has moments where it's better, but season I think three just does a lot of weird stuff
 
it took me three attempts to get into Discovery
and I'm still a bit wishy washy on it
but I'm gonna stick out the first season
I think the problem I have is the new shows cater to a new generation of 'nerds'
 
Go watch a real space show. Cowboy Bebop.
 
:(
 
@Fabor or the tv series version - Firefly
 
100%
 
@tereško Firefly is MY JAM!!!
 
6:18 PM
@Tiffany SG-reality suffered from one major flaw: power-creep
think: Bleach
 
@tereško anime?
 
also, the "original MacGyver" has a perfect comedic timing
 
@tereško yeah
 
MASH
 
it should've ended at season eight
 
6:22 PM
some of the funniest and most dramatic TV ever
 
I don't regret the Ori arc, but season eight was a perfect ending for the show
 
I agree
 
though we wouldn't have the 200 episode :(
 
Ori arc was when I completely lost interest ... though, the Baal bits were funny
 
but the crossover eps with Atlantis were fun
 
6:23 PM
@rlemon "I'll shoot him myself!"
I thought that was in a crossover episode, but I guess not
 
I think that was first episode of SGA
@Tiffany have you seen this bit of an interview: youtube.com/watch?v=br-7sEAPhUk
 
guys, I want to redirect all www format of my website pages to non www .. where is the code I've found by some researches, but sadly that redirection doesn't work and still I can see pages using www :
<VirtualHost *:80>
.
.
.
RewriteEngine on
RewriteCond %{SERVER_NAME} =lamtakam.com [OR]
RewriteCond %{SERVER_NAME} =www.lamtakam.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]               -- this
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]              -- and this are for www redirection
                                                        -- but doesn't work
</VirtualHost>
any idea how can I fix it?
 
well .. just remove that redirect condition
do you actually need it?
 
what condition do you mean? those two on the top?
 
6:36 PM
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
wait, no
 
ah, actually I've added them recently to redirect www.lamtakam.com to lamtakam.com
 
that's the "redirect to https" stuff actually
 
that's exactly what I'm trying to do
@tereško this is redirection to https:
RewriteCond %{SERVER_NAME} =lamtakam.com [OR]
RewriteCond %{SERVER_NAME} =www.lamtakam.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
 
why are there '=' symbols ?
 
I didn't write them .. Let's encrypt added them (those three lines) automatically
 
6:38 PM
oh
TBH, I really suck at mod_rewrite ... I just tend to fiddle with it till I guess the right magical combination
 
@tereško that was when Shepherd had the shield and McKay pushed him off a banister
 
ah
 
@Shafizadeh Try with this page. Or ask question on SO and tag user anubhava :D
 
@tereško not this specific interview, but I've heard them say the zat was stupid
 
6:44 PM
@Tpojka exactly I've used this github.com/phanan/htaccess#force-non-www
but I guess I've placed that snipped wrongly
 
So you want www to non-www + http to https, right?
What is error?
 
yes exactly. All these three kinds:
- lamtakam.com
- lamtakam.com
- lamtakam.com

Should be redirected to:
- lamtakam.com
@Tpojka there is no error and http to https redirection happens well .. just www to non-www redirection doesn't happen
 
No error in /var/logs/apache2/access_file_name.log or /var/logs/apache2/error_file_name.log
?
Wait. Chat stripped slashes.
 
could I simulate a CSV file for the purpose of unit testing a function?
or integration testing, not sure if that's unit or integration
 
Try this:

https://pastebin.com/UhXxcjHj
 
6:57 PM
I suppose fputcsv
 
@Shafizadeh I think I set it now. Chat stripped lot of code up there. Check pastebin link I left.
 
@Tpojka I will check it now .. htx
@Tpojka just one thing, you've modified those lines that lets-encrypts itself added, are you sure about that?
I'm talking about these lines:
26 mins ago, by Shafizadeh
RewriteCond %{SERVER_NAME} =lamtakam.com [OR]
RewriteCond %{SERVER_NAME} =www.lamtakam.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
 
In that case put just first block before lets's encrypt's block.
First RewriteCond RewriteRule pair from link.
 
ah ok
 
7:20 PM
@Tiffany PHP usually use it with file_get_contents to get plain string first, so I'd say so. Just don't forget to append lines with "\n".
 
I have a PHP file that's run via command-line. One of the parts is calling a function which inserts values into an Oracle database. I check the database, and values are not being inserted. I do not receive any error messages in the log. I've tried var_dumping different variables within functions, conditionals and loops, but nothing is output to browser. I've verified that I can output variables to the browser by var_dumping another variable that isn't located inside a function.
How else can I debug this?
 
Which log?
Checked the result of the insert?
 
@Fabor php error log... I have it logging to Event Viewer though, and so far it's worked with any other PHP error
@Fabor the weird part is... the library function that's used... if I use the manual insert script, it works as it should... it inserts values into the database, but the automated insert script doesn't
 
Check here.
 
@Tpojka it's logged other errors
the directory one that I was confused on, it was logging the errors, it's within the same script
it's like functions aren't getting called... stuff isn't getting ran
but that's not entirely accurate, because part of the script is moving files from one folder to another folder, and that part is happening
oh wait
... I'm a dumbass
 
7:26 PM
I am wondering is there difference between cli and apache execution i.e. different log file.
 
it's PEBKAC, ignore me
chat.stackoverflow.com/transcript/message/44301017#44301017 -- I wasn't moving the files back into the original folder in between tests
 
I'm the worst programmer in the world... star me. 5 likes improves my abilities by +1
 
@StatikStasis how'd you know my mantra for the day?
 
perhaps I'll turn off the "move files to another directory" part until I get the insertion part working
 
7:56 PM
\o
 
o/
 
I don't want to debug undefined offset issues and undefined index issues...blah...
 
8:13 PM
Mar 22 at 7:29, by mega6382
but debugging is the only fun thing about programming )))
 
@mega6382 lies
 
Its so fucking hard to search for my messages before my account id was changed
 
Refactoring is pretty up there on fun things.
 
@Fabor I tried converting a few queries to use parameterized queries and broke the whole thing... I had to revert the changes :<
I would like to look at it again, maybe sometime early next year, when the new web platform project is off my plate
 
@Tiffany You know, when I once refactored a codebase, instead of editing the existing code, I just started from scratch and took guidance from the old codebase, it took far less time then it would've to edit the existing codebase and was easier.
 
8:19 PM
I'm not experienced enough to do that yet
I mean, sure, I could just do it, but it would take me three to six months and I don't have three to six months
 
getting real annoyed of some developers using ass hole tactics on some nice clients
from iframes of sites to domain name hostage situations, etc.
 
@Darius coworkers, or just people you know?
 
just people i know.
and whenever i take over a new client, cleaning up messes
 
@Darius there must be a reason for that
Sometimes clients don't pay and devs do that
 
these clients (stupidly) pay 500/mo
for a basic wordpress site
nothing bad on client end
 
8:21 PM
@Darius Maybe they weren't nice to the old devs and were nice to you so that you won't do the same, huh?
 
@mega6382 or the devs are just dicks
"lolol stupid client"
 
@Fabor This is my favorite thing
 
I don't think that's the case, some of these people don't even know how to use a computer and it's a simple bakery business for example
 
@Tiffany If they are wordpress devs, they are most definitely dicks :P
 
Last one was fun, india special.
 
8:23 PM
@Darius then they should use wix :P
 
one client I work with uses weebly
 
Weebly/wix gets the job done for some people admittedly.
 
she occasionally requests stuff and half the time there's no way for me to do it because weebly's wysiwyg doesn't offer a way for me to do it, and I can't modify code
 
If they want an online store than shopify is pretty good and if they want a blog or something ,then wordpress.com and blogspot.com are good solutions
 
though, I did learn a way to add my own asset files like css/js
 
8:24 PM
The funniest thing I've seen with weebly was a friend created a beaaaautiful site for a client. The client decided to make a frankenstein monstrosity on wix and said "this is better"
Friend's jaw dropped and I shrugged at him laughing
@Tiffany guessing via javascript?
 
I remember the time i used to use 000webhost, oh the fun times, my first couple of months as a developer, making stupid things for myself. :D
 
@Darius no, like there's a way in weebly to upload js/css files I think
 
freewebs was the best
 
geocities or gtfo
 
ahh geocities :D
 
8:27 PM
When I was a kid, I could never figure out how to use angelfire... a friend showed me this one website that was basically a wysiwyg, I remember making this terrible site. This was years before I learned HTML. I doubt CSS was a thing back then.
 
I was like 13 yrs old then
anyway, it helped me get a job, so, I can't complain about it now.
 
My first site was a blazing red 1 pager with dragon ball gif
 
In high school, any time a teacher had us do a powerpoint presentation for a project, I requested to make a website instead of using powerpoint, it's how I learned HTML/CSS. I used geocities everytime, I would just create a new account each time.
 
@mega6382 I have been doing some research for the past month on online shopping, and the best middle ground is magento. All other alternatives from shopify, woo-commerce, spryker, open cart have their own up/downside
magento is somewhere in the middle imho
 
magento is sooooo heavy though
 
8:30 PM
@samayo I said shopify, because they provide their own hosting and support for that hosting, like wordpress.com, I don't know whether magento does that or not
 
images-na.ssl-images-amazon.com/images/I/… Magento, yet you only need the knife on there.
 
Yes, there is a cloud option
 
There was that one other site, bigcommerce?
 
Magento also has tons of plugins, is made with PHP unlike shopify which is some weird ass language
 
liquid :D their made up language of twig monstrocity
 
8:33 PM
@mega6382 i decided to reunite with PHP, hope I won't have to go through PHP 4 to be accepted back by the community
 
@Darius Yup, it is good option for non developers though
 
@pinepain just an install, and uninstall to get you vetted
 
@pinepain Actually, messing with PHP 4, will get you permanently banned from the community now :P
@Darius All template engines are monstrosities.
 
@mega6382 yeah, you know, there was not so many changes during this year in PHP itself (I hope Zeev And Dmitry departure is not connected with my decision)
 
@NikiC could you please do a quick review / scan of a comparable/equatable implementation that I was working on a few months ago? I'd like to know if the general direction is acceptable before I spend time reworking it on 7.4.
The core initiative is to distinguish between comparing for equality and ordering.
 
8:49 PM
 
I was just googling myself and found that my projects from github are published all over the internet on some random russian and indian and whatnot sites.
 
@mega6382 with your copyright intact?
or at least credit to you?
 
@Tiffany Yeah, they were credited to me and the link to the original was also present.
 
@mega6382 Yeah. Russians and chinese for me
 
@mega6382 that's good at least
 
8:51 PM
@PeeHaa It feels good to be famous :P
 
I was reading on reddit years ago about a game dev who had their game copied almost exactly by a Chinese dev, no credit to the original game dev
 
@mega6382 :-)
 
I have about over 4000 downloads total from packagist and other such sites where I've published them myself.
 
@NikiC somewhat related, from this morning, github.com/sebastianbergmann/comparator/pull/63
 
That's why you secretly embed pictures of Guy Fieri in your code.
 
@Tiffany Yeah, you already shared it once, i remember
 
One of my cats has this thing where she keeps laying on my pillow where I lay my head on at night. I have to constantly move her. She doesn't like that. I've put a pillow next to my pillow for her to lay on. Sometimes she does, most of the time she still tries to lay on mine -_-
 
@Tiffany I really want to get a pet, but I also know that I am too lazy to clean up after them
 
9:00 PM
Goldfish
 
also this: reddit.com/r/gamedev/comments/48n2gx/… TL;DR game dev created a website game, a year later they tried porting it to iOS, some fucker had registered their game name under the asshole's account
 
@Fabor Nah, it'll probably die from starvation
@Tiffany sounds like a good way to make some money :P
 
@mega6382 or have your account locked if a DMCA takedown is issued against something, and Apple investigates the rest of the stuff you have registered
 
yeah, or that :P
 
@mega6382 Sounds like a good way to get a DMCA up your butt.
You might be able to get away with it if it's a flash game and it's a chinese company
Not so much on the Apple app store.
 
9:10 PM
damnit. apparently someone's been banned 'till 2024, and I really want to see it with my eyes, but I only have little clue!
 
is it that sagar jerk?
 
don't think so, no
 
@mega6382 Yeah, quotes around object keys are optional in JS, but not in JSON.
Here's a fun riddle: Yes or no (and why): Any valid JSON string can be 1:1 mapped to a valid JS expression
For example, the JSON string '{"key": "value"}' is 1:1 mapped to the JS expression: { key: 'value' }
More specifically, is there a JSON string that cannot be represented in JS?
cc @PeeHaa
@Jeeves You can't fool me. Thunderstones are clearly what causes Pikachu to evolve into Raichu.
 
@MadaraUchiha It should be no, but you ask it so I am gonna go with yes. Don't have time right now to think about though :-)
Pretty sure dashes in keys are handled properly which would have been my first 1 second guess
 
9:24 PM
@PeeHaa Why do you think it makes sense for it to be "no"
@PeeHaa They are.
 
@MadaraUchiha Mostly because of the premise of the name
 
Note that I didn't ask for all JS values to be representable in JSON, I asked about the other way around.
It's easy to find values in JS that are not serializable into JSON. Functions, for example.
 
I'd think that all "types" that can be expressed in json have their equivalent in js.
 
JSON is "marketed" as a complete subset of JS, that implies that all possible values in JSON are representable in JS
I'm asking if that's true or not :)
 
meh, I'll bite, yes, it is.
 
9:28 PM
Alright, you're wrong :)
 
damnit.jpg
null values?
 
null is representable in JS. JS has null.
 
0 as a key of an object?
 
Supported in JS.
(What do you think arrays are? 😃)
 
non monotonical numbers as object keys
would be lost in an array
 
9:30 PM
Supported in JS.
Syntax-wise, anything JSON supports, JS supports as well.
The key here is that JSON is a string, and thus it doesn't share the same limitations JS has.
 
Anybody knows how google webfonts hosts the calibri font. It's not in their web interface, but it is available. Seems shady as fuck to me?
 
.... 123GB json string?
 
@FélixGagnon-Grenier You're getting close!
 
or maybe long long long
 
9:32 PM
@FélixGagnon-Grenier Bingo
 
\o/
heh, interesting
 
{"x": 99999999999999...............999999999999}
Would translate into {x: Infinity} in JS.
 
Given enough 9s
I wonder what PHP would do with such a JSON.
 
did that bite you at some point, by any chance? :)
 
9:33 PM
And in JSON it translates to who knows what
 
@NikiC Hmm? The JSON is the input string
Although that's a good question
 
hmmm shite gtg, laters! thx for the brain tease Madara :)
 
JSON is not rigidly specified and implementations interpret edge cases however they like
 
I think JS's JSON.stringify() would translate it into the string "Infinity"
Nope
:D
 
@MadaraUchiha php would likely that that as either a string or inf, depending on whether the bignum option is set
A better example of how json is not a subset of js is the difference in acceptable newline characters inside strings
 
9:35 PM
JSON.stringify({x: Infinity}); // '{"x":null}'
lol
 
@MadaraUchiha php will error out for that case
 
@NikiC Neither JSON nor JS accepts newlines inside of a string
And the \n escape sequence is acceptable in both
 
@MadaraUchiha yes, but they have different interpretations of what a newline is
JSON allows unicode newlines inside strings
JS does not
 
Does it?
 
That is the reason why we say that JSON is not a subset of JS
Thankfully most JSON implementations will escape these characters by default
 
9:38 PM
No it doesn't.
JSON doesn't allow a real newline
 
@MadaraUchiha you sure about using the backticks?
 
@MadaraUchiha unicode newlines
 
@tereško Yes, string template literal allows for actual newlines
 
specifically line separator or paragraph separator
 
I think it ends up as JSON.parse('undefined') ... and thus the error
 
9:40 PM
Works fine for me on Chrome
 
`{"x": "hello
world"}`
"{"x": "hello
world"}"
@tereško it's fine ^
 
JS has full unicode support since forever
At least since 2015
 
@MadaraUchiha Yes, that's the point. It works fine for JSON strings, but not for JS strings
In JS these characters must be encoded
 
then the handling of newline is not browser-agnostic
 
Again, not true.
The \u is just because I happen to be on Windows at the moment and have no easy way to input arbitrary unicode characters here
 
9:43 PM
a question, I'm storing a title for posts in my website, also that title will be shown in the URL for that post. The issue is characters like ?, &, % will break the URL. So should I remove them from the URL? Or I can escape them?
 
@Shafizadeh You can escape them before you generate the URL with urlencode (IIRC)
But that might make for an ugly URL, and what happens if you have two posts with the same title?
I'd probably go with something like "to lowercase, replace spaces with dashes, remove anything that's not a-z0-9" or something like that
 
@MadaraUchiha actually that title will not be investigated for routing .. so I don't care about being duplicate
I mean, I found the post using the id in the url
 
So the ID also appears in the URL?
 
yes
 
Look at how SO does it
SO does it very well, IMHO
 
9:46 PM
true
@MadaraUchiha is there any function for doing that?
 
@Shafizadeh strtolower preg_replace
Nothing builtin
Unless PHP has a magic URL slug generating function now?
But that sounds unlikely.
 
ah ok .. I'm actually good in regex, I will make one
 
@MadaraUchiha I just double-checked the spec, it's not allowed
 
@NikiC Link?
Not allowed in what context?
 
9:50 PM
JS strings are UTF16, they can clearly represent these values
 
Yes, but not in unescaped form inside string literals
 
@NikiC How... interesting...
Yet it does seem to work.
Either I did something wrong, or Chrome is disregarding the specs on this
 
Maybe it's one of the cases where implementations choose to be non-conforming in favor of practicality?
Because this is basically the one and only reason why you can't just parse arbitrary JSON as JS
 
Edge borks on it
Very interesting
 
btw, ecmascript is a really great spec
It's pretty much the only good programming language spec
Everything is very explicit and unambiguous
You don't need a language lawyer who is going to collect paragraphs from seven different sections to answer whether a certain bit of C++ code is or is not UB
 
9:57 PM
Hah
 
I love Kotlin, fwiw
 
@NikiC Are you familiar with document.all?
It's one of the best ECMAScript (yes, ECMAScript) features ever
 
@MadaraUchiha what is it?
 
@mega6382 It's an object that represents a NodeList of all of the nodes in the DOM
The fun thing happens when you try to examine its type with typeof or try to convert it into a boolean
Give it a shot in your console
typeof document.all
 

« first day (2923 days earlier)      last day (2040 days later) »