« first day (1189 days earlier)      last day (3763 days later) » 

2:00 PM
@rlemon I want to translate sentences in different ways.... conjugate verbs would be too easy
 
too easy?
dude, you don't know much about exceptions.
 
9 years of school and all I can do with french is conjugate verbs....
 
@FlorianMargaine there are many exceptions... I know... maybe I can't cover all of the singular-verbs exceptions... but it is doneable
 
what have they wasted my time on :(
 
*doable
 
2:01 PM
@rlemon 8 years and I can talk well french in france
 
cool.
 
@rlemon again... not a competition... just saying
 
I learned Canadian French. I imagine most people in France would think I sounded like a idiot
 
@rlemon maybe XD: never heard canadian french before...
but I know the accents are quite different
 
!!wiki franglais
 
^ generally what it ends up being when english people here are speaking french.
 
@rlemon Logically, that must be french
 
@rlemon lol
 
Whereas Frenglish would be English
 
lol
 
2:04 PM
It should be franglish
 
@KendallFrey now... that's confusing..
or frenglais... the most meaningless..
 
yeah
 
since when does caprica auto un onebox? that's cool!
 
since I made a plugin called unonebox ;)
!!info unonebox
 
@rlemon Command unonebox, created by God, invoked 1 times
 
2:06 PM
what does that do?
 
that ellipsis is kinda annoying
 
when enabled, it auto un oneboxes her own messages after 90 seconds
 
@KendallFrey i know.... right?(...)
 
@KendallFrey suggestions on something else?
 
@rlemon cool!
 
2:07 PM
@rlemon A leading space works
 
a simple dot may be better?
 
it did for me in the sandbox
 
trailing spaces do not hit either.
hahaha
the dot forced it to be code
 
the dot? yeah right...
 
2:08 PM
the dot forced the leading spaces to make it code and not a link
better?
 
that is not a onebox
oneboxes have different parse rules
 
