« first day (555 days earlier)      last day (4402 days later) » 

5:03 PM
> lessc: not found
anyone?
I installed nodejs, npm, then i npm install less
same as on my other pc
 
	C:\Users\Petka Antonov>npm install less
	npm http GET registry.npmjs.org/less
	npm http 200 registry.npmjs.org/less
	npm http GET registry.npmjs.org/less/-/less-1.3.0.tgz
	npm http 200 registry.npmjs.org/less/-/less-1.3.0.tgz
 
@Esailija yer code killed moi software lolz
it read the whole file XD and it was reading from right place :-)
 
nothing about lessc
@Abhishek show the code... your code that is fucking it up :P
 
fs.readFile('dah.mp3',function(err,file){
	var len = file.length;
	var id3 = { };
  	id3.ver = {
  		major:file.readUInt8(3),
  		minor:file.readUInt8(4),
  		ext:file.readUInt8(5)
  	};
  	id3.size = tagSize(file.toString('ascii',6,9)); // The id3.size is quite large .. and while parsing hogs up everything
  	var raw_tags = file.slice(10,10+id3.size);
});
 
@Esailija lessc is the command line interface. it should be included in the package (according to the less docs)
i had to sudo npm install less -g
 
5:12 PM
console.log( [].map.call(file.toString('ascii',6,9), function(v){
	return v.charCodeAt(0);
}).join(",") );
 
but now i'm throwing errors in less/parser.js
 
and see what it logs... @Abhishek
 
wait
0,6,98
 
yeah
so the real value could be anything
you are only passing 3 instead of 4
read the docs for toString("ascii")
and see what you need to pass to get the bytes 6, 7, 8 and 9
 
'ascii' - for 7 bit ASCII data only. This encoding method is very fast, and will strip the high bit if set. Note that this encoding converts a null character ('\0' or '\u0000') into 0x20 (character code of a space).
 
5:15 PM
lol
 
btw @Esailija 'ascii' encoding ensures that the highest bit is unset by default
 
yeah and converts nulls to 20s...
 
lol
 
how to make a property for a getter/setter?
 
so if the file is 0,0,2,1
it's actually 20,20,2,1
because of ascii fucking it up
 
5:16 PM
like this is adding the textContent property to Node on IE8, but I don't see how this works behind the scenes github.com/Raynos/DOM-shim/blob/master/src/ie8/interfaces/…
 
decode( String.fromCharCode(20,20,2,1 ) )
42270977
quite different from 0,0,2,1 :P
(the real binary written in the file)
 
something like defineProperty of ES5 but in ES3...
 
@Esailija so what do you suggest doing it pure binary ?
 
didn't we learn yesterday not to use text encoding for binary files @Abhishek ? :)
 
@Esailija yeah we did and now I have just learnt a bad lesson to never touch charachter encoding again when we are messing with binary
 
5:18 PM
cos you want to read the 1's and 0's untouched
 
<Buffer 00 06 62 2f> thats the actual buffer for the file
 
and 0,6,98 is 00 06 62
so you missed the last number
 
yeap
 
so it's toString( 6, 10)
but even then the encoding cannot be ascii or utf8
 
and that means node.js documentation needs to be updated /* or made noob friendly */
 
5:22 PM
btw you don't even need to use it as string
 
ok, it can only be done on DOM elements which implements some kind of defineGetter in IE8, not IE7
 
@Esailija in the whole buffer documentation
its telling me that start = starting point to read the buffer , end = ending point upto where to read the buffer , but its actually end = ending point + 1;
 
File a report
 
"tententen9".substring(6,9)
"ten"
see, only 3 characters
 
docs of Node . js says "

#buffer.toString(encoding, start=0, end=buffer.length)
#Decodes and returns a string from buffer data encoded with encoding beginning at start and ending at end.
}
 
@Abhishek you don't need the toString crap.. you can simply read 4 8byte ints from the buffer directly
 
