« first day (971 days earlier)      last day (3977 days later) » 

8:00 PM
lol
 
At least, in comparison with JS
 
@rlemon oh, I thought it was a silly parody of yours.
 
@JanDvorak It doesn't. E.g. a sorting algorithm that uses < for comparison.
 
Every time I have to write something like that in VB, I die a little.
I think I'd like it better in C#
 
@loading... that's a callback-decides. The caller is the library here. The caller knows nada.
 
8:01 PM
@RyanKinal C# does it better than JS to be honest
 
Yeah, the syntax is definitely lighter.
 
I don't like javascript's function expression syntax, but I love its scoping rules.
 
@JanDvorak Oh, we're getting C# syntax soon :)
 
@JanDvorak < might not be in the callback. As long as the supplied object is able to provide values that respond to <, which is polymorphic itself.
 
(at least, when golfing)
@loading... in which case, the library is still the caller
 
8:03 PM
@JanDvorak Uh. No. I've lost it. What's the caller and what's the callee again? :-)
 
speaking of golf, we need some new problems over at golf.shinh.org The levenshtein sort problem is crap
 
(you don't have to answer that!)
 
so many people chat here, most of time chat without any special topic, not for helping other nor for getting help from other, neither enjoyable chat...why not utilize that time in learning new things or for earning or utilizing for more enjoyable time like going out with GF/ friends :P ... sorry for boring lecture but i feel so when i chat mostly. me going now, bye all
 
@Shmiddty I've not looked into it, but what's up with it? Though it's certainly crap for php!
 
@SomeKittens no but give me a catchy song and I can whip you up one
 
8:05 PM
hey all - i have a table of contents for an article that links to an id,etc.. but it puts the location of the window at the top which is where a fixed navbar/title is
 
@loading... in case of the sorting: the outer caller is the user code, and its callee is the library. No polymorphism here. Then the library code itself becomes an inner caller. Its callee is either a first-class function, or a polymorphic method of a comparable type.
 
is it possible to offset the location of where the TOC links to?
 
The polymorphism is still done callee-decides
 
@loading... It's an overly complex problem, there's little incentive for competition (in JS)
 
@JanDvorak What's I'm getting at is that behaviour can be influenced by both the caller and callee, whichever they may be!
 
8:06 PM
what you mean kevin? do you want html a #tag?
 
can i get some advice, I'm building a contact form, and i want to store the form data in localStorage just in case the page refreshes the form data will still be there, would it be a performance issue to store the data in keyup or is there a better way?
 
I have a link going to #thisheader for example. I click it and it brings #thisheader to the top of the page
 
@loading... the caller may decide only if it's a callee (or owns a callee) too. Otherwise, it's not polymorphism.
 
the thing is, I have a nav bar and other fixed elements at the top that hide the content - make sense?
 
@Connor consider storing on unload
 
8:08 PM
@JanDvorak hmm, ok ill look into that thank you :)
 
@Shmiddty Oh, I see what you're saying. It's down to 174B of Python. I guess we could have a JS vs Python fight!
 
@web2students.com I think most of us are learning new things, or helping, or working at any given time.
 
@KevinMurphy you want that nav should be visible all time even when #?
 
@JanDvorak You said that the caller or the callee could be either party. This doesn't make any sense in that context.
 
this is the set up of the article: i.imgur.com/qXcCXy7.png
everything is fixed except the content in the middle
so when i click the link in the TOC, i want it to bring it to a certain position, instead of to the top
because as you can see, it will get cut off
 
8:10 PM
Why do people not understand the concept of the chat rooms... They are not for q and a.
 
@loading... the sorting libary is both a caller and a callee. It needs to be a caller so that it is type-agnostic (polymorphic)).
 
@rlemon They're not
 
function d(s,t)(l=s.length)?(L=t.length)?Math.min(d(S=s.slice(1),t)+1,d(T=t.slice(1),s)+1‌​,d(S,T)+(s[0]!=t[0])):l:L for just the distance function
 
!!/tell Zirak jQuery load
 
8:11 PM
@JanDvorak > calls nothing.
 
wait... what?
 
which probably doesn't work
because of globals
 
if the sorting library does not make any calls, it cannot be polymorphic and type-agnostic at the same time.
 
and that returned this
21 mins ago, by Caprica Six
@rlemon Invalid /tell arguments. Use /help for usage info
 
function d(s,t,l,L,S,T)(l=s.length)?(L=t.length)?Math.min(d(S=s.slice(1),t)+1,d(T=t.slice(‌​1),s)+1,d(S,T)+(s[0]!=t[0])):l:L
 
8:13 PM
@loading... whom are you quoting now?
 
