« first day (524 days earlier)      last day (4425 days later) » 

12:52 AM
@rlemon will do ... I am testing layouts options and so far span6 offset3 is looking good.
 
1:18 AM
0
Q: Meta Question Although I Haven't the Reputation- Is it generally a good idea to post proprietary code?

Matthew RetchinI'm sorry, before I asked any questions, I needed to have one answered, so I couldn't participate in meta. I would like to ask a question about my JavaScript Node program, but I'm afraid of whether or not people might look at my code and steal it or something. I know, I shouldn't be so judgment...

 
1:40 AM
i started a bounty, lost 50 points, and didnt get a single view out of it
 
0
Q: Movable Square-Div with Web Sockets, ws module, Node.js, and jQueryUI

Matthew RetchinI'm trying to make a simple little program in Node to use as a code base from with to program my whole web app. However, it isn't exactly working as planned because I'm stuck. I wanted it so that when I move a red div around the screen, the position of the div moves on another page looking on w...

 
 
1 hour later…
2:56 AM
rage ._.
 
y u rage.
 
because I failed to number close
 
feigned pity
 
No its annoying
girl took my number, she got it wrong :\
rageface.
 
git like this: A B C. Want to merge C into A. How? A is first commit...
 
3:04 AM
@StianHøiland eh?
 
dude just checkout branch you want to merge into
then use git merge to merge another branch
 
@john I don't understand
I'm a git newb
totally
 
git checkout master
git merge staging
i would use a master branch and staging branch
master is for production
staging is for like a staging area
kind of like where you can screw up but it not as bad as screwing up in production
 
do you keep branching off the staging area for each feature?
*staging branch
 
until your ready to deploy to master
 
3:08 AM
@StianHøiland you've read this?
 
i would deploy to staging, then test out your changes
and then once satisfied
merge to produciton
 
I don't use Git though... just saying
 
like this:
staging
-feature
-feature
-feature
or like this:
blerch, wrong formatting
 
staging is a branch, it has no subset. if you want to do something else, then you break out another branch
then you merge your branches to staging
run your test
and once satisifed
then deploy to production
 
I'm getting a headache from this. Just wanna hammer at my keyboard and look at the code produced...
I'll keep in mind, @john
 
3:10 AM
> In a nutshell you use git merge to combine another branch context into your current branch. It automatically figures out how to best combine the different snapshots into a new snapshot with the unique work of both.
$20 says he didn't read docs
 
you mean I should "read the docs" to figure this small thing out?
really?
 
have you seen "the docs"?
 
@StianHøiland that's a really stupid question
 
not to be a jackass... but I didn't think to read pages upon pages, guides and tutorials abound, for such a simple operation
 
3:11 AM
@StianHøiland i explained how it works, i dont know what else you want
git checkout a
 
yes, I'm sorry, I was gonna reply to that
seems I don't want to "merge"
I used the wrong word, probably
 
@StianHøiland "not to be a jackass... but I didn't read documentation to figure out how to use what I'm trying to use"
 
I want to merge two commits
of A B C, I want to merge C into A
@andrew I'm sure you understand what I mean.
 
so checkout a and merge b and c into it
 
@john, I do not want to touch B
 
3:13 AM
use git diff to see what changes made
 
and your "ctrl - f" in browser
 
@andrew, yes, indeed. I'm just lost at what to search for
I tried formulating a search query using "A B C git merge commit A into C" and other variations
 
smh... I'm out. good luck @JohnMerlino
 
@andrew thanks anyway
 
im out too its almost 12am
 
3:15 AM
gnite, both
 
@StianHøiland I realize this is a simple question someone might already know, but I'm sure you're a smart enough guy to figure this out... just saying... don't knock the docs lol
 
I'll be searching'...
ah... from rebase -i I can just reorder the commits: ACB and then squash A and C
didn't know I could just reorder like that
 
3:52 AM
Considering JavaScript's double size limits, is it even possible to solve this: projecteuler.net/problem=16?
 
Math.pow(2, 1000)
1.0715086071862673e+301
 
...yeah, I know
but now try summing all the digits of that number
 
Ohh ... right
 
:)
I think i'll ask on the main site
Maybe get some neato answers.
 
Nah, that's surely not possible in the naive way
 
3:58 AM
right
but there might be some really cool way to do it.
 