function decode( buffer ) {

	var int = ( ( buffer[0] & 0x7F ) << 21 ) |
			  ( ( buffer[1] & 0x7F ) << 14 ) |
			  ( ( buffer[2] & 0x7F ) << 7 ) |
			  ( buffer[3]) & 0x7F );


	return int;

}

decode( buf.slice( 6,10 ) );
 
@RyanKinal use the arguments object instead of overloading and act accordingly
 
user1385191
no
 
user1385191
5:31 PM
use an array
 
lol, that was an example of code that was just handed to me by a contractor
 
@Esailija actually its everywhere , the end correction
 
user1385191
arguments is goofy
 
oh :)
@MattMcDonald why?
 
user1385191
array-like object
 
5:32 PM
How can an element be of more than one type?
 
user1385191
wat
 
user1385191
oh the snippet
 
@Abhishek you already have numbers.. so there is no need for toString and charCodeAt.. so use the new decode :P
 
user1385191
and the copious use of == null
 
[].slice.call( arguments, 1 )
 
5:33 PM
@Esailija thanks :-)
 
@Abhishek those are for browsers where we have readAsBinaryString
 
user1385191
why hack around when you can use a user-defined array?
 
a div's nodeName is 'DIV'. The second function probably meant name !== type1 || name !== type2
 
I guess :/
 
Otherwise, GetParentOfTypes(oneThing, anotherThing) will always return null
 
5:37 PM
@Esailija
C:\Program Files (x86)\nodejs\shoutrip.js:67
( buffer[3]) & 0x7F );
^

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError: Unexpected token )
at Module._compile (module.js:427:25)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
 
lols
 
@Zirak No, it's logically correct. If the element is of neither of those types, then it continues the loop
 
@Abhishek function decode( buffer ) {

	var int = ( ( buffer[0] & 0x7F ) << 21 ) |
			  ( ( buffer[1] & 0x7F ) << 14 ) |
			  ( ( buffer[2] & 0x7F ) << 7 ) |
			  ( buffer[3] & 0x7F );


	return int;

}
 
i fixed that dw (XD)
was just loling at that small insanity (XD)
brb doing benchmarks on which method is faster
the for loop * with check * or this decode
 
rename this function to decodeWeird28BitNumberThatIsKindaSpreadOutOnAll4Bytes
 
5:41 PM
drupal's getting better and better /o/
 
user1385191
I still don't understand the point of AMD beyond Node
 
user1385191
async loading client-side is stupidity
 
@Esailija lolz
your code beats my code by 0.00009 times :-D :-D
 
@FlorianMargaine thats one scary looking link
 
var fs = require('fs');

function decode_pro( buffer ) {
/* Le Esailija's code */
	var int = ( ( buffer[0] & 0x7F ) << 21 ) |
			  ( ( buffer[1] & 0x7F ) << 14 ) |
			  ( ( buffer[2] & 0x7F ) << 7 ) |
			  ( buffer[3] & 0x7F );


	return int;
}

function decode_noob(buffer){
/* Le my code */
	var num;
	for(var i = 0 ; i < 4 ; i ++){
		var int = buffer.readUInt8(i);
	    num = num * 128 + (int<127)?int:0;
	}
	return num;
}
fs.readFile('dah.mp3',function(err,file){
	var len = file.length;
	var id3 = { };
 
5:48 PM
@tereško scary looking? Like, not SEO?
 
@Esailija by the way unless untill an mp3 is curropt that topmost bit cannot be set.
 
@Abhishek int<127?int:0 is pretty wrong
 
i know
 
you still want to read the 7 lowest bits
 
teach me how to do taht without <<
or can u give me a link to which explains << and >> ?
cause i dont think they are what i think they are
 
5:50 PM
num = num * 128 + (int & 0x7f)
 
@FlorianMargaine , no .. as in contains "drupal" in the name
 
haha, haters gonna hate :p
 
@MattMcDonald it's completely the other way around
 
@Esailija thanks again :-)
 
sync loading in browser is beyond retarded
it's the reason AMD was invented in the first place... cos sync loading doesn't work that well in browser
 
5:55 PM
must i say more ...
if you read that file long enough , your brain might start leaking out of your ears
 
not after reading this https://gist.github.com/2472492 @tereško
 
@RyanKinal How can it be of both types?
 
dafuq
 
@Zirak ... it's not. And it never is
It's not name == type1 && name == type2
 
Small problem there
 
5:59 PM
It's name != type1 && name != type2
;-)
Do you see the difference?
 
