« first day (896 days earlier)      last day (4052 days later) » 

8:00 PM
@dystroy sure is, lol
 
If A = B and B = C, then A = C, except where void or prohibited by law. ~ Roy Santoro
 
If
 
A = B
 
and
 
B = C
 
8:09 PM
,
 
then
 
A = C
 
(or D, sometimes)
 
@Darkyen show me your pong!
 
DAMNIT
 
8:11 PM
haha
 
If => in VB
if => in JavaScript
 
Why does EventSource randomly cancel the request in Google Chrome after a couple of hours, yet the response is still being received according to Fiddler?
 
i don't know :)
 
But the onclose and onerror events don't even fire. The request is just cancelled...
 
Software gets slower faster than hardware gets faster. — Wirth’s law
 
8:22 PM
Well how would I go about finding the answer to my problem?
 
There's this awesome site called StackOverflow...
 
File a webkit bug report
 
Yes but I haven't pinpointed the problem down enough to file a report / ask a question
 
Well, if you can't ask the question, how can you get an answer?
 
Exactly. So how can I pinpoint the problem to the point of being able to ask a question?
 
8:25 PM
form a hypothesis, build a test case
 
Create a reduced test case. With the minimal amount of boilerplate, get to the point where one can see the quirky behaviour.
 
is it possible to do str.replace() but start at like 14 chars into textarea?
 
The hypothesis "the bug appears in this piece of code" is not really askworthy but it helps reduce the test case.
 
@Connor str.slice(14).replace
 
thanks :D
 
8:27 PM
0
Q: A seed for a basic utility library

Hiro ProtagonistHere is what I call a 'seed' library for utilities. Kind of useless as it is small and only has about 5 functions in it. I'm looking for a review on the form and structure of it as I plan to build it out to about 25-50 functions. I'm not interested in increasing the functionality right now but...

 
@Zirak what about lookbe... nvm.
 
If a rabbit's foot was actually lucky, wouldn't it still be attached to the rabbit's leg?
 
when you write code in C you realize how pretty javascript makes life
 
@Darkyen i cannot fully support that sentence. well.. its true. alot is easyer in javascript but depending on what you do, c can be more powerfull to achieve certain tasks.
 
8:36 PM
@Jan-StefanJanetzky for example when u just need to manage sound playing [ on very low level using the cpu speaker ... you have to write a class with just one object ]
 
@Jan-StefanJanetzky in the sense that a pair of scissors is more powerful than a circular saw?
 
