« first day (2267 days earlier)      last day (2559 days later) » 

12:01 AM
I think then that is sign need to get new monitor :P
 
Remove Spellcheck on that Textbox.
 
Yes please
 
12:54 AM
3D Polar graphs now work.
 
1:08 AM
how does one use these graphs?
 
It's math.js, functions labeled f... (where ... is optional numbers) will be treated as a line graph, p... will be treated as a polar graph. If given two arguments, like f(x,y) it will be a 3d graph.
You can also draw graphs explicitly using either line(func [, color]) or polar(func [, color])
You can also now use matrices to define colors.
So you can call line(_(x)=x, [0.5,0,1]) to give yourself a nice purple line.
I need to fix Stack Exchange eating my *'s...
 
1:36 AM
@DownWat is it possible to have link a seperate set of stories for a "school" with your rails thing?
 
@Downgoat huh?
 
so like right now to my understanding, the database has a list of stories. Could it instead have a list of schools (and each school then has a list of its own stories)
 
Yes it could
I will remake and post on github
 
in the 2003 live version of Coldplay's yellow:
> There's no excuse to be sat down in this song, please, y'know. If you stand up, we'll buy you all ice cream.
 
@DownWat :D thanks
 
1:45 AM
@Downgoat yeah made a separate schools model and now integrating it into the stories model
 
wow that was fast
i should really learn rails
 
@ATaco feature request: dragging to change perspective etc.
@Downgoat wasn't that thingy do today?
 
@ConorO'Brien yes
 
> do
 
yes I did notice that. I refrained from editing so as to not spam the ping. Thank you for pointing out this mistake, how astute
 
1:50 AM
@Downgoat dk0.us:3001
 
@DJMcMayhem you might benefit from using some sort of deepEqual method. If you're going for golfy, just do e=>e!="1,2" (note that this won't work with input arrays like [1,[2]] because they are cast to a string the same way)
 
@DownWat and can I get 1) list of schools as json and 2) stories for a certain school as json
 
@Downgoat 1. Yes, even right now, try it out, dk0.us:3001/schools.json 2. yes, soon™
 
10/10 this is great thank you so much
Question: is JSONP possible? i.e. e.g. /stories.js returns var stories=/*json*/
 
0
Q: New Tag proposal: analysis

Wheat WizardI am currently taking two analysis courses at my university right now, and will likely be taking some form of analysis for the next two semesters as well so I thought I would try my hand at some analysis code golf questions. However when I searched [analysis] I came up with no results because th...

 
1:59 AM
@Downgoat Should I do that? I might be able to do that...
 
idk, I mean if it's not trivial it's ok I can do AJAX
 
@Downgoat Why not just use the templates in the application to provide functionality?
OK @Downgoat Pull the app, delete the database db/development.sqlite3, run rails db:migrate, restart server
 
@DownWat I can just do rm db/development.sqlite3?
 
yeah
 
2:13 AM
anyone here familar with apache? >_>
 
@Downgoat nginx is better
use it please
 
@DownWat ik ;_; but entire server runs on apache and it'll take me a while to make te transition
 
I think there's a config converter out there
 
2:37 AM
 
@DownWat Can I change the port it runs on? I'm deploying to server and it looks like port 3000 is used for node.js
 
@Downgoat Yeah. In the service file I gave you (have you made the modifications I suggested?) add the parameter --port whatever to the end of ExecStart
 
[Unit]
Description=Inventory Server
After=network.target

[Service]
WorkingDirectory=/var/www/api.vihan.org/stories/
ExecStart=/usr/bin/ruby /usr/bin/rails server --port 3001 --bind 0.0.0.0
Type=simple
PIDFile=i dunno what goes here

[Install]
WantedBy=network.target
@DownWat am I on the right track?
 
@Downgoat PIDFile=/var/www/api.vihan.org/stories/tmp/pids/server.pid
 
ok cool thanks :D
 
2:44 AM
Add a line to service saying User=www-data
chown the app to www-data
 
ok
 
and then change description to something more sane
 
chown -R www-data:www-data /var/www/api.vihan.org/stories right
 
because that was from inventory.dk0.us
@Downgoat yeah
 
>_> I am super careful with chown after centos incident
 
2:45 AM
@Downgoat Define centos incident. sounds scary
 
@DownWat read from here down:
Sep 28 '16 at 3:26, by Downgoat
dumb question: how to login as root without sudo command?
 
@Downgoat thkans
 
@Downgoat su ?
 
Sep 28 '16 at 3:27, by Downgoat
root password is not wokring
Sep 28 '16 at 3:28, by Downgoat
shit root user is locked after too many incorrect tries
I am professional idiot
 
0
A: Sandbox for Proposed Challenges

Silvio MayoloThe Pedant's Cosine My boss just told me to write a cosine function. Being a good math geek, my mind immediately conjured the appropriate Taylor Series. cos(x) = 1 / 1! - x^2 / 2! + x^4 / 4! - x^6 / 6! + ... + (-1)^k x^(2k) / (2k)! + ... However, my boss is very picky. He would like to be abl...

 
2:48 AM
@Downgoat painful. why would you ever do that
@ThomasWard I have your $7.50
send me paypal.me link please
 
