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

1:00 PM
@JanDvorak wait and standard library of JS is top notch, right?
 
How do you make a hashmap from ints to ints in lisp?
Also, how do you look up an alist by a numeric value if numbers don't have their own identities?
 
Lisp is cool, so is JavaScript.
 
@JanDvorak dunno, by using a hash table?
anyway, I don't want to go on with Lisp vs Js here
 
@BartekBanachewicz code-pls?
 
1:02 PM
Guys, why do they call Shim as "polyfill" on www.npmjs.org?
I'm sure this is called "shim"
https://npmjs.org/package/typedarray
 
I just wanted to point out that first-class functions are nothing special really
And they itself are not something to balance the "bad spots" as you called them
 
what about closures?
 
Hey guys, I have an array of items, and a string and I want to replace all occurrences of the items of the array in the string using regex, if i use new RexExp how can i guarantee that the string is escaped, because if it has a dot in the string then regex would treat it like a special character right?
 
Regex literals?
 
1:03 PM
still.
 
Dynamic objects + closures = fun
 
@Deniro not use regex?
 
@Deniro Escape it yourself.
 
I am not sure when closures were introduced to lisp, but I bet it was way before JS appeared
you can say that lisp is unreadable mess and I'll perfectly agree.
 
I don' see what else i could use, how can I escape it, you mean manually search and replace dots and other special characters in the array of items?
 
1:05 PM
@BartekBanachewicz indeed it is
 
but then again, if the only thing JS did was take Lisp and make it more imperative and readable, it would be by far better
 
@BartekBanachewicz I like the loop and format, though
 
instead they created it from scratch effectively (as it seems) dumping dozens of years of research into the trash can
 
I'm starting to seriously hate JavaScript.
 
and repeating problems that were solved way before
@Oleg hehe, newbie.
 
1:06 PM
Why the hell is there no way to pass an object without referencing it.
 
@Deniro escape it with a regexp
 
Oleg, A bad worker always blames his tools @Oleg
 
Teach me, masters of JS.
 
@Zirak Ha, good Idea, use a tool to protect it'self :D
 
@Deniro which is completely irrelevant of a good worker saying a bad tool is bad.
 
1:07 PM
Teach me the ways of encapsulation!
 
@Oleg choose a lesson
 
I wrote something which does that, hang on
 
@Oleg do you just want deep copy?
 
Encapsulate an array of objects (with variable number of properties) within a model.
 
{ objects : [ ] }
 
1:08 PM
Thanks @Zirak
 
@Oleg closures are the way to hide stuff
 
@JanDvorak fail
 
why so?
 
@JanDvorak I thought that starting functions with _ is a way to hide stuff
@Benjamin taught me that
 
1:08 PM
HAHA @BartekBanachewicz
 
@BartekBanachewicz that's a conention
 
str.replace( /[-^$\\\/\.*+?()[\]{}|]/g, '\\$&' );
 
@Deniro what's so funny?
 
Thanks @Zirak
 
@JanDvorak it doesn't hide all
 
1:09 PM
@Oleg usually you can do a quick deep copy of an object with JSON.parse(JSON.stringify(obj)) but that way you'll lose all references etc. Also: I'm not saying it's efficient :P
 
But understand it before you use it
 
@JanDvorak ... used to hide stuff, no?
 
@BartekBanachewicz _ doesn't do anything
 
i just asked a question and -- got flagged for being too "broad" -- wish i could communicate better with stack overflow. the question is long, but as per the rules of this room, thought to give it a try, here goes:
 
@Miszy That is a JS fail.
 
1:09 PM
Enjoy
 
So I proclaim that JS sucks.
 
@Deniro oh but it does. It's a convention, you see.
 
I have an image, mapped to which is a table of densely packed images with captions, each one of which has been scripted to put forth a popup when moused over, that hides upon mouseout. There are over two thousand, and I want to display <em>them</em> instead of the overlaying image.
I could create a table and do it manually -- but I cannot figure out how to (easily) extract the information. I have a hunch that there is a simpler way than writing down and transcribing the URLs, or opening each one. Have fooled around with the source, but cannot at my present level of understanding figure out how to modify it to just display the images themselves at the coordinates specified. Will provide an outline of source if it proves necessary or beneficial.
 