with math, it's always possible
you'd have to come up with a formula to split it into smaller portions
 
You can compute 2^n very quickly with square-and-multiply. And 2^n is binary 10000000...
 
@andrewjackson yeah that's a good idea
but even when you split it into chunks
how are you going to get the digits of the final number
 
it's possible to make something that outputs strings of the full result, instead of actual numbers.
there's no telling exactly how slow this would be though
it's something I thought about making a while back. =P
 
It's very fast, see square-and-multiply. You have to implement Bignums though
 
4:04 AM
@copy is that what it's called, when it outputs strings instead?
 
@andrewjackson If the language does not have it by default, yes
 
0
Q: Solving Project Euler 16 with Javascript

Thomas ShieldsI'm working on Project Euler, writing solutions in JavaScript. However, it seems Problem 16 cannot be solved with Javascript: 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? Because JavaScript's 64bit precision isn't b...

knock yourself out ;)
 
@ThomasShields I think you're supposed to figure yourself
 
@copy I already have, with Python
 
someone's just gonna respond with the Bignum solution, and give you a link to Bignum resources lol
 
4:07 AM
@ThomasShields I mean in a hackerish, clever, math way, you know ?
 
@copy true dat
@andrewjackson if you'd read my question you'd know that I've already read the precision questions/answers and Bignum references
 
I read it...
but it is the solution
 
not necessarily
 
actually... I sure there's another way...
I'm good at math, but not a mathematician though.
 
4:11 AM
@andrewjackson what level math? (algebra, trig, pre-calc, calc, calc ii, etc.)
 
I was kicked out of every grade of every school since kindergarten... lol
 
I mean what level can you comfortably deal with
not how far did you "officially" get
 
I don't even know how to label them, is my point...
I'm pretty ignorant at naming things
 
fine...
solve: d/dx(x^2)
 
I could figure it out if I stared long enough >.<
 
4:15 AM
it's super-simple Calculus, no offense or anything.
 
like I said...
 
what about sin(0)
 
what part of "I got kick out of school" don't you understand? lol
maybe I'll learn it someday, haven't needed to yet :P
 
I understand that perfectly. What I don't understand is how you said you were "good at math"
I'm not trying to "shame" you or anything - far from it - just trying to figure out what "good at math" meant, and apparently my definition is different from yours, lol
 
many people would hardly consider calc math
there's functions there that you have to learn, no?
 
4:18 AM
heh, try visiting math.se ...derivatives and integrals are like multiplication and division in comparison.
 
this is probably a stupid question, but what's calculus used for again?
 
figuring stuff out that's intuitively impossible to figure out.
Finding the rate of change (slope) of a function
Finding the area under a curve
 
@ThomasShields Here's a neat solution: cplusplus.com/forum/beginner/23305/#CH_zTmde10437a00
It's still bignum-alike, but much simpler
 
I'm already there
 
4:21 AM
:)
@copy reading
 
I would still love to see a real mathematical way though
 
it sounds really interesting... but also utterly useless to me.
 
@copy basically it just manually multiplies, right?
 
Yeah
 
so: 2*45 = 2*5 (oops, that's 10 > 9, carryover = 1*10^(current_place_value+1)) + 2*40 + carryover
 
4:23 AM
maybe I'll learn it someday, if I ever decide to take some statistics for a websites, and try to use them to inaccurately tell the future.
 
learning math is awesome even if you don't plan to do anything with it
 
learning anything is awesome...
what's more awesome is learning something I can use >.<
though... I'm sure calculus has it's practical uses for certain areas of study, it's not for my world, as of right now. just saying...
 
I just love Math. :)
 
that's understandable :)
 
@ThomasShields You go from the lowest digit to the highest, multiply by 2 + 1 (if last digit had an overflow)
 
4:27 AM
It's good to have passions
 
That's essentially it
 
@copy yep; I got it (i think). Bout to try it.
 
4:38 AM
Got it already
 
lol, haven't even started. distracted
 
Is 1366 the right result ?
 
Okay, I'll just post my answer
 
awesome
 
4:46 AM
@ThomasShields who called it? lol
 
@andrewjackson lol yeah
 
0
A: Solving Project Euler 16 with Javascript