@Zirak notice the edit from jQuery to jquery
 
@JanDvorak Heh! I edited it!
Hmm, not that that helped much!
fine, s/>/</ :-)
 
@Esailija Do you have a decent way to find out how internals are defined in v8? Say you want to see the C++ implementation of number.toString, which (in some cases) is %NumberToRadixString
@rlemon Weird, I'll check the logs
 
in windows is there any way to see the current network traffic from said computer?
I wanna see how slow this update is downloading
 
@rlemon ctrl + shift + escape
go to network manager
 
8:15 PM
networking tab... never think about this
 
@rlemon there are plugins apps for that
also, resmon.exe
 
@rlemon On the first instance, the bot saw
`Mahmoud jQuery load => ["Mahmoud", "", "jQuery", "load"] /tell input` (double space between username and command-name)
On the edit, it was
`Mahmoud jquery load => ["Mahmoud", "jquery", "load"] /tell input`
 
are you fucking kidding me
2-4kb/s
 
@KevinMurphy for TOC you can show in pop up using jquery with X button or
 
@Zirak strange... I didn't see the double space because the DOM? corrected it then on edit it was gone because the edit data is picked up there?
@KevinMurphy don't listen to @web2students.com
 
8:17 PM
at bottom of TOC link for go to top
 
protip
 
other way is to use div with innerhtml jquery func
 
i dont want the TOC always visible
 
The double-space gets trimmed by the chat's display, but it's still there. Since you probably don't want a double-space in any time (and an empty argument is simply ""), I'll filter those out
 
i want to change the location of where the link scrolls the window to
due to the fixed elements at the top
 
8:19 PM
@KevinMurphy so you need a padding for the content? or you need window.scrollTo information ??
 
user1125394
$('.container').not('#home') possible to do that in one call, with css?
 
@eazimmerman ctrl+shift+esc is my favourite Windows shortcut.
 
^
 
@cx yes, yes
 
win+d is mine
 
8:20 PM
@loading... [WIN] [left|right|top|down]
 
@rlemon I use that sometimes too
win+left, and win+right
 
@loading... most useful shortcut ever
 
I use all the time
 
when Im not working on dual monitors
 
@Loktar it's so sweet for dual monitors
 
8:20 PM
what about win+tab?
 
it's the easiet way to lock to the inside of a the two
 
or alt+tab, for that matter?
 
@rlemon does it throw it on the other monitor?
 
Windows 7 (and probably windows vista) allows you to do Win+# (where # is a number) to launch the #th program in your bar thing
 
@rlemon Yeah, they are actually very good. But in windows you need the task manager! :-)
 
8:21 PM
like the left and right one?
 
@JanDvorak alt+tab > windows+tab
 
@Loktar yes
it gives you full control
 
@rlemon window.scrollTo i guess would work right? because i can add the offset of the content above it?\
 
oh cool, Ive never done it with dual monitors
@Zirak wow crazy didnt know that
 
@eazimmerman meh. I like the huge previews
 
user1125394
8:21 PM
@JanDvorak for the moment, $('.container :not(#home)') fails
 
@KevinMurphy can I see the page?
 
@cx remove the space
 
@rlemon it's on the network here but here's a ss: i.imgur.com/qXcCXy7.png
 
@JanDvorak it's nice if you have a few windows open. but if you have several it's not
 
@eazimmerman then the toolbar wins
 
8:22 PM
@KevinMurphy that doesn't tell me the issue
 
especially if you lock everything
 
One of the GUI things I miss most while in Windows is multiple workspaces.
The tags in awesome are...awesome.
 
@rlemon see how the nav bar and title is fixed to the top? when i click my current TOC, the link it goes to is underneath the fixed items
 
@Zirak there's an app for that
 
I'm sure there are plenty
Unity had some nice workspace support. KDE's was wobbly to configure, but was nice as well. awesome's kicks ass.
 
8:24 PM
Every multiple desktop app I've used for Windows has been buggy in some way.
 
@loading... also, apparently recursion just isn't going to work. (timeout)
 
at my office yahoo is not blocked by login.yahoo is blocked, today i login at yahoo but i logout from yahoo, i got message, this page is blocked :P
 
If your recursion doesn't work, you're not believing in it enough
 
for(r=readline,a=r(o={}),o[a]=0;b=r();)o[b]=(function d(s,t,S,T)s.length?t.length?Math.min(d(S=s.slice(1),t)+1,d(T=t.slice(1),s)+1,d(S,T)+(s[0]!=t[0])):s.length:t.length)(a,b)
print(Object.keys(o).sort(function(a,b)o[a]-o[b]).join('\n'))
 
If recursion doesn't work for you, recursion won't work either.
 
