« first day (1377 days earlier)      last day (3576 days later) » 

1:00 PM
a human looking stupid compared to a stupid unicorn... that could give a false result.
 
Essentially what $ does is the same what " " does, except it's right-associative
 
Why doesn't npm update foo --save-dev update the version number in package.json?
 
(print ((+) 1 2)) is also valid Haskell :P
 
@AwalGarg I think that could give a true result. A stupid unicorn may still be more intelligent than a stupid looking human
 
@AwalGarg yet still the language allows you to write such code :P
 
1:04 PM
@C5H8NNaO4 you are missing the point. the comparison is between stupid "looking" and stupid.
 
@AwalGarg I realized, i nevertheless think a stupid unicorn may be more intelligent than a non-stupid human
 
How do we differentiate between a stupid looking unicorn and a smart one?
 
@C5H8NNaO4 thats not fair. a stupid unicorn maybe more stupid than a stupid looking human. because a stupid looking human might not be stupid in actual. but the stupid unicorn might not look stupid enough.
 
we ask it to do our taxes
 
if (stupid.hasOwnProperty("looking")) {
    stupid.is = false;
} else {
    stupid.is = true;
}
 
1:07 PM
@Cereal we compare there faces to 4 6.
 
their?
 
pedantic?
 
Grammar is not minor. Next thing you know, we'll be slinging turds like the monkeys
 
@AwalGarg No one said it's fair. That would just imply that the average unicorn is more intelligent than an intelligent human being. So a stupid unicorn (in relation to the average unicorn) might still be more intelligent than an average human being, regardless of the looks of either. Which of course doesn't mean there might be exceptions to that. But it's a FREAKING UNICORN. How can a human keep up to that
 
but the fact is, a stupid unicorn might be hiding behind a stupid looking human. making the stupid looking human look more stupid. in that case, the stupid unicorn is not looking anything, while the stupid looking human will look more stupid. in any case, the human is looking more stupid. yay unicorns
 
1:10 PM
True dat
 
oooh
Repl.it has Roy
 
@C5H8NNaO4 are you a unicorn?
 
I wish i could be
 
@C5H8NNaO4 so you not a unicorn but a stupid unicorn right?
 
Well i got one horn
 
1:12 PM
and yes, a stupid human is actually a unicorn.
 
speedo fart
 
game is reasonably challenging now! copot.eu/matei/games/systic
 
It's so sad btw that the ICANN reserved unicorn.ninja :(
 
Visualforce/Apex coding is the most annoying language I have ever written in
 
1:14 PM
@BartekBanachewicz why doesn't that mean (f g (h x i)) instead? it's confusing
 
@C5H8NNaO4 secondRikudo owns madara.ninja though.
 
I hope you know what I mean
 
@NickDugger speed-o-fart
 
@FlorianMargaine remember that (x) = x. What happens in lisp if you apply a function taking 2 arguments to 0 arguments?
like, what does (+) eval to?
 
1:16 PM
I'll give a cookie to the first to collect 200 nuts or reach 2000m on my game!
 
@AwalGarg That's pretty cool too :) But nothing could beat rainbow.unicorn.ninja
 
Miaou gives a cookie to any browser authenticating
 
I want a walrus tld
 
lol
 
iamthe.walrus
 
1:17 PM
@towc is cheating allowed?
 
@AwalGarg nope
wait, I can disable that
 
obviously
 
Isn't cheating by definition doing something not allowed ?
 
^^^
 
1:19 PM
@FlorianMargaine you're right, I mistyped that :/. It's exactly what you wrote
 
@BartekBanachewicz invalid number of arguments
 
good luck with cheating now, refresh the page
 
@dystroy in what world are you living???? cheating is by definition the work of noble and peaceful men. it is done to avoid trouble and is a sign of trust.
 
@dystroy not if you're playing cheat
 
@BartekBanachewicz lol. So, do you kinda agree that parens are useful? :P
 
1:20 PM
@FlorianMargaine you see, in haskell you simply get a partially applied function.
 
@AwalGarg Did you ever asked your gf the same question?
 
@FlorianMargaine I never said they are not useful. I want to write them sometimes.
 
@BartekBanachewicz so you mean a function that already holds some state in a closure?
 
@dystroy what?
 
@C5H8NNaO4 I think I should... when I get one ;p
 
1:21 PM
...and its gone
 
I wish we could highlight lines in answers on SO
 
@FlorianMargaine you could say that. Just remember that haskell is lazy. This "holding state" won't happen if you don't apply the rest of the arguments and use the value :P
 
@AwalGarg girlfriends are over rated, get a marmoset instead
 
@rlemon lol, sure. would try my luck.
 
well... once you reach teenage parents seem to be pretty unuseful, and I'd never write them something
 
1:22 PM
@BartekBanachewicz that said, another big point of parens in lisp is the fact that you keep an AST. It makes it very easy to write macros.
 
@BenjaminGruenbaum what what ?
 
@FlorianMargaine that's certainly a big plus
it's way more powerful in this regard than most of the languages
 
afaik, haskell also has this kind of utility?
 
