« first day (2199 days earlier)      last day (2746 days later) » 

9:00 PM
In totally unrelated news, my job is kind of annoying.
 
in python, there's a library called 'gevent', for example, that monkey patches stdlib and makes all the IO calls non-blocking, then manages the stack itself (with an event loop et al)
@Danack "totally unrelated".... yep.
 
@NikiC yes, but that's all the same thing… it is always involving some sort of preemption and notification (via e.g. a new stackframe). … except for polling and select; I have no idea why this is even on that page; these are normal syscalls?!
at the very least for everything where we have control of in user mode programs.
@Danack It works without, thus you don't have to…
 
(the lib is really nice because it monkey patches everything, and you just use normal code, read() et al, no yield or whatever, and it's all async)
 
!!giphy magic guy
!!undo
 
@FlorianMargaine so, basically what I wish async in PHP were :-)
@PeeHaa E_UNDO_NOT_WORKING
 
9:07 PM
1 message moved to Orphan GIFs
It's a feature :P
 
Don't suppose there's any reason why apache would be running but isn't.. accessible? Pretty much my last straw before I just reimage the server and restore from backup
 
@Sean I would debug a bit before restoring...
like, lsof, strace, etc.
 
It has multiple processes running on the server but apache2ctl yields "Can't load localhost:80/server-status."; after hanging and ^C-ing
sites timeout, and I don't understand how to use strace
 
@Sean try to disable mod_status?
(or enable it if that's what's broken)
 
@Sean you should learn strace, it's going to be your best friend forever
 
9:09 PM
Did both, same thing
 
uh… try tracing syscalls as Florian suggested
 
What would I strace on though? apache2ctl start?
 
that runs the apache2 binary no?
but yes, you can start with that
see where it's locking
hint: use the -f argument
 
That's a lot of data
 
"where it's locking" is usually the last line
 
9:19 PM
Would a firewall ever block localhost:80?
 
@Sean if it's configured, sure
 
@FlorianMargaine yes I have done that :-)
@FlorianMargaine inorite
 
@JoeWatkins neat!
 
Even iptables hangs halfway through iptables -L. What is even happening
 
@Sean DNS
If iptables has name-based rules in it, it may hang trying to resolve them if it has no DNS resolver. Same goes for apache. Depends how they are configured, obviously, but when network things inexplicably hang, DNS is often to blame in one way or another.
 
9:27 PM
@Sean is iptables -L -n instant?
 
Oh man, this server can't even ping outbound
 
ping what?
 
google.com
 
a name or an IP address?
ping 8.8.8.8
 
No response
 
9:28 PM
if iptables -L -n is instant, it's a DNS issue
 
@Sean ip route list
 
Yep, was the firewall. ufw disable and I'm getting replies
 
wait, the firewall is blocking the loopback?
 
I think so
 
wat
 
9:32 PM
I can reach apache from the web since disabling.
The next problem being that libapache-mod-php5 is installed but it's not listed in mods-available. fantastic. Also gotta get that firewall sorted out
 
try running iptables --fucking-do-what-i-want, that's what I usually end up feeling like after trying to do anything with it
 
What is the equivalent of $reactor->run(); in modern Amp? Context - I'm migrating some old code that uses Artax, that was using that to wait for all requests, and all the subsequent requests that the responses generate are complete.
 
@Danack by "modern" do you mean v2 or most recent release?
 
v1.2.2 apparently - that's the one that the most up-to-date artax wants I guess?
 
@DaveRandom yes, that, so much that
 
9:38 PM
probably you want something like:
$promises = array_map([$client, 'request'], $requests);
wait(all($promises));
@Danack ^
@tereško Every. Single. Time.
 
that 2nd line reads really natural, I like it
 
No matter how heavily I crib from some other working repo
@Ekin yes and no, it's a little on the magical side :-P
 
@DaveRandom I possibly should just wait to try this tomorrow, when I have more brain power available....but the problem with migrating my code to be like that, is that there are more requests being sent to Artax when the initial requests are returned.
i.e. the list of promises isn't known at the outside scope.
 
@Danack Ah right OK, then you probably want to just Amp\run(function () { /* async script goes here */ });
 
ta.
 
9:45 PM
where that callback can be a co-routine i.e. you can use yield in it
 
@DaveRandom well, to me all the async stuff is magical, but would you elaborate on the "no" a bit?
 
Wes
@tereško thanks. why that gpu? i'm not going to play at all
 
@Ekin well only in the sense that it doesn't tell you much about what is actually happening i.e. a little code does an awful lot. But that's not an entirely rational answer and is definitely a bit vague, sorry
 
I see what you mean though. Thinking in that way, yeah it's indeed on the magical side
 
Wes
also 550w doesn't seem enough, hdd consume 20w each iirc, and i'm going to have 4 in there or even maybe 5 if i decide to buy a ssd
 
9:58 PM
Still in a way it is simple enough to make successful guesses about what's happening
 
Wes
also evenings all \o
 
o/ evenings
 
@Ekin equally though, frameworks like amp are deliberately black boxes, because they are essentially a runtime all of their own - something like wait() becomes a "core function" that you treat as if it is bug-free at all times, in that same way as you don't test whether file_get_contents() actually did what it was supposed to when you are testing your PHP application
 
Yeah that sounds true indeed
 
pfffft really -_-
 