8:25 PM
where's the recursion key on my keyboark?
 
@Shmiddty Oh. Shit. I'd just looked up the algorithm in Wikipedia and recursion seemed to be the way to go for golfing. :-(
 
@loading... that's what I thought
works for the first output
 
Wtf I can receive messages but my internet is off...
 
because it's a short list
 
@Zirak I just had it happen to me as well.
 
8:26 PM
@rlemon internet, or just DNS?
 
@rlemon Didn't you mention the movie Sphere the other day?
 
messages were coming in , but sending just timed out like a billion times and opening new tabs gave me nothing
 
@Zirak Do you actually use the tagging feature (showing more than one tag) in awesome?
 
@Shmiddty yes, good flick.
@KevinMurphy is the TOC have a wrapper with an ID value?
 
I seem to remember some goings on with a computer receiving messages
 
8:27 PM
@copy Yeah, often
 
@rlemon i tried to answer him, second at least he get attention ,someone else may help him in answer....
anyway bye all
 
@Zirak huh, I never got used to that. Especially since it resets when you look at another tag
 
I usually have my editor on one, and some documentation on the other, and a browser on another.
 
@rlemon i can give it one :P
 
@Shmiddty Hmm, yeah, it's very inefficient. Maybe you could fake it by only comparing x bytes of every line, but probably not.
 
8:36 PM
@loading... I'm just not going to bother
 
@KevinMurphy you can get real hacky with paddings if you don't want a js solution
you can correct the jump with js. or you can take over and create the jump with js
 
i'd like a JS solution to be honest.
 
@Shmiddty Yeah, I find the shorter problems more fun.
 
a lot of the page is built with JS
 
@KevinMurphy js or jQuery
 
8:37 PM
doesn't matter to me
 
is jQuery included?
 
yes it is
 
I like JS for golf because the language is quite limited in it's constructs and stdlib, so you have to be creative to shrink code.
 
also, because function(x)x is f* long
 
x=>x; // soon
 
8:39 PM
is there a drawback to passing arrays as variables to a function using apply?
 
probably not for that site
 
yeah
 
x=>x # coffee
 
s/soon/hopefully/
More likely to have coffeescript I reckon.
 
{|x|x} # ruby
 
8:40 PM
anarchy still supports e4x syntax, which was deprecated some time ago
 
@jbolanos Depends on context
 
@Shmiddty which is that?
 
inline xml constructs
 
@JanDvorak Ruby lets you do -> now though, doesn't it?
 
var a = <element>value</element>
 
8:41 PM
@BenjaminGruenbaum I have a function that will accept different sets of variables depending on what action its being asked to perform
 
used on that site for shorthand stringFromCharCode
<>&#{charCode};</>
 
@KevinMurphy ok, does the links for the TOC exist on the same page? or are you navigating to a new page with a #anchor
 
[:x|x] "Smalltalk"
 
@jbolanos Probably ok.
 
@BenjaminGruenbaum thanks
 
8:42 PM
if they are on the same page this should work (untested)
var OFFSET = 64; // px offset for the jumps
$('a [href^="#"]').each(function(i, a) {
  a.on('click', function() {
	var target = $(this.href);
	if( !target.length ) {
		return true; // something was wrong, resume default action
	}
	$('html, body').animate({
         scrollTop: target.offset().top + OFFSET
     }, 500);
	return false;
  });
});
 
@rlemon same page.
cool thanks i'll try it out
 
Ruby is the child of Smalltalk and Perl.
 
!!><>&#{95};</>
 
@Shmiddty "SyntaxError: syntax error"
 
about a day left on that one
it's not hard
 
8:45 PM
@KevinMurphy if it doesn't work ping me. I am leaving work soon so won't be on a pc for a bit but i'll be back on later
95%!!!
downloading 500meg of updates from the ms update server at 4kb/s
pimpin'
 
@BenjaminGruenbaum {|x|x} is a block, ->x{x} is a lambda (Proc). You can use &->x{x} to turn the Proc into a lambda, but f{|x|x} is 7 chars, while f(&->x{x}) is 10.
What's much cooler is f(&:x)
 
@rlemon I don't get it either. I followed the spec, and got reverse results.
 
&:x is a shortcut for {|y,*args|y.x args}
 
1.15.toFixed(1) should be 1.2, and 1.25.toFixed(1) should be 1.2 as well.
 
@BenjaminGruenbaum a.reduce(:+)
 
8:48 PM
@purefanatic 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.
 