Sep 28 '16 at 3:34, by Downgoat
Wanna know how I got here? NPM wasn't installing packages in correct dir so without thinking I did what an SO answer proposed and did chown vihan:vihan /usr/bin
 
> without thinking
There's your problem
 
Goats are genetically disadvantaged, we cannot fly like ducks, instead we must do things without thinking which is how we end up 500ft up on edge of cliff
 
Have you played goat simulator?
 
@DownWat yes
 
2:51 AM
cool
 
@DownWat I put the unit file in /lib/systemd/system/storiesapp.service (or similar) right?
 
no
/etc/systemd/system/storiesapp.service
then systemctl daemon-reload
 
/etc/systemd/system it's where my daemons hide, it's where my daemons hide
 
kek
don't git too close, it's dark inside
 
@DownWat Do I also need to sudo systemctl start storiesapp
 
2:55 AM
yeah
and sudo systemctl enable storiesapp
 
Apr 14 02:55:20 vihan.org ruby[13413]: from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
Apr 14 02:55:20 vihan.org ruby[13413]: from /usr/lib/ruby/vendor_ruby/bundler.rb:121:in `setup'
Apr 14 02:55:20 vihan.org ruby[13413]: from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `<top (required)>'
Apr 14 02:55:20 vihan.org ruby[13413]: from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Apr 14 02:55:20 vihan.org ruby[13413]: from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
oh no D:
oh yeah duh gem install
gem install throws an error?
 
can you machinectl shell www-data@ then cd in and bundle install
 
O_o TIL machinectl. Is entire app running in an VM?
 
No
 
> Unknown operation shell
 
2:58 AM
% machinectl shell www-data@
Connected to the local host. Press ^] three times within 1s to exit session.
[www-data@tera ~]$
@Downgoat machinectl can invoke a shell on the local host
 
Gem::InstallError: activesupport requires Ruby version >= 2.2.2.
but... but... I do have latest ruby
 
@Downgoat ruby -v
 
@HyperNeutrino congrats on HNQ
 
is ruby 2.4 or 2.3 better?
 
2.4
 
3:07 AM
@HyperNeutrino can I assume input is a numpy array?
 
can we all take a momment to appreciate how ruby's make script doesn't spew a bunch of uncomprehensable command to your terminal and instead kindly displays the file it's building
I appreciate this too much
 
user165474
@Riker What's HNQ?
 
user165474
And yes, you may, although there's already a Python answer using numpy.
 
hot network questions
shows up on the SE main page
click teh link
but cool, thanks
@HyperNeutrino did see that
 
user165474
@Riker Oh cool! Thanks :D And yeah, I saw your answer briefly.
 
3:11 AM
:D
yah
looks like 20 bytes shorter :D
 
user165474
Yeah :D :P
 
right now I'm going through my testing to make sure I didn't do a stupid somewhere
I've accidentally done that many times before
looks liek the code works though
 
@Downgoat I just built ruby2.4 if you want a zip
 
how does your computer build so fast wow
wait nvm
 
-j5
 
3:13 AM
DAMMIT
 
user165474
@Riker There's the one time I answered a challenge but for whatever reason it only worked on the specific test case >_> then again it was 2 am :P
 
ouch
 
@Downgoat what happened?
 
user165474
yeah...it was a pain to fix
 
user165474
cost about 50 bytes >_>
 
3:13 AM
I forgot -j flag exist ;_; and have been waiting like 8 minutes
 
will upload 1 sec
 
dot product is elementwise multiplication of two arrays right
it's late at night didn't sleep good
just double checking with sane people
 
user165474
yes :P
 
user165474
but I'm not sane btw
 
more sane than me
 
user165474
3:14 AM
def dot(a, b): return [a[i] * b[i] for i in range(len(a))]
 
user165474
@Riker That's debatable.
 
user165474
:P
 
>:U @julia seriously pls work
@HyperNeutrino ehhh I'm pretty sure I'm less sane
 
user165474
Ok if you say so :P
 
user165474
I forgot to add a list together sumwhere in my code...
 
3:18 AM
lol
 