Do you see that there is an entire function copypasted for this
:D
 
well .. if type1 === 0 and type2 === "null" it might work
 
@tereško this was the only way to keep conf options across the codebase since there was no OOP in PHP4
Drupal 8 is radically changing this tho
 
@FlorianMargaine @Abhishek what do you think of this ui (colour scheme mostly) pi3.rlemon.com
 
giving up support on PHP4, completely embracing the object
@rlemon I'd say that looks like some solarized bootstrap :D
 
6:03 PM
@Esailija ... I think we're in different conversations here
 
@FlorianMargaine well yea but do you like it? does it look good solarized?
 
anything not using default bootstrap is good
 
i'm going to (this week hopefully) write a series of 'alternative' colour schemes for bootstrap then github the less files.
 
dunno, the colorscheme looks kind of insipid to me :/
 
6:05 PM
thats from 8.x , @FlorianMargaine
 
@rlemon looks like an orange flavoured biscuit i used to lurve when younge
 
@tereško yup, they're currently working on it
 
btw can u make that paste some code a bit red ?
actually red ??
 
they've started to include some symfony2 classes
btw it's a huge work in progress :)
but yeah, getting rid of these global is where drupal's going
 
@FlorianMargaine , i will believe it when i see it
also , just because you include classes from some other project , does nto make your own code better
and i hope you are aware that global keyword is not the only source of global state in php applications
 
6:08 PM
@Abhishek pi3.rlemon.com like this?
 
@rlemon yes .. a bit more red ;3 at top
it should be in equal catchyness as the image one
 
what does 3 mean in pi3
 
The header is useless, and so is the subtitle; it lies.
 
@tereško actually they included a major patch a few days ago for d8 (config management), so patches are currently being written to make use of it instead of the globals
 
@Zirak content is mostly bs'd to fill the space atm.
the 3 is because it is the third version of pi.rlemon.com/ i'm writing.
 
6:11 PM
@FlorianMargaine , link to source ?
 
and because it makes it look like pie :P and i love pie
 
user1385191
<a [...] href="#" [...] needs to die
 
let me find it...
 
@MattMcDonald , as do many other stupid things you can find on w3schools
 