whereas js ... <well u wont ever do it> but u can just make a straightway object :-( on the fly
 
@Darkyen wait what? since when does c support classes?
 
i mean c++ **
in C its a structure and bunch of functions :-(
 
thats a huuuge difference
 
8:37 PM
even worse :D
yeah sorry .. kinda pissed
 
And... this discussion is not constructive any more. Both languages do different things differently. JS is MUCH higher level than C which has benefits and problems.
 
C is an ASM preprocessor
 
@BenjaminGruenbaum yeap
 
Okay well here is my minimal test case: var source = new EventSource('http://mysitegoeshere.com/events');
And after a couple of hours it is likely that the Chrome Network panel will show the request has been cancelled
 
oh yeah, did you check whether it was any site or just yours?
 
8:39 PM
...
 
one of the highest benefits of c is that you simply can inject stuff into other processes
 
Good point.
 
@JanDvorak A bad lie, but I'm not in a mood to argue. Google has plenty of arguments about it.
 
and that you have low level access to fuckin everything
 
C doesn't contain a compiler of itself. JS does.
 
8:40 PM
in js however you need to wrap everything in c or c++ in case you want to go out of the sandbox
in c there is no sandbox
 
I'm sure Netscape 3 had an advanced js JIT compiler
 
@Jan-StefanJanetzky you are drunk
 
in c you are given a machine gun right away, with the instructions "please don't shoot yourself in the foot"
 
@JanDvorak nah
C is a howitzer
get your metaphors right
 
This discussion is not only false but completely shallow and devoid of actual arguments. C and JS are very different languages used for different stuff. One is managed, one is not. One is strongly typed, the other is not... this list can go on forever.
3
 
8:42 PM
@Darkyen i r not. well.. maybe drunk of lowlevel access
 
because if you call C a machine gun ........ you pretty much make js sound like a water pistol
 
In JS, you are given an address of the gun shop... that may not be there
 
@Jan-StefanJanetzky so you are drunk at LOW LEVEL ? lol
 
Bananas are sometimes yellow.
 
8:43 PM
@BenjaminGruenbaum not to mention ..... one is like 45 years more mature then others
@Zirak and ziraks is always yellow
 
!!switch partitions and do bot stuff or continue tweaking or do something else?
 
@Zirak continue tweaking
 
m'kay, I don't have a lot left.
 
@Darkyen all i said was targeted at the refered sentence.
 
i want to .replace but start the search at 10 chars someone said about slice but then that deletes whats before and i need it, any better suggestions?
 
8:47 PM
Look at what slice does, you'll figure it out.
 
Also, if you're using a global regexp for the replace, look at the lastIndex regexp attribute.
 
^
Zirak++
 
@Darkyen JS being less powerful in the regard you are talking about makes it better , it's the PILP. w3.org/2001/tag/doc/leastPower.html
 
@BenjaminGruenbaum i know -_-
let me make this striaght
 
8:48 PM
PILP? Plumbing the Inner Levitation Portal?
Powering Indoors Leviathan Pool?
 
what i think of c
 
Playing Into Lotktar's Ploy?
 
Principle of Internal Least Power?
 
Yeah right...weirdo.
 
@Darkyen image not found
 
8:50 PM
:-(
 
Playboy Immigration for Legal Pies?
 
@Zirak im looking, all i see is that it slices a string i dont see any way to get back what what sliced out
 
slice the other half?
 
@Connor How about str.slice(0, 14) + str.slice(14).replace(...) ?
 
Okay

C == 125 MM Howitzer Cannon // tough powerful and hard to learn but can do literally anything what u want ... just use with caution and dont blow ur cpu off

JS == 5.56 M4 Carbine ... // can do a lot .. easy to use but .... fairly new :P and way too less powerful
 
8:52 PM
@Darkyen if i think about nodejs i'd say js IS powerfull nowdays
 
Comparing programming languages to guns is stupid.
 
compared to C ?
 
js was always a powerful language
 
@phenomnomnominal it is .. but js vs c is stupid enough anyways
 
@Zirak that works perfect :D
 
8:52 PM
Libraries are not part of a language's power
 
true
 
But when people discuss a language they are often talking about its libraries.
 
People are often wrong
 
@Jan-StefanJanetzky i hope you realize the core of node.js libuv and v8 are both written on C & C++ ?
 
8:53 PM
People are stupid
 
s/stupid/always_stupid
brb
needa restart my modem
 
If everyone uses a word incorrectly then for all practical purposes let's use it how they use it.
 
@Darkyen I hope you realise the core of GCC is written in assembler?
 
@Darkyen i know that.
 
Why would we follow people's wrong leads? That doesn't make sense. If people use a word incorrectly, we should take note and use the correct vocabulary.
You can say that js' ecosystem is limited compared to X Y Z, but there's the language, and then there's everything else.
 
8:56 PM
still i'd say it depends on what you want to do. sometimes c is fitting better and sometimes javascript
 
For example, let's say someone is talking to you about cracking but they use the term hacking.
Should you, in your replies, use the word cracking? They might not know what it is.
Why not just use the word they use, even though it's not exactly correct and refers to a crude solution, not exploiting.
 
Then I'll explain the difference
@Jan-StefanJanetzky Obviously
@MatthewDean Because being correct and using the correct words to describe things is important
 
i wish i could use javascript on my clock
 
But what if you spend half your time explaining the terms you use then...
 
it would make things easyer
 
8:58 PM
If I spent half my time explaining terms, then the person I'm talking to didn't know a lot in the first place
 
@MatthewDean thats called a backlog (often used in project management)
 
@Jan-StefanJanetzky buy apple smart clock
 
!!/define backlog
 
or samsung ripoff of it ;-D
 
@JanDvorak backlog: An accumulation, especially of unfinished work or unfilled orders. (source)
 
8:59 PM
I know what a backlog is, but how is that relevant?
 
Javascript is so limited it can run on Apple machines.
 
@JanDvorak hahahahha
 
this clock has 244 kb internal memory
and 50 mhz
so. i wish i could use js on it but the memory is too small
(the firmware you see in that vid currently takes around 30 kb and is written in asm and c)
 
@Jan-StefanJanetzky what is your current device ?
full specs pls
 
9:05 PM
@Darkyen bluetooth 1.1, 128x128x15bit pmoled screen, 4 touch buttons on each side of the screen, 2 hardware buttons, an rgb led on the power button, vibration alert, a creepy small battery, micro usb, ... i could even go into detail and tell you the name each internal component but that would require looking it up within around 300 forum posts.
 
In what way is the small battery creepy?
 
@Darkyen what do you mean? that watch? its a SonyEricsson LiveView (or MN800). my phone is a HTC Desire Z
@Zirak it only lasts a day if the bluetooth has a constant connection
also if the device is not in deepsleep the battery will run out after around two hours
the pmoled screen srsly does not take much energy. most is taken by the arm cortex m3
the custom firmware currently does not take the device into deepsleep (wich is bad), has an analog clock as you have seen, can read the button states, can let the clock vibrate, can control the display and the rgb led and has a usb serial terminal for using custom console commands.
oh and i've created that analog clock using canvas xD
 
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage — to move in the opposite direction. — Albert Einstein
 
@Darkyen show me your pong! (shall i implement pong on my watch?)
wtf. nobody says anything
 
9:34 PM
Is 260 the daily rep limit?
 
200+accepts, IIRC
 
@Jan-StefanJanetzky sorry i am finishing it :-)
 
with proper collision detectio
and it shall work on your watch if you can replace the dos.h out of it
which should be 3 minute task
 
@Darkyen where is the problem?
 
9:39 PM
sound and delay functions
i use dos.h for them :P
since i wrote this on turboc (x
and right now i am making it joy for u to play :D
you will need dosbox if you wanna play it :-(
but it serves as a good template for pong game :D
 
:D
hm
to be serious.. i need to get a usb floppy drive
i have an old laptop somewhere within my home office.
it has a display with 640x480 as resolution and 2 bit monospace
it could run your pong if it really runs in dos :D
 
Lol, hitting the daily rep cap is like saying 'You have 15 rep votes to waste on questions you do not like
 
@Jan-StefanJanetzky dude... dosbox ... an emulator
allows u to emulate dos everywhere :P
 
jquery tag search here we go
 
@Darkyen even on my PSP. i know that.
 
9:46 PM
:D
 
but srsly. i have an environment here that runs DOS natively
thats kickass
 
gimme a while .. // bout an hour :P
 
i have doom on it etc.
 
@Jan-StefanJanetzky i have multi-boot facility with DOS :D
lol
// jk
 
i dun beliefe that
 
9:47 PM
When windows boot -> f8 -> Safe mode with command prompt :P
(XD)
native dos :D :D
 
"native DOS" sounds weird :-)
 
lol
dammit
darkyen!
do me a favourrr
write me a DOS app that can receive files over rs232
or tell me about a tool that can do that.
(wich i could implement in nodejs or c)
 
what is rs232
btw you should check out DOSSockets project for that
 
!!/tell darkyen define rs232
 
@darkyen rs232: In telecommunications, RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (data terminal equipment) and a DCE (data circuit-terminating equipment). (source)
 
9:58 PM
@JanDvorak thank you :-)
@Jan-StefanJanetzky :D guess where i am stuck :D
AI .. :-> and then we are done (x
also i have kept extensibility in mind though nobody will play this
but ... it makes sure u can add powerups and stuff
.. also plays sexy dos era sounds
 
sounds fun fun
 
hop on teamviewer :D we can have fun fun :D
2
as i build it :D
 
i still only have 64 kbit /s D:
thats 8 kbyte /s
meaning
 
you and your 64kbps
why the heck are you stuck that low ?
 
i need hours to download 100 mb
because i overused my mobile bandwidth
and yet have no intarwebz at home
in 7 days i'll get internet at home
and somewhere within the next 24 hours my 5 gb mobile traffic will renew
so i can download at 7.2 mbit again
 
10:04 PM
@Jan-StefanJanetzky how the heck did you do the collisions ?
mine are a lil bit harder :[
 
waitz. i show you da lines
 
err my ball is circle
WAITZ I AM IN c++
 
if (y < 15 || y > 285) {
    v = v * -1;
    y = y < 15 ? 15-y+15 : 285-y+285;
}
@Darkyen ^
 
i can use the eqution of circle itself
nah wont work for circle with bat
 
Anyone in hear willing to help out with an issue I'm having?
 
10:07 PM
@Jan-StefanJanetzky 15-y+15 ?
 
@bryanlewis ask
@Zirak yeah wtf ?
 
@Darkyen Cool
 
15 - 13 + 15 = 17
 
@Jan-StefanJanetzky ah yes you bastard
 
I'm having some issues with this code. pastie.org/7187741 -> I'm not the best so bare with me.
 
10:08 PM
you are obstrucifying our eyes :D
 
if you look at this link bvh.delineamultimedia.com/?page_id=2 the first 2 images have drop downs when you click them. they both also have galleries but the 2nd image isn't showing the gallery.
 
@Darkyen cant be. (i srsly used one char variable names in developemend)
 
I need to change that code from the id to be more dynamic and I'm unsure how to do that
 
y is the y of the ball
v is the velocity of the y axis
 
i got that
 
10:12 PM
I hope that all makes sense. Any help would be amazing.
 
@Darkyen now get it to hit the panel :D
and loose if it does not :D
 
@Jan-StefanJanetzky dude collisions is the hardest part for me :-(
sadly this is fucking aabb collision
 
setInterval (function () {
  // y position of the ball changed by velocity * 5
  y += v *5;
  // bot position (w() is the AI)
  z[1] = w(y);
  // x of ball, vd = left or right movement of the ball
  x += vd ? 2 : -2;
  // detect if the ball hit the walls as i described earlyer
  if (y < 15 || y > 285) {
    v = v * -1;
    y = y < 15 ? 15-y+15 : 285-y+285;
  }
  // detect if the ball has made a point to one of the players and resets its position
  if (x < 0 || x > 400) r();
  // detect if the ball has not been lost yet and do the panel collision test
@Darkyen thats how my pong works
 
is the bot still unbeatable?
 
10:22 PM
@Jan-StefanJanetzky why are your variable names so awful?
 
because my primary goal was to keep it below 1k
wich i failed
but i guess with some (truly possible) optimisation this could be smaller
 
@Jan-StefanJanetzky lol
 
@Jan-StefanJanetzky getting rid of all the vars and simply using commas
 
(x
 
no dice? dang.
 
10:24 PM
there goes your 3 chars
 
@Nile i know. have yet not finished the coding
i want to add a classic view of the score
and want to center the game within the window
and maybe want to add mobile support
all the AI is in w
 
It's ridiculous that a 7 inch single that costs US$4 should cost US$20 to ship to New Zealand.
 
g() is Math.random(), a[] is an array containing the last 15 positions of the ball
dunno.. if i would remove all the whitespace, remove most ; and would change some more things.. maybe i could get it below 1k
dunno
 
(downtime of ~5 minutes, 10 tops)
(back online. hopefully.)
 
10:39 PM
chokai. so.. now i go to bed. cya in approx 10 - 15 hours
 
1
Q: Add buffering bar in audio player

Tomi Sebastián JuárezI'm working with HTML5, making an audio player. I wonder to know how I can add a buffer bar so that the user can see how long the song is loaded. I've tried using several properties that I saw in some tutorials, but none have worked, and I can not find anything about this specific topic. This ...

 
@TomiSebastiánJuárez Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
gurr
'other then heavily wrong naming
does anything look wrong in that ?
 
y is a float, y2 is an int
 
@rlemon @phenomnomnominal OMG! projecthawkthorne.com
@Zirak you too! ^
 
10:51 PM
DUDE
 
@Zirak nothing else right :-(
it just doesnt work (XD)
 
@OctavianDamiean ....WOW
 
Oh come on!
 
@Darkyen Not that I can see
 
@Darkyen: is that supposed to be ANSI C?
 
10:52 PM
As if you didn't want to play that game!
 
if yes, the compiler shouldn't allow variable declarations that are not at the beginning of a block
 
@ThiefMaster hmm
 
@OctavianDamiean Tried installing yet?
 
it compiles... btw
and yes its supposed to be ANSI C
dude .. its turbo c 3.1
 
@Zirak No, a goddamn update got stuck locking apt ... duh
Gotta fix that.
Fixed it by killing dpkg while it was trying to install a new kernel version. I have a feeling that this might bite me at some point (on reboot that is).
 
10:55 PM
Man I want an iOS port of this
I would play the shit out of it
 
Oh brilliant! No fucking love version for Raring.
 
Build from source
 
I know. I'm in the process of doing that right now.
 
c'mon c'mon make, don't let me down
 
10:59 PM
Holy shit the costumes are awesome!
We need to port this to JS and make it multiplayer
 

« first day (896 days earlier)      last day (4052 days later) »