copyIt is possible to solve this by a naive approach of storing 2^1000 in an array (of digits). Runs in less than a second. Original idea from here. var number = [1], sum = 0; for(var i = 0; i < 1000; i++) { var overflow = 0, count = number.length + 1 for(var j = 0; j < c...

I'm off. Good night
 
@copy thank ye. G'night.
 
 
2 hours later…
6:55 AM
o/
 
7:40 AM
@Loktar: I found some use for xpmjs: jsfiddle.net/Ralt/njaeD
not a complex example, but you get the point
 
I feel like the chat says "2 hours later…" in a tone like when you would ask someone a question, and they would take a few minutes to answer, then you would go, "wow... an hour later". what's that called? not sarcasm I don't think...
 
8:02 AM
no idea what it's called, but you're right.
 
I this it's just called being a smart ass lol
 
hehe
 
GGG
@FlorianMargaine did you make xpmjs
 
@GGG yep
 
GGG
nice
 
8:05 AM
thanks
needs some improvement
 
@FlorianMargaine this looks really good
 
I also need some jsperf to compare with .toImageData
 
got a github - link for me? :)
 
@FlorianMargaine that's pretty cool
it's a little slow for me though tbh
 
8:07 AM
awesome, thank you
 
GGG
why can't i find the xpm code in the fiddle? =/
 
I was just wondering the same thing
 
@GGG: added as resource
 
@GGG it's included as resource
 
GGG
oh crazy
 
8:08 AM
that's cool, I never noticed that
actually, it's not slow at all... that was just jsfiddle loading
 
yeah the rendering's not really slow, but I still need to compare with basic image handling in canvas
to see if it's really worth it
 
GGG
i'm suprised you didn't make it more js-like
 
just had an idea
!!cowsay e=.. say something
 
 ______________
< say something >
 --------------
    \   ^__^
     \  (..)\_______
        (__)\       )\/\
            ||----w |
            ||     ||
 
@GGG: what do you mean by "more js-like"?
 
8:11 AM
idk if this is gonna work out or not... lol
 
actually I just wanted to make a js function to handle some pseudo XPM format
 
GGG
@FlorianMargaine i was thinking about having the colors in a struct or something... but i forgot you should be able to cut and paste them in
 
that you can "save as" under GIMP or something
 
GGG
not struct, object literal.. yeah
gimp does a good job of saving xpm
 
yeah
I got the code's picture from a png
just copy pasted the xpm's text
(by removing some stuff)
but it needs some improvement to handle "adding to canvas" btw
right now it's creating a canvas for each image
that was just to see if I could do that :)
 
GGG
8:14 AM
this is just regular xpm format right
nothing special about it
not adapted for js at all
 
there is not the beginning
 
GGG
ah right
 
static char...
 
GGG
static char * ..
yeah
 
so I took off the ending } too
 
GGG
8:16 AM
yeah makes sense... hmm i wonder if they will be any use
it's not much code at all
 
I wanna see something like this work too
http://jsfiddle.net/andrewjackson/njaeD/2/
lol
 
that's something else tho
 
it works for any size of image btw :p
I tried with Zirak's avatar too, working great
 
"27 22 5 1" how to fill that out?
 
GGG
8:17 AM
just save something as an xpm
and then cut n paste
 
GGG
like photoshop can probably do it i guess
 