i see href="#" and all I think is "wow, someone forgot to put a link here" (uses '#' when prototyping... assumes all others do as well... knows this isn't true... sad panda)
 
6:14 PM
well , it is better then href="javascript:void()"
> please , keep the order while embarking on the rage train
 
Are the IE 8 developer tools made for trolling the shit out of a developer ?
 
> The Symfony2 HttpFoundation component replaces these default PHP global variables and functions by an Object-Oriented layer.
so it's done little by little
 
@Abhishek did you try clicking "refresh?"
 
@user973810 too scared to
 
user1385191
<a href="./" onclick="return false;">
 
6:20 PM
@tereÅ¡ko also, see here all the issues to remove this kind of global drupal.org/project/issues/search/…
 
@FlorianMargaine that link only contains words .. not source code included
 
you can also follow this group to see what's going on around config management groups.drupal.org/build-systems-change-management/cmi
cya guys
 
7:16 PM
@OctavianDamiean pi3.rlemon.com
 
php
why we talk about it :p
 
because it's uber awesome possum
way better than nodejs
 
@Esailija you still around ?
 
at least php has a consistent API going for it
 
7:22 PM
yea
 
@adscriven "consistent API" :D
 
<-- in the running for the 2012 Sarcasm Awards
 
@Esailija i encountered another problem now with frames
i can read most of the frames
 
sure
 
but...
at a point it just breaks :|
does that wicketWierdFunctionThatReadsIntegersSpreadInFourByte thing applies there too ?
 
7:27 PM
no
it only reads the size and thats' for version 2.3
 
I am using an mp3 whose encoded with v 2.3.0
it fails to calculate the filesize of WCOM tag
 
after reading the size integer, you should read that many bytes after the header to read the frame data
 
function getFrames( buffer ){
	var pos = 0;
	var frames = [];
	var max = buffer.length;
	while(pos <= max){
		var frame = {};
		var frameHeader = buffer.slice(pos,pos+10);
		frame.tag = frameHeader.toString('ascii',0,4);
		frame.size = id3Size(frameHeader.slice(4,8));
		frames.push(frame);
		if(  TAGS[frame.tag] === undefined ){
			console.dir(frames);
			console.log(buffer.toString('ascii',pos-100,pos+300));
		}
		pos += (10 + frame.size);
	}
	return frames;
}
 
console.log the frame.tag
then see if all the loggings are valid 4 character tag names
 
[ { fh: 4, tag: 'TPE2', size: 7 },
{ fh: 4, tag: 'TIT2', size: 42 },
{ fh: 4, tag: 'TRCK', size: 3 },
{ fh: 4, tag: 'TALB', size: 8 },
{ fh: 4, tag: 'TYER', size: 5 },
{ fh: 4, tag: 'TCON', size: 8 },
{ fh: 4, tag: 'TPUB', size: 29 },
{ fh: 4, tag: 'TENC', size: 26 },
{ fh: 4, tag: 'WCOM', size: 66 },
{ fh: 4, tag: 'nId%', size: 108075090 } ]
the sie for WCOM should be 198
 
7:32 PM
can you give me hex dump for the WCOM header
 
Wait
 
it should be 57 43 4f 4d xx xx xx xx xx xx
 
57434f4d000000c2000068
 
so the size is 00 00 00 c2
 
yeap
 
7:35 PM
that's an invalid size
c2 is 1100 0010
the highest bit is set
 
And that makes me think
 
Snow?! What is this crap?
 
that this size dosnt follows the old , convention
(which is very insane)
 
yeah, only 2.3 uses this type
 
var crap = new Snow();
 
7:38 PM
I mean >2.3
what number is after ID3
49 44 33 xx ?
 
@Esailija shit is .. most music out there is ID 3 v2.3
So far i have tested about 8 different albums all samples have "v2.3"
 
It depends what is xx
 
{ ver: { major: 3, minor: 0, ext: 0 }, size: 110895 }
 
yeah I mean
 
made it simpler for you lol
2.3.0
 
7:41 PM
you only use the special 28bit function if xx is > 3
 
major:file.readUInt8(3) // thats how it gets major
 
yes
if that number is > 3 you use the decode function I gave you
otherwise you just read normal 32 bit int
buf.readUInt32BE(4)
 
@Esailija for what ? the frame header right ?
 
yes u read the size part as normal Uin32BE
if the version is 2.3
it starts at offset 4 of course
 
Okay
 
7:44 PM
(if 0 is beginning of the header)
adjust accordingly
 
so version 2.3 is using 28weirdness for whole tag size but simple 32 bit integer for framesize , right ?
 
no version 2.3 is using 32 for everything
28 is for > 2.3
 
@Esailija that doesnt makes sense
 
and < 2.3 has 24 bit
 
" The ID3v2 tag size is encoded with four bytes where the most significant bit (bit 7) is set to zero in every byte, making a total of 28 bits. The zeroed bits are ignored, so a 257 bytes long tag is represented as $00 00 02 01.
"
those lines are from 2.3.0 documentation :S
 
7:47 PM
my app successfully parsed every file in my music collection :P
o wait
wtf
 
?
 
yes the 28bit is used for the first size of the whole id3 thing
of course
 
lolz
 
but after that
 
and the frameheaders are 32 right ?
 
7:48 PM
yes
 
got it :-)
 