Wes
ahahahaha
 
lol!, I just saw that site is actually a thing @PeeHaa
> *1 Advice may be invalid due to caching
 
So, get this, ufw has ALLOW on 80/tcp and 443/tcp, but when I enable the firewall it blocks everything.
 
@Sean for the record, pretty much the only thing I know about configuring iptables is that I suck at it
 
10:15 PM
Same, resetting back to defaults fixed it all
What an absolute arse-on. That's what I get for trying to install php7 on 12.04
 
I do not understand it, like, at all. I just don't get it. It seems to me like someone should have come up with a sane interface for it by now instead of having to issue mind bending commands and be completely unable to visualise any of it, but if such a thing exists then I have never seen it
 
In the end I had to undo everything back to 5.6 and apache 2.2
5.4*
 
hello
0
Q: Laravel - Public variable in controller

lewis4uI want to have one public variable $users = User::all(); so i could use it in different methods inside controller and it doesn't work this way: <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; use App\User; class AdminController extends Controller { ...

 
Wes
we don't do laravel here
 
ok sorry
 
Wes
what is part of speech?
 
> A Part-Of-Speech Tagger (POS Tagger) is a piece of software that reads text in some language and assigns parts of speech to each word (and other token), such as noun, verb, adjective, etc., although generally computational applications use more fine-grained POS tags like 'noun-plural'.
 
Wes
ah, nice
 
@Wes pee is part of speech
 
Wes
what about haa?
i voted banana, though
 
10:21 PM
speechaa
 
Wes
:B
 
:D
I was kinda tempted to go with POSTagger but that "post" just ruins it
 
Wes
 
:D
 
@lewis4u you would need to initialise it in a function, like maybe the constructor. PHP doesn't allow you to initialise properties with function calls.
@DaveRandom btw, has anyone given you the advice of practicing your talk standing up, rather than sitting down yet?
 
Wes
10:37 PM
from 2 hours from now, i'll disappear from the internet for 24 hours because i want to avoid "the walking dead" spoilers
it's quite scary
 
@Danack no but I was planning to go through it with my misses and possibly at work if anyone will listen
and somehow I imagined doing that standing up
 
11:03 PM
@Wes is fernet branca an italian thing?
I always thought it was sudamerican
 
Wes
yes, it's an "amaro" - herbs liquor
 
yeah I've had it a lot in these last 3 years here
 
Wes
:P
 
which is why I thought it was sudamerican :P
cause they are very proud of it around here
 
Wes
my fav is "amaro lucano" ever heard of it?
 
11:06 PM
no I think I haven't
 
Wes
in fact, i'm thirsty now :B
 
^^
 
Wes
i also have the coffee liquor variant, which is also very good :B
 
baileys ftw
it's been a while, I'd have some now
though I've been drinking my favourite wines from around here all the week
:( I'm going to miss these lands a lot
 
Wes
are you moving?
 
11:13 PM
yeah
 
Wes
or just traveling?
 
first I'll be just traveling until Feb
actually not sure if going back to my hometown counts as traveling.. but it'll be what I try to think/do
 
Wes
:P turkey, right?
how did it happen that you moved to south america? it's quite a long distance
 
yeah... there's also a big chance I'll visit UK and possibly Amsterdam too until Feb
 
Wes
nice :D
 
11:17 PM
though until then I should decide where to go for work and all too
@Wes I wanted to go outside and discover, basically
never felt I "belonged" there, never really liked the kind of people you bump into everyday
it is a fascinating place for all the natural wonders there are
but I literally hated living in all big cities I lived in back there
 
Wes
there = south america or turkey?
 
turkey
 
Wes
why are you going back in eu? south america is cool
i imagine there are more opportunities for people like us
 
well, the way I live here is so friggin asocial and I wanted to be with mum for a while
cause she recovered but the psychological effects and all kinda ruined her
and I'm kinda sick of solitude a bit now after about 1,5+ years surrounded by small forests
 
Wes
makes sense
how about big cities in south america? how's the life there?
 
11:28 PM
busy, always moving, I guess just like all big cities
people are always late
 
Wes
:D
 
Montevideo is pretty much an old-looking city but Buenos Aires for example is beautiful
all the streets are covered with trees and all, walking and cycling is really peaceful
that kinda applies to Mvd as well
haven't spent enough time in other parts to say much about them
 
Wes
> There seems to be a problem connecting to the server. Please check your internet connection and reload this page.
just me?
 
I think yes :P
 
Wes
no big deal though, since i'm quitting the internet soon
:D
i think i have one hour left or so, then all the social media will be bombed by TWD spoilers
do you watch TWD? :B
 
11:36 PM
nope :P
 
Wes
boooo
:D
 
heh I plan to, but not sure when
 
Wes
it's great :P highly addictive
 
:-)
 
Wes
never been addicted to a tv show at these levels before. probably it's because deep down i'm a doomsday prepper / a redneck :B
 
11:44 PM
:D heh
I enjoy most of the survival etc themed stories
unless its a group of youngsters going through horrific events after some sorta accident
those are mostly lame
 
Wes
 
:D
 
Wes
if you like survival stories, i think you would like twd :D although, it's not really about survival nor about zombies. it's more about human behavior
zombies are just the trigger
 
I see
 

« first day (2199 days earlier)      last day (2746 days later) »