@Oleg every language has a weak spot
 
@BartekBanachewicz Looks can be deceiving :D
 
1:10 PM
@Deniro It uses pony magic.
 
@JanDvorak It's just that JS has more...
 
ahem (apologies for length)
 
@Oleg more than...
 
@JanDvorak others, I guess that was obvious
 
more than any other language
 
1:11 PM
@Oleg well not more than PHP
let's be fair here
 
^
more than Java?
 
In PHP, afaik, you can at least choose if you want to reference something.
 
and I guess some languages from the 60s like MUMPS would still want to fight for that title
@Oleg fuck php
 
And holy cows you can even reference a simple string or number in PHP.
 
brainfuck and relatives
 
1:12 PM
@Oleg You are using the word "reference" a lot, but I don't think you know what it means
 
close over it
 
@JanDvorak brainfuck is... perfect.
 
@BartekBanachewicz teach me, oh master, about referenced variables
 
@Oleg How about Object.prototype.extend or Object.prototype.assign then?
 
@Oleg Just define what the fuck does "reference" mean for you.
 
1:14 PM
oh-kayyy. Be seeing you.
 
pointer!
 
a = '1'; b &= a; b = '2'; a // '2'
 
agu agu agu
 
how-to-avoid-sounding-condescending i'll just leave this here.
7
 
@JanDvorak I mean, bf is perfectly consistent and simple, available implementations are bug-free...
@rlemon oho
 
1:14 PM
*(a+2); // win!
 
@Oleg I think you can do Object.create(nameOfObject);
 
@BartekBanachewicz so, you blame javascript for being in IE?
 
@JanDvorak what?
 
@rlemon Thanks for that
 
@Oleg objects are passed by ref by default, so you could do something like a reference wrapper, I guess.
 
1:15 PM
@Oleg How often are you actually going to a reference a primitve? o.O
 
I don't think Javascript is buggy, it's the DOM Api
 
@BartekBanachewicz bf is consistent? Hell no
 
@JanDvorak what's not consistent in it?
 
@BartekBanachewicz EOF
 
@BartekBanachewicz it's not passed by ref in js
 
1:16 PM
@Deniro Your logic maek no sense.
 
@Deniro then you think wrong
 
but I'll stop there ~~kawai~~desu
 
@BartekBanachewicz JS in most browsers is not buggy. It's just not implemented to the same extent :D
 
eh w/e
lemme read lemon's article
 
@Miszy JS or the DOM API?
 
1:17 PM
@FlorianMargaine JS.
 
No
I disagree
 
@FlorianMargaine EcmaScript implementation.
 
@rlemon in your estimation would my just happening to go over there and pick that up be relevant or tangential?
 
@Deniro holy cows, I have an array with 60000+++ elements in it. Do I need to call Object.create every time???
 
@Oleg Object.create for what? :D
 
1:17 PM
@BartekBanachewicz also, cell size, tape size, data pointer underflow behavior...
 
@Oleg No
 
@Oleg of course dear
 
@JanDvorak implementations are required to specify that.
 
@FlorianMargaine That's a pain in a subtle place.
 
@BartekBanachewicz the same applies to javascript
 
1:18 PM
@Oleg oh my
 
@JanDvorak inconsistency would be calling "+" "+" and "-" "minus"
 
never mind. must be me.
 
not allowing them to change the global behavior
 
@FlorianMargaine not yours! eerk
 
@Oleg ... that's too late, darling dear.
 
1:20 PM
My life is screwed! I won't be able to marry anymore...
 