not really. Metaprogramming in Haskell is more limited.
OTOH you don't need as much metaprogramming usually.
 
1:23 PM
@rlemon haha... I think she looks like my Physics teacher. ;p
 
@BartekBanachewicz it's not needed, but it's very convenient
 
@dystroy that's only half of cheating
the other half is getting caught
 
@FlorianMargaine I think this convenience depends on the language a lot. I think I'm starting to see what Lisp is all about.
 
Ok, now let's speak about smalltalk
 
writing a small DSL related to your problem at hand is very useful
 
1:24 PM
@MariuszNowak common... 33 issues in several years is not a lot of users... I can get your stance on .done (which, I still believe is a redundant artifact of a naive implementation for doing something the library or native promises should do) - but releasing Zalgo? Doing this sort of sync dispatch is a horrible idea and jQuery promises are infamous for this. I've personally had to deal with several such situations with jQuery promises (that exhibit this behavior)... it's definitely not a 'non issue'. — Benjamin Gruenbaum just now
 
@FlorianMargaine you do that in Haskell too
 
@dystroy
 
you just use regular language constructs, not metaprogramming
 
smalltalk.speak();
 
@BartekBanachewicz then it's not a DSL if it's just haskell
 
1:25 PM
can someone please confirm, am I talking too much shit today?
 
@FlorianMargaine it's an EDSL
 
@BenjaminGruenbaum I'm sure you know, but it irks me, so could you change the "common" to "come on"? :p
 
@AwalGarg yes
 
@FlorianMargaine Haskell is amazing for DSLs
 
E being?
 
1:25 PM
Embedded DSL
 
@SomeGuy fair point.
 
a DSL using language constructs.
 
I'll have to look that up
 
@FlorianMargaine remember you have type classes in Haskell, a lot of things that normally don't "feel" like metaprogramming.
I admit I'm pretty bad at writing lisp macros when I tried to.
Here is LINQ in Haskell btw @FlorianMargaine
39
Q: What is the "Free Monad + Interpreter" pattern?

Benjamin HodgsonI've seen people talking about Free Monad with Interpreter, particularly in the context of data-access. What is this pattern? When might I want to use it? How does it work, and how would I implement it? I understand (from posts such as this) that it's about separating model from data-access. How...

"Free Monad + Interpreter"
 
@AwalGarg refresh page -_-
 
@BenjaminGruenbaum a simple example
say, you have a list of commands that you look up every time a specific event comes up
and when a command is called, its function is called
 
@C5H8NNaO4 The real reason would be "stupid", no ?
 
so you can add a command to a list of commands
 
@FlorianMargaine that question I linked to is an example of building a DSL with Haskell, the answer is fair and I remember that question from when it was featured positively.
 