bundle install
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
	from /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/bin/bundle:6:in `<main>'
 
@Dennis how can I cast an array to a string in julia?
specifically a matrix
 
@DownWat thanks ruby for sane error messages
 
@Downgoat is that sincere or sarcasm?
 
sracasm
 
3:19 AM
relog, gem install bundler
 
ERROR:  Loading command: install (LoadError)
	cannot load such file -- zlib
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
great
 
ah
you need to build the ruby zlib gem
install zlib dev libraries
 
@HyperNeutrino nice answr
I updooted
 
user165474
@Riker Thank you. Nice spelling. :P
 
3:22 AM
then cd to ruby-dir/ext/zlib then make and make install
then gem install bundler
 
@Dennis you sir
 
you might have to do the same with openssl
 
are a genius
>:U still doesnt' work
 
user165474
@Riker Don't you need to include import numpy in your answer?
 
I don't think so?
I mean, it assumes numpy arrays are given
 
3:25 AM
If in python you write a method in one file, you can call that method from another file with a nympy array without importing numpy in the original file.
 
user165474
i guess.
 
user165474
yeah okay.
 
user165474
Nice answer, I upvoted.
 
anybody who knows julia explain why this isn't working?
f=(a,b,c)->any((a.*b)==(b*c))
it should be the same formula as the other python answer
 
user165474
@Riker What are a b and c?
 
3:26 AM
call f([2 -3 -1; 1 -2 -1; 1 -3 0],[3; 1; 0],1)
a is the big matrix, b is teh smaller one, c is the eigenpair
 
user165474
This should be truthy?
 
yes
it's false
 
user165474
hm.
 
julia> f=(a,b,c)->any((a.*b)==(b*c))
(anonymous function)

julia> f([2 -3 -1; 1 -2 -1; 1 -3 0],[3; 1; 0],1)
false
 
user165474
Well (a.*b) is returning a matrix, not a vector, so it's not doing the right thing.
 
3:28 AM
wait a minute >_>
hm
 
user165474
Just do (a*b)...
 
you sir
 
user165474
lol
 
are a bigger genius than dennis himself
5/7 thank you
 
user165474
O_O
 
3:29 AM
>_<
 
user165474
did you just assume my gender
 
no?
 
user165474
:P (not that you're wrong jk)
 
I assumed dennis's
oh, 'sir'
 
@Riker unpossible
 
user165474
3:30 AM
yeah
 
you sir
have worse spelling than the goat himself
/s
 
user165474
unless you remember my old username. even then you can't really tell
 
Shouldn't that be gaot in that case?
 
ya
@Pavel too lazy
 
@HyperNeutrino Alex L?
 
user165474
3:31 AM
@DownWat Yeah, that was my old username here.
 
thanks @HyperNeutrino, @Dennis
:D got the answer (posted)
 
user165474
@Riker No problem. :D
 
user165474
@Riker I gave you a TIO link; I hope you don't mind :P
 
np
 
user165474
3:37 AM
done
 
@HyperNeutrino To be fair, Alex could still be a woman's name.
 
user165474
@Dennis Yes. That's why I said even with my old username you still can't really tell my gender
 
0
Q: Java program help

Criley1996Create a Java console program that prompts a user to enter a number. The program uses the input value to calculate and list the products of two numbers up to the entered number. For instance, if a user has entered 3, the program calculates the products between two numbers (e.g., 1x1, 1x2, 1x3, 2x...

 
user165474
>_> When @NewMainPosts oneboxes a challenge that already got closed :P
 
@Dennis Github says "Alexander"
 
user165474
3:44 AM
@Pavel How do you know this >_>
 
I clicked on your SE profile and is listed your Github
 
user165474
Oh
 
user165474
*facepalm*
 
That's why I renamed my GitHub account to DennisMitchell before linking it. :P
You can still figure out my real name though...
 
@Riker :O there is fellow hooved animal in TNB?
 
3:47 AM
Isn't your real name Dennis?
@Downgoat No
 
@DownWat um how do to this?
 
@Riker Why do you use string representations in your Julia answer?
 
Also:
 
Guys please don't vote to close the sandbox
9
 
3:49 AM
It would be even shorter to compare string representations. tio.run/nexus/python2#jZDPCoMwDIfP@hQ9tiOV/hEHgk/…Dennis ♦ 3 hours ago
 
@Downgoat install zlib and openssl dev libs, cd to ext/zlib, make, make install, cd to ext/openssl, make, make install
 
what is a dev libs?
 
development libraries
apt-get install libssl-dev zlib1g-dev
 
ah, thanks
 
@WheatWizard but... there are far too many possible answers
 
3:53 AM
@WheatWizard Or as duplicates of Things to avoid when writing challenges.
3
 
@DownWat hm :/ followed your steps but still get a:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
 
@Dennis I think that one has merit
 
rebuild ruby
 
0																												'
@Dennis ?
 
user165474
Is there a challenge similar/identical to the Jelly operator mould left like right?
 
3:55 AM
@0 ' what's with your username?
...I should try putting a U+202e in mine
 
@DownWat You have not pinged him
 
@WheatWizard I pressed tab, what happened?
 
I don't know but it doesn't highlight his last message
 
user165474
@DownWat I already tried doing a U+202E but it didn't work :'(
 
@DownWat rebuilded, and re installed and same >_>
 
3:56 AM
ugh i just tried.
@Downgoat wat.
 
user165474
@0 ' Maybe this works?
 
Uhhh I need help
 
Oh?
 
user165474
haha
 
With musical stuff
 
3:57 AM
Sure
 
0																												'
:36703498 What's up?
 
lemme try reconfiguring just for fun
 
@Downgoat no idea. Try installing rvm and using that
@Downgoat YES YES DO THIS OMG
 
@DownWat rvm will only install for me
 
cant believe I forgot
 
3:59 AM
@DownWat do i do the makeing in the ext/ folders before or after the configure
 
@Downgoat after, but you might not need to
 
PSA: Mods can see who cast close votes, both pending and retracted. If you think your privileges are toys, I'll take them away from you.
11
 

« first day (2267 days earlier)      last day (2559 days later) »