Is your d*** gone`?
 
@afemalefaust I don't know what this even means?
 
There's no more love for JavaScript anymore...
 
I have no idea what your problem is
 
Oh, me haz plenty of love for sweet JS
 
1:21 PM
@Oleg you've started with that
 
Good way to end it.
 
now you blame us for not arguing?
 
@JanDvorak You don't look like a mastermind behind JavaScript, so I can't blame you.
 
@Oleg should I flag that as offensive?
 
@rlemon fuck political correctness that disallows the bald guy to call the other guy dumb. Because of that we have numerous problems in schools because each child is to be treated "equally" and it's politically incorrect to say that one child might be just fucking smarter than the other. Instead, the teacher is blamed.
@JanDvorak no.
 
1:23 PM
@JanDvorak No, you could call him dumb too.
 
Why the fuck can't people just be nice and friendly to each other
 
@Miszy this is how we roll
 
because you used the word "fuck"
 
@BartekBanachewicz I've already told you I think you are in very poor taste when you come in here and condescendingly bash JS.
you are VERY condescending when you speak to most users in here
 
@FlorianMargaine fuck the letter of the law. It's the spirit that counts.
 
1:24 PM
I respect you have a lot of knowledge, but you don't have to be a dick about everything
2
 
@JanDvorak Flag me!
 
learn how to interact with your peers without them wanting to punch you in the throat
 
@rlemon You made me wonder now how can I bash it non-condescendingly
 
don't bash it. or bash it in another room
 
1:25 PM
it's easy to bash something while not being a dick
 
let's try
 
are you really so stupid that you can't do that?
 
@BartekBanachewicz bash it here: chat.stackoverflow.com/rooms/23262
 
I love how 3 of us entered and left together
 
@SomeGuy :D
 
1:26 PM
a net-splat?
 
Just because the URL didn't have the name in it
 
@SomeGuy True :)
 
> I consider the fact that JS uses operator + to concatenate strings as bad, because it's commonly used as an addition operator, which is commutative. Because of that, the use of + might lead to the problems where non-commutativity of it changes the operation. Hence, I think some other operator should be used instead.
how was that?
 
much better.
 
Way better
 
1:28 PM
cool.
It's not that I'm not trying :F.
 
@BartekBanachewicz You forgot about +variable casting any -> Number :D
 
Well, it kinda looked like you're not trying at all
 
@Miszy that's used in C++ to enforce decay to function pointer :)
 
@BartekBanachewicz "decay to function ptr" ? What's that?
 
1:29 PM
and it's a problem with coercion and weak typing rather than op+ itself
 
@BartekBanachewicz you will hate golfscript
 
@BartekBanachewicz how would you quickly express this common usage though? JS tries to make it easy (it's a scripting language), and a + operator says it nicely. It's actually consistent with integers, since that "adds" 2 strings. Being against this is basically being against operator overloading in C++
 
or whitespace
 
:-/
i hate u appl
 
(see, we have a technical discussion, expressing each point of view, and we're not dicks.)
discussions like this happen all the time
 
1:31 PM
i spent so much time just to find out, even if i build it you will make it crash :-/
 
but when one side starts being a dick, then the argument is over
 
yup, and they are constructive and fun
 
@Miszy for example, it's required by the standard that lambda expressions with empty closure scope to decay to C-style function pointers if a need arises. A C-style fn pointer has a syntax of ret_type (* var)(arg_list); and can be called just like a normal function (w/o dereferencing it).
However, when used with templates, lambda expression will bind stronger to its actual ad-hoc lambda type rather than a fn pointer type, so it's used to enforce that.
 
Anybody here has there apps out there in the wild written in titanium ?
 
@RyanKinal I can't find your gist about "don't be a dick" philosophy anymore :\
 
1:32 PM
@BartekBanachewicz Imagine problems with minifiers. You can strip "almost all" whitespace from JavaScript, eg. you can't mess up this expression: a + +b which means "a plus Number from b". :/
 
ouh titanium
 
@Miszy being explicit helps. a + parseInt(b) has no problem here
 
@BartekBanachewicz that's entirely another issue. I agree that weak typing sucks, but we're dealing with legacy there
 
@BartekBanachewicz if you think one operator shouldn't be doing two things, check this
 
1:33 PM
@BartekBanachewicz I am being explicit. I could go a + parseFloat(b) but that's not the same :)
 
Does everybody here has bad experiences with titanium ?
 
@JanDvorak I don't think he thinks that -- he likes operator overloading in C++.
@AbhishekHingnikar so that we can whine together?
 
@FlorianMargaine Not really. I don't think that + is a particularly good choice in C++, but it's pretty much the only choice. In Haskell, which allows you to overload any arbitrary sequence of non-alphanumeric characters, ++ is provided. And Lua has just .. builtin.
Also there's always stringstream. (which uses <<)
 
@FlorianMargaine I am confused which suicide option i should choose.
 
@BartekBanachewicz eg. +null === 0 but parseFloat(null) === NaN
 
1:35 PM
PhoneGAP vs Titanium
 
@Miszy let parse = (x) => +x; :)
 
@AbhishekHingnikar 24hour marathon of Rebecca Black songs
 
too slow to load
 
swipe from right
its just 300kb dude.
 
1:35 PM
@BartekBanachewicz sure, but just anothe function to define in each and every project you start ;P
@AbhishekHingnikar go trigger.io
 
@Miszy back in my day having personal util libraries was a common thing
 
hey guys!
no teacher missing today :/
 
@JanDvorak eh, GolfScript is kinda another thing
 
Oh, sh*t. We're doomed.
 
Hahaha
 
1:37 PM
i did this just to realize even if i put content and camera view iOS will just crash
 
@BartekBanachewicz yeah, and everybody was making his own library with lots of bugs
 
@BartekBanachewicz what about J?
J is meant as a serious language
 
I was so happy with my android chrome
 
@JanDvorak replace meant with used, and you know what kind of language we want to talk about.
 
What about Ruby?
Ruby uses + for addition and concatenation as well
(it doesn't allow mixing types, though)
 
1:39 PM
good choice. Now what do you want to do about it?
yeah, like python. Strong and dynamic typing.
 
Reasonably weak typing
 
@FlorianMargaine @BartekBanachewicz claimed that this kind of overloading makes Javascript a bad language. I disagree that this is the case.
 
ah
I kinda agree that the + operator is bad though
 
Okay guys, I wish to build a simple dropbox[maybe multi service] uploader and photo viewer
 
arithmetic operators should remain arithmetic
 
1:41 PM
i originally thought javaScript + web will be good, but until i started writing code for the camera view.
 
@AbhishekHingnikar tools.pingdom.com/fpt/…
 
What do you guys recommend for that. ?
 
@JanDvorak I think that introducing a different operator makes it more explicit and reduces the number of errors, at the cost of each developer wasting 15 second of his life to google it when he first uses JS.
 
@rlemon ngRok servers are in USA the open endpoint is forwarded to my pc in India
i am waiting to buy a dev machine.
 
quick question: is it normal that the button value property's font-family is not equal to the body's font-family (I have no special property applied to the buttons... which are input types='button')?
 
1:42 PM
I'm just pointing out when he said "takes too long to load" and you said "its only 300kb" his claims were quite valid
 
@AbhishekHingnikar Loads entirely pretty slow for me too
 
@BartekBanachewicz There are only so many operators you can use.
 
@SomeGuy thats 2x slow for you dude xD
if i give you my ip it'd load faster cause of lower latency
 
9 mins ago, by Bartek Banachewicz
@FlorianMargaine Not really. I don't think that + is a particularly good choice in C++, but it's pretty much the only choice. In Haskell, which allows you to overload any arbitrary sequence of non-alphanumeric characters, ++ is provided. And Lua has just .. builtin.
 
@Cicada3301 What do you mean?
 
1:43 PM
@rlemon :-/ didn't knew it took that long ps i had like an attack on my pc
# Conn 202
from #conn 97
 
@BartekBanachewicz so much is true. It doesn't change the fact you still have to learn very different sequences of symbols that do similar things to different types.
 
@Cicada3301 yep
@JanDvorak similar, not the same. Consider >>= in Haskell, for example
 
@rlemon thanks, I was too lazy
 
Or just simpler (perhaps) <$> and <*>
 
@BartekBanachewicz Ruby has >>= :-)
 
1:45 PM
@BartekBanachewicz those kind of operators are all bad imho, you don't know what they mean when first looking at them
 
@JanDvorak C++ has it too, but I guess with a different meaning. :)
 
@Miszy I found the solution to my yesterday's problem... with the body font-family not applying to anything: found out I had an * selector to give everything a certain font-family... deleted that using the developer menu and added that tag to body... now when I use the switch font button everything changes but all of the inputs...
 
body, input, button, select, option, textarea {
    font-family: ...; /* whatever font */
}
body {
    font-size: x%; /* whatever base font size I want */
}
input, button, select, option, textarea {
    font-size: 100%;
}
inputs have their own default font styles
you have to set them
 
@FlorianMargaine of course. But once you do, they make code extremely terse and IMHO very readable.
 
@rlemon ok, thx!
 
1:46 PM
But I can understand people preferring liftA over <$>
 
operators are really something of a preference. You choose a way to use them and go with it
 
@Cicada3301 Also it's important to notice that certain browsers may have different default styles for elements, that's why it's adviced to use some kind of normalize.css.
 
lisp has a better way: it doesn't use them :P
 
@FlorianMargaine (+ 2 2)
 
+ is a function accepting 2 or more numbers
it's not an operator
 
1:47 PM
I mean, it isn't fundamentally different for me to look up liftA than <$> in Hoogle.
 
@FlorianMargaine I don't think prefix notation with mandatory parentheses are the recipe for readability
 
@FlorianMargaine operator is a function alright
 
+ is something you don't need to google
 
@Miszy which is what you were making me do in the other website, right?
 
it's just the RPN
@FlorianMargaine when talking about numbers
 
1:48 PM
@BartekBanachewicz no, really. + is a first-class function, which means you can apply it to reduce for example
 
it's not obvious for everyone that + concatenates strings
 
@FlorianMargaine In Ruby operators are functions of their left operands
 
@BartekBanachewicz in lisp, + is only used for numbers
 
@FlorianMargaine you should read more about haskell :) (I'm serious)
 
@BartekBanachewicz On a general note: Everyone should read more about Haskell.
 
1:48 PM
1 min ago, by Bartek Banachewicz
I mean, it isn't fundamentally different for me to look up liftA than <$> in Hoogle.
 
@BartekBanachewicz I know. I've already read like 70% of learnmesomehaskell (or something like this), but I'm just bored now
 
@FlorianMargaine Well haskell sections are even more fancy
@Miszy correct :D
 
it's not fancy, it's simply a function
 
partially applied function
 
@BartekBanachewicz curry
 
1:50 PM
well in general curry-by-default
 
uh? I'm talking about the + function
 
@FlorianMargaine (+2) is a section of infix + function, which can be read as partially applied + function
 
ah, you're talking about haskell
anyway my point is that operators often make things complex, and there's no "right way" to do it.
which is why I think the choice of lisp to not have them is nice
 
@FlorianMargaine and my point is "no more than generic strange functions like lift"
 
anyway gotta go
 
1:52 PM
awesome guys! and I've also set the default font to electrolize... to keep your eyes alive!
 
because you still have to look them up
now one can argue what's easier for the eyes, but that's very subjective, I guess
 
@BartekBanachewicz do you even lift?
 
!!s/lift/<$>/
 
@copy That didn't make much sense. Use the !!/help command to learn more.
@copy @BartekBanachewicz do you even <$>? (source)
 
1:56 PM
anybody french here?
 
@Cicada3301 je ne suis pas
 
@Cicada3301 en quoi puis-je aider?
 
@JanDvorak are you or just joking? or did you study it really well?
 
He's French
 
1:58 PM
I'm Canadian - I know fake french
 
@Cicada3301 he didn't study really well.
 
@Cicada3301 three years of high school
 
does that mean How can i help you? @FlorianMargaine
 
we didn't learn much
 
@C5H8NNaO4 indeed
 
1:58 PM
9 years of french in school. I also remember very little - however I'm sure it would come back to me if I needed it
 
You can learn "je ne suis pas" in the first lesson of french
I don't know french and I understand that at least
 
@Neil except it's "je ne le suis pas"
 
After all of the manual homework I've been doing in frenchI thought I should automatically: insert a sentence and output it's plural or femal counterpart...
 
@FlorianMargaine Ah, as I said :)
 
and I needed to know if it would be worth it...
 
1:59 PM
what?
 
as of... if the rules were too many
 
This is crazy!!
 
he wants to write a function to conjugate verbs.
 
11
Q: Have I tattooed a syntax error on my arm?

spydonA few months ago I tattooed a fork bomb on my arm and I skipped the whitespace because I think it looks nicer without it. But to my dismay, sometimes(not always) when I run it in a shell it doesn't start a fork bomb but just gives a syntax error. bash: syntax error near unexpected token `{:' ...

 
or too many singular-word exceptions...
@rlemon nope...
 
1:59 PM
@rlemon He good. Good regexp practice, I guess ;)
 

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