1:29 PM
(defvar *commands* '())
now you need to add the command and its function
 
(push *commands* #'(lambda () ;; do something))
 
I don't get the problem yet, sorry.
 
@AwalGarg ok....
 
@FlorianMargaine yeah that can be done even in C
 
1:30 PM
you have a request handler managers
a "command" is a request handler
 
@towc should I tell you the bug in your game despite your security fix?
 
@dystroy Indeed :( We should request that reason.. Could be an often needed one
 
@AwalGarg well... I guess you can still use the profiler to change variables...
 
hm, that's a bad example...
let me find something worth it.
 
@towc that's pretty nice man
I like the art, did you do it yourself?
 
1:31 PM
@Mosho everything but the background (which is the only nice thing)
 
meh, let's go with it
(defcommand "route"
    (;; do something))
 
@towc oh :P
 
@towc not required... you don't call your callbacks properly. refresh, switch tab, and let go. the window is now not in roll, and the score and coins will keep going... thats what I did ;p
 
a macro can let you write this instead of the push
 
@AwalGarg hmmm... I have a fix for that too :P
 
1:32 PM
(defmacro defcommand (route &body body)
  `(push *commands* #'(lambda () ,@body)))
 
@towc cookie first... ;p
@towc I guess, this would be my first JS discussion which resulted good... and the bot last night... js seems to be liking me now
 
@FlorianMargaine why should that be a macro?
 
@AwalGarg try now
 
what's wrong with a function?
 
@BenjaminGruenbaum: There's no harm in dequeue being (in effect) recursive (it doesn't call itelf, but it causes itself to be called). In the end, if you handle the same cases, our solutions end up being about the same level of complexity (see fiddle in comment on your answer). But if you don't need the guarantee, and you don't need to know when it finishes, your inliner is much simpler. (And yeah, jQuery really did not get promises very right... I've seen worse, but...) — T.J. Crowder 54 mins ago
:lol:
How are they at the same complexity?
 
1:34 PM
3 mins ago, by Florian Margaine
hm, that's a bad example...
:(
 
@towc seems to work... should I go for more?
 
My solution is 3 lines of code, his solution is like 20 and has recursion and setTimeout...
 
@BenjaminGruenbaum I just got here what are you guys comparing?
 
@AwalGarg you mean that the bug was fixed or that it wasn't?
 
@mrzepka promises code
 
1:36 PM
Totally not the same level of complexity
 
I'm just ranting here because I try to not be impolite in main
 
@AwalGarg perfect
 
@BenjaminGruenbaum oh. recursion is fun, but not really good for complexity's sake
 
I'll give you a cookie as soon as I find a cool way to do it
 
1:37 PM
@BartekBanachewicz it's a bad example in the sense that it doesn't explain well macros over functions, not in the sense that it's not used
 
@towc you can put it into the next rocket of NASA going to Mars. I'll tell my friends there to ship it to me...
 
@AwalGarg good idea
 
@towc they keep teleporting martian ice from there to me... martian ice is good for health.
!!afk
 
Ah cool. I can talk
 
@JonathanTodd 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.
 
1:40 PM
Right.
 
i got a question again..... some webpages asks for user's confirmation when we try to leave the page, is there any java-script code (greasmonkey) which can block it?
 
window.onbeforeunload = null;
 
1608 I think I'm king @towc
 
@mrzepka what did you do?
 
@towc pressed space a lot
you should look into making it so you can't hold the space bar down
 
1:42 PM
In Node.JS, I'm attempting to use fs to load a file from the working_directory/movies/, but since the module calling the file is in working_directory/custom_modules/, fs searches for the movie in working_directory/custom_modules/movies/. Any ideas?
 
or having something so someone can't sit at the top of the screen
because the angry ducks don't come near the top often enough
 
@rlemon wow! You are like an encyclopedia of JS.!!! Thank you a lot, i wasted hours on window.alert = function() {}; which is actually meant for alert boxes :D
 
@mrzepka even if you sit atthe top of the screen you can still loose
 
@towc yeah but you can get pretty far
 
@FlorianMargaine well
 
ASR
1:44 PM
hi can any one help me, this is my fiddle jsfiddle.net/X5NgG i want to use same style for all lniks, based on links content it should apply the style, right now all i have done static, now i want to make it dynamic
 
!!tell NokImchen google some webpages asks for user's confirmation when we try to leave the page, is there any java-script code which can block it
 
@ASR first, try to see what is wrong with $(this).attr("id")
 
why yes, I did just paste what you posted here into google
 
I'm looking through the fs documentation, but don't see any way to search the working directory for a file. Any article, question, idea, etc would be super.
 
ASR
1:46 PM
@rlemon i did not understand
 
@ASR Dat gravatar O_o
 
ASR
means?
 
your image
Looks sort of like, ehm
 
Every Gravatar looks like a swastika. Get over it.
 
Every one?
That is the first one I 've noticed that even looks sort of like it
 
1:49 PM
Every swastika looks like a Kendall Frey
 
But sorry for upsetting you
 
every one
 
@BartekBanachewicz got a better example.
 
And swastikas aren't bad just because Hitler liked them.
 
alrighty then.
 
1:49 PM
Every object that is small enough, roughly square in shape, two-color and has a C4 but not D4 symmetry looks kinda like a swastika
 
@BartekBanachewicz you have the IF function, which works this way: (if cond form1 form2). If condition is verified, form1 is applied, if not, form2 is applied
 
ASR
@rlemon there?
 
yes
 
@JanDvorak I see O_o Never noticed that, I'll look out for more swastikas to point out, yay! /s
 
Also, ASR's swastika is left-handed. Yours, @JonathanTodd, is right-handed. Hitler used the right-handed one.
 
1:50 PM
now let's say you want to write the when function, such that you call it like this: (when cond form)
and form is only applied if cond is verified
 
if you figure out what is wrong with $(this).attr("id") then you have a better chance of seeing the fault in the rest of the js code
I'm not answering your original question. I'm just nit picking your code.
 
@rlemon too much jQuery?
 
ASR
@rlemon seeing that one
 
you can't just write (defun when (cond form) (if cond form nil))
 
@JanDvorak good point, wrong way round... I'll stop talking about it
 
1:51 PM
because form will be evaluated
(when (< 1 0)
  (princ "yay'))
the princ call will be evaluated, right?
 
you're talking about impure, nonfunctional code
 
let me keep going.
 
"evaluation" is a weird concept in Haskell
 
if you want this to work using functions, you could go at it like this: (when (< 1 0) #'(lambda () (princ "yay")))
and the when function would be written like this: (defun when (cond form) (if cond (apply form) nil))
but it is not really convenient.
 
haskell is referentially transparent
there's no difference between a function "call" and a function value
 
1:55 PM
instead, you can write a macro like this:
 
yeah I get it more or less.
 
 (defmacro when (cond form)
  `(if ,cond ,@form))
it's all about evaluation
 
and it's a problem that's nonexistent in Haskell
 
since macro "evaluation" is done at compile time
how do you pass a callback in haskell?
 
@FlorianMargaine you mean pass a function?
It's extremely common in Haskell, as is partial function invocation.
 
1:58 PM
@FlorianMargaine you're thinking in wrong primitives
you're used to impure code that mutates things
haskell is not only lazy by default, it's pure by default
 
I guess :|
I don't know what that means then
 
functional purity means that there's no difference between what you call "evaluating" a function and "quoting" a function
 

« first day (1377 days earlier)      last day (3576 days later) »