@FlorianMargaine sorry... (again...(again(stop!)didn't do it on purpose)didn't do it on purpose... it's just the interval between my thougts...)
 
redacted
oh, wow
wtf
 
2:09 PM
yea
 
how do I teach commands to caprica?
 
!!tell him help learn
 
@him learn: Teaches me a command. /learn cmdName outputPattern [inputRegex [description]]
 
meh pronoun
 
makeSquare :: JQuery -> Fay JQuery
makeSquare = addClass "square" >=>
             setWidth 400 >=>
             setHeight 400
 
2:12 PM
@BartekBanachewicz Java is so great, you should use it more. No conventions, everything is typed
:D
 
cc @BenjaminGruenbaum and others who I talked about jQ with
 
fishies
 
@BenjaminGruenbaum oh hi there
 
I actually can't stay
have an exam
 
2:12 PM
:(
 
Talk to you later
 
!!afk logic exam is the best exam
 
I guess your logic exams aren't much like the ones i had (dead simple)
 
I wish we could use angular with titanium.
 
2:19 PM
@AbhishekHingnikar Why you can't?
 
Hey guys!
I'm having some problems getting a regex pattern to match a string (very obviously containing matches) in javascript in my Chrome browser, though the pattern matches perfectly in a js Regex Tester
 
@AbhishekHingnikar ionicframework.com
 
@Miszy no DOM
 
the pattern:
\b([A-G][#b]?)(?:(?:[mMo+]|[sS]us|[mM]aj(?:or)?|[mM]in(?:or)?|[dD]im|[aA]ug|[dD]om|[#b])?[0-9]?)*(?=(?:\s|$))
 
@AntiEarth JS regexp is not the same as Perl one :)
 
2:19 PM
I like titanium because it actually lets u have native ui
just script with javascript
 
uh found it finally, it was @JanDvorak who I talked about jQuery chains :V (look above for candy)
 
thats why it becomes kickass.. though its fucked up bad
 
@Miszy true. I never assumed it used the Perl javascript
tests on the string "A# Cm7 B" work perfectly (matching all 3) on regexpal.com
 
@AntiEarth I just thought that might be the reason. JS regexp is lacking some things eg. negative lookbeahind, but I don't see you using it...
 
@AntiEarth hidden whitespace?
 
2:20 PM
but fail in Chrome
 
@AntiEarth oho. That looks familiar
 
@Miszy and besides i need a custom camera view
 
@Miszy my original regex (from python) used negative lookbehind, hence my now sloppy \b workaround for #
 
@AntiEarth I see.
 
@BartekBanachewicz c: a musician?
 
2:22 PM
@AntiEarth I do play an instrument.
 
@AntiEarth when you have such complicated regexes, you usually have 4 problems.
 
@AntiEarth I bet most of us play some kind of instruments here.
 
how to format code in chat?
(also, I clicked edit: why did that remove? :S)
 
Ctrl+K
 
@AntiEarth CTRL + K
 
2:23 PM
!!tell anti format
 
thanks
 
@anti Format your code - hit Ctrl+K before sending and see the faq
 
You must have hit delete by accident
 
this consistantly outputs null:

var chord = new RegExp(
	'\b' +              		// word boundary
	'([A-G][#b]?)' +    		// note with optional modifier
	'(?:' +             		// non-captured nest of quality + interval
		'(?:' +         		// non-captured nest of qualities
			'[mMo+]|' + 		// single character qualities
			'[sS]us|' +  		// suspended
			'[mM]aj(?:or)?|' +  // major
			'[mM]in(?:or)?|' +  // minor
			'[dD]im|' +         // diminished
			'[aA]ug|' +         // augmented
			'[dD]om|' +         // dominant
 
2:23 PM
it's destroyed my pretty comment format
 
@BartekBanachewicz Cool <3
 
@AntiEarth don't use tabs
 
@Miszy I used to play the guitar and flute... now I'm using the piano
 
@AntiEarth That's for messing tabs and spaces :/
 
2:24 PM
ya
 
@AntiEarth I think you need to escape \ in strings
 
(to disclaim, this is a 'broader' chord capture (captures invalid chords))
 
@AntiEarth Have you tried splitting this regexp to simpler parts and testing them?
 
hmmm
for stuff like \s?
 
select ("<div>" `T.append` "Thunk" `T.append` "</div>") >>= appendTo body this needs more love though
 
2:25 PM
(is there a raw string modifier thingy)
 
@AntiEarth Yeah, it should be \\s in a string
@AntiEarth not in JS
 
@AntiEarth use a regex literal
 
@Kendell yep, you've solved it
 
/regex/flags
 
Yeah, you're not building it from strings. It could be a literal
 
2:26 PM
hmmm
it didn't capture the 'B' in ''A# Cm7 B', when all '\' were replaced with '\\' (twice)
must be the lookahead to the $
doesn't really make sense
 
Task now : Do the core part free of shit Task before a : do it titanium Task a : do it web
 
@AntiEarth No, that should be fine
 
@KendallFrey hmm, ok. Not sure of the issue now
 
remove the large group in the middle, and see if it still fails
 
2:30 PM
so in "B", B is matched and the remaining regex is

(?=(?:\\s|$))
 
yeah
 
sure, 1 sec
(it passes regexpal.com btw)
 
oh, that's nice to know. odd...
must be a JS quirk
 
@ThiefMaster is chrome as fast as FF with asm.js already?
 
no idea
 
2:33 PM
y = RegExp('\\b[A-G](?=(?:\\s|$))');
y.exec('A B');

>>> ["A"]
 
> As of Chrome 31 and Opera 18, Epic Games has now cleared these browsers for running Epic Citadel in addition to Firefox
well
it would seem it's ok since previous version already
 
@AntiEarth It only finds the first match
 
@KendallFrey yeah. I'm wondering; is there another way to describe a pattern without matching it without using lookaheads?
this (some what blind and hopeful) attempt also fails

y = RegExp('\\b[A-G](?:$|(?=\\s))');
y.exec('A B');

>>> ["A"]
I don't feel comfortable with the way I'm using the lookahead though in that one. It's like I'm using as logical or, rather than a match or
 
lol
> JavaScript per se is insufficient. The depths to which JavaScript fails is well-documented and well-understood
I think I've read that somewhere sometime back in the past Ah right it was on hackage
 
@AntiEarth exec it on just "B"
 
2:37 PM
@KendellFrey yields B
 
exactly
 
how strange
'A B C' yields just 'A'. Do I not understand exec?
 
I forgot about the g flag
 
@AntiEarth exec always returns one match
 
This dock says it returns the first match http://www.w3schools.com/jsref/jsref_obj_regexp.asp

but before, we clearly saw it return an array of size 2
 
2:40 PM
the g flag makes it global i.e. it will mind following matches if you exec the second time
 
'string'.match(/regex/g)
 
@AntiEarth w3schools is a terrible resource. Use MDN
 
That will get everything
 
thanks, I'll try, 1 sec

(also, the js console on this site: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp )
what is the flag equivalent for use in RegExp object?
 
2:42 PM
?
You mean the constructor? pass "g" as the second parameter
 
nm, it's just a string
 
y = RegExp('\\b[A-G](?:$|(?=\\s))', 'g');
y.exec('A B C');

>>> ["A"]
 
@Miszy is there a reason why inputs with type button don't apply to flex?
 
y = RegExp('\\b[A-G](?:$|(?=\\s))', 'g');
y.exec('A B C');
y.exec('A B C');
Try that
 
2:44 PM
@Cicada3301 display property?
 
@KendallFrey wew, finally I'm seeing the same as the SO answers
thanks c:
howweeever
 
@Miszy I have their container to display:flex and all of the buttons with type button to flex:1
 
@Cicada3301 what about the display of the button?
 
hmm
 
@Cicada3301 And why are you using <input type="button"> anyway? Why not <button>?
 
2:45 PM
@Miszy ? do I have to give them a custon display?
 
how does one 'reset' the RegExp? Create another?
 
@Miszy becouse I want to make every button simply trigger a function... without using that overcomplicated form method
 
@Cicada3301 Depends on what you want to achieve. AFAIR all input have display: inline-block;
 
@AntiEarth it resets after exec returns null
 
@Cicada3301 What do you mean by "overcomplicated form method"? If it's a button then it should be <button> in your code.
 
2:47 PM
@Miszy doesn't that get overwritten by flex? anyway... your solution would be to change that to inline? or how?
 
@JAnDvorak How strange. Thanks!
 
@JanDvorak Thanks, I wasn't sure and was about to suggest playing with lastIndex :P
 
@Cicada3301 Why inline? CSS.
 
@Cicada3301 using CSS, google and common sense
 
but really, just use String#match
 
2:48 PM
^
 
@Miszy I find it a lot easier to use type button and onlclick function()
 
one last concern!
Why is this matching twice? (I only have 1 group! Does it return the whole match, then the groups, or have I botched my regex?)
 
@Cicada3301 you can attach onclick anywhere
 
@Cicada3301 Is it different when using <button>? Have you even checked?
 
@Miszy nope.
 
2:48 PM
y = RegExp('\\b([A-G][#b]?)(?:(?:[mMo+]|[sS]us|[mM]aj(?:or)?|[mM]in(?:or)?|[dD]im|[aA]ug|[dD]om|[#b])?[0-9]?)*(?=(?:\\s|$))', 'g');
y.exec('C#');

>>> ["C#", "C#"]
 
@Miszy I... didn't...
 
@AntiEarth exec returns all groups
 
@AntiEarth exec returns the first match only
 
@Cicada3301 BTW you should not attach inline events at all. Never.
 
I only have 1 group
 
2:49 PM
your first group is capturing
it also returns the whole match
 
@AntiEarth That doesn't change the behaviour or exec
 
@Miszy what do you mean?
 
@Cicada3301 Don't mix JS with HTML.
 
ahk, I assumed correctly
 
@Cicada3301 don't use on* html attributes
 
2:49 PM
@Cicada3301 If you want to attach events, use el.addEventListener(..)
 
so it returns [whole_match, group1, group2, group3...]?
that's awful
 
no, it's not
 
@AntiEarth wth? It's usual thing.
 
@Miszy I have a function on my js... does that cause some delayed response or what?
 
If anything is awful, "a,b,c".split(/(,)/g) is
 
2:50 PM
@Cicada3301 what?
 
@Cicada3301 No, just everytime you attach inline event god kills a kitten
 
no? If I wanted the whole match, wouldn't I just call join?
I've never seen that kind of 'you must know this non-intuitive return format' thing before
 
@KendallFrey Ruby has %w(...)
 
@Miszy oh, ok then... I don't really like kittens..
 
@JanDvorak ???
 
2:51 PM
@Cicada3301 If you're repeating bad patterns then you're a bad programmer. Nuff' said.
 
%w{a b c} == ['a', 'b', 'c']
 
@Miszy jk obviously... was googling how to do it
 
what does that have to do with anything?
I'm talking about regex behaviour
 
@Cicada3301 Weren't you the one who said you were looking to be the best?
 
@AntiEarth joining the capturing group typically doesn't create the whole match
 
2:52 PM
@Neil exactly, look what I wrote later
 
@JanDvorak oh true
 
!!> x = 0; test = []; test[x++] = "what? index 0?"; test[x++] = "elem 2"; test[0] + ", " + test[1]
 
@EnglishMaster "what? index 0?, elem 2"
 
y = RegExp('(butt)ham(dog)', 'g');
y.exec('butthamdog')

>>> ["butthamdog", "butt", "dog"]
 
!!> x = 0; test = []; test[++x] = "what? index 0?"; test[++x] = "elem 2"; test[0] + ", " + test[1]
 
2:54 PM
@EnglishMaster "undefined, what? index 0?"
 
@Miszy is addEventListener what jQuery usually does?
 
welp, I've learnt some things today that should already have been obvious to me
 
oh
I get it
 
@Cicada3301 What?
 
thanks guys for the help! :)
 
2:54 PM
!!> "a,b,c".split(/(,)/g)
 
@KendallFrey ["a",",","b",",","c"]
 
my eyes
 
@Miszy jquery has some on event parameters.... is it the same?
 
@CapricaSix WHAT
 
@Miszy captured groups are included in split results
 
2:55 PM
@Cicada3301 Kind of. Only you don't really want to use jQuery.
@KendallFrey srsly, hahaha, never heard of it.
 
@KendallFrey couldn't that somehow be useful?
 
It's pretty esoteric
@AntiEarth Probably, but not sure how
 
@Miszy ok... that was the question... but why is it better than onclick directly on html? just calling a function on my .js
 
!!> "foobar".split(/(?=(.))/g)
 
@Cicada3301 Because that way you cannot attach more than one eventhandler to the same DOM node. And also you're mixing JS with HTML, as I said.
 
2:56 PM
@KendallFrey "SyntaxError: unterminated parenthetical"
@KendallFrey ["f","o","o","o","o","b","b","a","a","r","r"]
 
yaaaahahaha
 
I hate my haircut
 
@Miszy the second one is just a problem of coding style?
 
I shouldn't have told the hairdresser "just cut it short thx"
 
@Cicada3301 Yes.
 
2:58 PM
I like short
 
!!>Math.floor(Math.random()*6) !== 0 ? 'click' : 'BANG!'
 
@Neil "*click*"
 
@KendallFrey That's what she said.
 
@Zhegan What should I wear to chicken wings?
 
Is putImageData already optimised? Such as, caching to avoid reallocating a duplicate pixel value in a same spot and etc?
or do you need to optimise it?
 

« first day (1189 days earlier)      last day (3763 days later) »