For both of them, n = 12 (es5.github.io/#x15.7.4.5)
 
@JanDvorak Yeah, scala does that
val numbers = Array(1, 2, 3, 4, 5)
val prod = numbers.reduceLeft[Int](_*_)
 
nice
 
spotify keeps playing "Attraction Formula" ads at me.
 
(You can probably skip the [Int])
 
8:49 PM
Sommmeewhherree oovverr thhe rrainnnbooowww
 
@Gacnt which cover?
 
The original
 
eh, I don't really care about declaring functions. I want it to be easier to pass generic functions around, and use operators as functions.
 
Reading rainnbbooww
 
@Zirak ruby has both
 
8:50 PM
@Zirak I'm just glad I don't work with sensitive numbers in js :)
l8tr g8trs
 
Ruby has weird support for passing functions around
 
4:50pm
 
And I'm not talking about ruby
Lisp has both as well
 
user1596138
The PHP room is a lot nicer to kids than we (I really shouldn't speak for anyone but myself) are hahaha
 
And Prolog laughs at the concept
Meanwhile, Haskell says "operators? what?"
 
8:52 PM
@Jhawinsss No they're not :)
 
@Zirak arr.each(&method("my_def")) is weird?
 
@Jhawinsss they just do the right thing and let them hang
 
(which is really what Prolog is saying, since they both kinda do the same thing)
@JanDvorak YES!
 
@Zirak So does Scala, in Scala operators are just functions
 
@Zirak normally you define my_def as a proc if you want to pass it around
 
user1596138
8:53 PM
@BenjaminGruenbaum Kid comes in spouting nonsense and typing in all caps demanding an answer to his question. Someone makes fun of him for it and gets yelled at by an owner for being mean hahaha.
 
I hate the retarded "you can omit parentheses for function calls". If I want to pass a function around, I want to be able to do arr.each(func), and that's that
 
!!/daybreak
 
user1596138
in bin, 24 mins ago, by C_plus_plus_Rookie
PLEASE TAKE A LOOK AT MY QUESTIONNNNNN ... http://stackoverflow.com/questions/17095730/php-validation-clarification/17096105?noredirect=1#17096105
 
@Jhawinsss I'd do that here too.
 
user1596138
8:54 PM
@BenjaminGruenbaum A kid like tha above wouldn't be defended here.
 
@Zirak omittable parentheses are awesome when you want chained callbacks
 
@Jhawinsss If someone random I don't know starts yelling at another new user. I would consider it rude. Just because that someone is new though.
 
@JanDvorak I don't want that crappy distinction (speaking of which, the difference between lambdas and procs is stupid). I want functions as first-class citizens. I want them urinating on my walls and beating me when I ask if they need their sword wounds disinfected.
 
@Jhawinsss Of course he wouldn't. However, we wouldn't take too kindly to random people fighting in the room either.
 
inject: startValue into: binaryBlock
       | result |
   result := startValue.
   self do: [:x | result := binaryBlock value: result value: x].
   ^ result
 
8:54 PM
Yus, going to go pick up Last of Us on the way to work!
 
Functions functions functions. Paint my walls with them and give them prostitutes for breakfest.
 
@Zirak def creates a method, not a function.
 
Semantics be like ooooooh aaaaaaaaaaaaah
 
Which is again, weird
 
user1596138
@BenjaminGruenbaum I didn't notice any fighting...
 
8:55 PM
OTOH, javascript's this magic is kinda weird too
 
Very
 
user1596138
Doesn't matter. I just think they seem more merciful than here. I like it better here.
 
But it's liquid awesome
 
Liquid awesome is pretty accurate
 
so, either you have method/procedure distinction, lack of first-class functions or weird this.
 
8:56 PM
@Jhawinsss the PHP room work very hard to keep the PHP room from becoming the C++ room
 
Number.prototype.toFixed = function(n){
	var pow = Math.pow(10,n),
	    num = (Math.round(this*pow)/pow).toString();
	return (num + Array(n+1).join(0)).slice(0,n-~num.indexOf('.'));//localization be damned.
}
 
I'd take weird this any day.
It gives you generic-ness.
 
what's so weird about this?
 
can i get a review on this regex for my window.location.match() pastebin.com/mYCfp1kw
 
That you can make it whatever you want?
 
8:57 PM
@phenomnomnominal it's defined by callee. Period.
 
Its value differs on how you call it
 
That's not weird, it's wonderful!
 
It's confusing for newcomers.
 
//a lot of newbies get bitten by:
var fun = obj.method;
fun(); // `this !== obj` in fun
And the likes.
 
bind ftw
 
8:59 PM
@KendallFrey ES5, non-intuitive...
 
@Zirak Yep, JS has no methods.
 
Fuck newcomers? Over.
 
Screw newcomers over.
 

« first day (971 days earlier)      last day (3977 days later) »