I read my source wrong
I won't paste it cos its ugly as fuck
I wrote it when I was learning javascript
 
[ { fh: 4, tag: 'TPE2', size: 7 },
{ fh: 4, tag: 'TIT2', size: 42 },
{ fh: 4, tag: 'TRCK', size: 3 },
{ fh: 4, tag: 'TALB', size: 8 },
{ fh: 4, tag: 'TYER', size: 5 },
{ fh: 4, tag: 'TCON', size: 8 },
{ fh: 4, tag: 'TPUB', size: 29 },
{ fh: 4, tag: 'TENC', size: 26 },
{ fh: 4, tag: 'WCOM', size: 194 },
{ fh: 4, tag: 'COMM', size: 5 },
{ fh: 4, tag: 'APIC', size: 108312 },
{ fh: 4, tag: 'PRIV', size: 41 },
{ fh: 4, tag: 'PRIV', size: 39 },
{ fh: 4, tag: 'PRIV', size: 20 },
{ fh: 4, tag: 'PRIV', size: 31 },
woo ! it went through !
 
lol
 
@Esailija wait ... you were into this mp3 parsing ? too LOlz how'd u fell in here ?
 
7:50 PM
yeah I made javascript music player in 2010 that plays mp3 files from your desktop
the code is uglier than sin
:D
 
If you're going to head hunt me for a QA position you'd better be sure you pay a butt load more than what i'm making now.
seriously... who wants to be a QA
 
apparently you for enough money
 
been there, done that, got the ACT certification. fuck QA
 
One day, when employers take the role seriously ...
 
yea no shit eh
 
7:53 PM
@Esailija cool :-)
 
that is my biggest issue.... QA is probably (in a larger organization) one of the more important roles. however you often see like 6 devs to 1 QA and he's got no pull when it comes to anything.
 
@Esailija did it decoded mp3 using javascript too ?
 
at least that was my experience.
 
@Abhishek no javascript can't decode mp3 in real time
 
@rlemon: was just gonna say that: big companies take qa very seriously
 
7:53 PM
@adscriven depends on the company
 
jsmad.org ? really ?
 
RIM, OpenText, Desire2Learn... not so much.
 
profitable companies tend to have good qa. ymmv
 
RIM hires a but load of physical QA's and then a small team of SQA and they're so removed from everything it's insane they can even function.
 
codecs.ofmlabs.org @Esailija woot mp3 playing in firefox! without flash!
 
7:54 PM
@Abhishek yes some js decoder appeared a while ago and it couldn't play it in real time for me
 
k :-)
 
Who are RIM?
:-)
 
@Abhishek but I made the app in 2010
 
I guess i will have to do dirty C bindings with libLame for the last part of my app
 
Research in Motion (makers of the blackberry, recently acquired QNX)
 
7:55 PM
|| it has to encode mixxed mp3 buffer :-| , // is this project an overkill for me ?
 
@Abhishek chrome didn't even have a way to play self made audio samples back then
 
@Esailija lol
 
Seriously, if I'm not shortlisted for the SA prize 2012 now, then I don't know what ...
 
SA?
 
@Abhishek if you have libraries for encoding why not
 
7:56 PM
Sarcasm Awards
 
well you never know
some people might not know of RIM
some people think jQuery is a programming language... i mean... I can't assume anything now-a-days
 
Most non-techie people haven't
 
@adscriven yea... and these people still think jQuery is a language. :P
so I can't trust anything.
 
Heh, /those/ non-techies! :-)
 
@Abhishek but you should now read the possible Xing and vBRI meta data as well :P
 
7:58 PM
omg guys I love jquery so much, I wish i could speak it instead of english!!
^ I did that in the snow because jQuery gets me so excited!
 
lol
 
@Loktar someone needs to photoshop that so the letters are slightly yellow
 
haha
 

« first day (555 days earlier)      last day (4402 days later) »