no =[
 
you can also see what it means here ^
the french article on wikipedia is way simpler than the english's one
to understand how it's structured
but well...
 
GGG
8:19 AM
it's basically like a gif
indexed, no alpha channel
 
you can use rgba though...
 
GGG
yeah sort of
you don't have 256 color limit
 
http://jsfiddle.net/andrewjackson/njaeD/3/
I fail
 
GGG
but it's still indexed
 
@andrewjackson: it's not 16x5 pixels, clearly
 
8:22 AM
well, I counted the chars and the lines just to test it
 
oh yeah
you're right, my bad
 
oh I know what it is
the backslashes
 
yup
console's useful
dunno why it doesn't work though
hmm
 
I still fail lol
 
btw
the best way is still to use something like gimp or xnview to save as xpm
I had rlemon's picture too...
 
8:24 AM
ya, I'm lookin for a ps plugin
but I'll get xnview if I can't find one
I'm really surprised irfanview doesn't do it
nm, I think there's an Irfanview plugin for it
you guys know what Irfanview, is right?
 
*RAAAAGGGGEEEE*
i hate you gentics, i hate you
 
GGG
@FlorianMargaine does it not work with multi-byte images?
 
I'm not sure, I confuse it with xnview I think
@GGG: what do you mean?
 
normally it does :/
 
nm, Irfanview only reads XPM files -_-
 
You can save XPM with GIMP.
 
that almost killed my browser =/
 
GGG
8:34 AM
@FlorianMargaine that just hangs my browser =/
 
@andrewjackson: yeah, jsfiddle's got problems with it
@GGG: arf...
 
GGG
lol
 
Works fine for me.
 
it was almost instant for me, I guess the cache plays a role there :s
 
GGG
huh weird
 
8:35 AM
there is just a lot of datas to get
jsfiddle doesn't like that
 
GGG
def hangs
 
XnView must be Irfanview's successor
 
@FlorianMargaine great. These values, what do they define? -> "128 128 9503 3",
 
I bet it's made by the same person
 
resolution, i guess, and?
 
GGG
8:35 AM
are the spaces throwing it off?
 
Irfanview is old scool
 
@GNi33: width, height, number of colors, number of characters per color
 
oh, ok
 
then you define for every color the characters used and the hex color
and finally you "draw" your image with the characters
 
seems like a really good format for drawing images with JS
I might end up using this
 
8:38 AM
I see. but it's the "max" number of characters, right? I can define colors with less characters too?
 
GGG
no
 
@GNi33: no, but you can use "x "
 
GGG
then your image would be a weird shape
 
GGG
@FlorianMargaine why doesn't it work for my image =/
 
8:39 AM
xpm allows you to have images for icons that are readable by human
 
GGG
 
@GGG: dunno, looking :/
 
GGG
that's the png
 
But you set the num of characters to 3, still you've got a lot of stuff like _6 or db?
 
I haven't handled "None" yet too
 
GGG
8:40 AM
hmm
 
but it's not helping much :/
 
GGG
you could just allow any color
like rgba(...)
 
@GNi33: with spaces after
yeah it needs some improvement
 
@FlorianMargaine okay, that clears it up ;)
 
that was just some proof of concept...
I think I'm going to spend some time on it tho :p
 
8:41 AM
and there are generators for xpm - images?
 
the gimp
open as png -> save as xpm
 
nice, i'll have some fun with this on the weekend :)
 
GGG
imagemagick can do it too
 
@GGG: it's really weird, I don't see what's wrong with your image :/
 
GGG
if you have imagemagick installed just convert foo.gif foo.xpm
@FlorianMargaine let me try imagemagick
 
8:44 AM
the image I used up there was done with gimp, it shouldn't be the problem
(it's the avatar of rlemon, btw)
 
I can't get anything I try to work =[
 
GGG
@FlorianMargaine it worked with imagemagick
but it put it in single bytes
 
GGG
and i had to change 'none'
 
what's multi or single bytes?
 
GGG
8:46 AM
single bytes is like c = green
double is cc = green
 
mulitbyte, as in more than one char for a color
 
GGG
yeah
i mean char not byte
 
hm
2 or 3 chars work however :/
 
GGG
also i think you may be missing the bttom row?
 
that's why it won't work for me
 
8:47 AM
jsfiddle.net/b5nkp/11 this is three chars
@GGG: maybe, I had a bug about this...
see the height - 1 ?
without it it's throwing some error
haven't had much time to work on it
I created it two days ago :p
 
GGG
heh well it looks good so far
i finally got rlemon to load
 
see? multibytes work fine :/
 
GGG
yeah... weird
 
8:52 AM
You know what's awesome? You can't save those images.
I think.
 
you messed up "number of characters per color"
 
nm, idk what's wrong with mine
changed to 1, and still nothing
oh...
I had them backwards
 
GGG
@FlorianMargaine see what i mean about missing the bottom row
 
brb
@GGG yeah I showed you the line where and why it does that :p
 
http://jsfiddle.net/andrewjackson/njaeD/7/
bottom line is not rendered... change height to 6, and it is
 
GGG
8:54 AM
oh =p
 
so the height is off by one
@GGG didn't you mention that?
 
GGG
i think i mentioned it
@FlorianMargaine did i mention the height is off by one
 
oh you actually just mentioned that lol
my bad
 
GGG
 

« first day (524 days earlier)      last day (4425 days later) »