« first day (1587 days earlier)      last day (3371 days later) » 

3:00 PM
@Joseph because html() returns a string
 
you are calling .text() on the return value of .html()
 
The thing is - SQL databases have a very strong logic foundation anyway, and DBs use logic in optimizations all the time (the logic is formed based on useful axioms and lets you deduce cool stuff).
 
i am trying to remove remove HTML tags with .text() function
 
crl
call .text directly
 
call .html() OR .text(). not both
 
3:00 PM
ok
 
calling text or html without arguments won't remove anything...
 
@BenjaminGruenbaum I read about Armstrong's axioms while studying knowledge representation in AI.
That, and also weak slot and filler structures. Reminded me a lot of prototypal inheritance in JavaScript.
 
Well, I once brought Richard Feynman coffee.
 
@BenjaminGruenbaum BTW, a while ago I wrote a library for relational algebra in JavaScript: gist.github.com/aaditmshah/e2f746cffa2c5b16ecd6
 
3:04 PM
@cr what about:
fs.copyFiles('./temp', '../../foo');
 
I wanted to optimize it so as to implement functional relational programming in JavaScript.
 
@AaditMShah to be fair I've played a lot with logic representations in AI (In multiagent systems and AI courses) and I was not very impressed. It did remind me the deduction in armstrong's axioms though.
 
Then I decide to postpone it until I completed my functional supercompiler.
 
@AaditMShah if you wanna do something really cool - compile Ramda code to SQL
 
3:06 PM
@BenjaminGruenbaum How would you compile Ramda code to SQL? Do you mean to create a query optimizer for Ramda?
 
@AaditMShah we really need a LINQ like interface in JavaScript - current day JS ORMs are really bad.
@AaditMShah Ramda is like underscore but actually functional.
Curries by default, data last and so on.
 
@Luggage what does that lib give me to make mine work? ../ in path?
 
so, like lodash? :)
 
@Luggage lodash is like underscore but marginally faster. Wait, lemme find the lecture
 
@SuperUberDuper t gives a method that copies a directory, for one
 
also does chaining right, has more feaures, too
 
I am not too fond of Ramda syntax and functions like useWith. I have spoken to Scott Sauyet in the past to change it, but he doesn't seem to agree with my views: github.com/ramda/ramda/issues/732
 
basically underscore with some missing bits filled in
 
most importantly, lodash has tests and reports coverage
 
Ramda is a nice functional programming library but still leaves a lot to be wanted.
 
3:10 PM
@AaditMShah the point is: compiling declarative function compositions to SQL
So you can write functions but get db stuff to run.
 
Is anyone here good with SQL? I would like to return the user if at least one(can be more) of the fields match with the requested.
 
@GabrielTomitsuka so use OR?
 
@BenjaminGruenbaum So you essentially want to compile JavaScript to SQL?
 
If I did an OR, and both fields match, would it send them anyway?
 
@AaditMShah I essentially want Erik Meijer's LINQ
@GabrielTomitsuka Yes, in mathematics and programming - or means "if one matches, or the other matches or both"
 
3:12 PM
Oh ok. Thanks
 
@GabrielTomitsuka or meaning "if one matches or the other but not both" also exists - it's called xor - or exclusive or.
 
Alright. Create a database connection and then manipulate the database using Ramda.
 
What was that library someone posted yesterday.. for readin JS functions
 
@BenjaminGruenbaum That's what XOR means... Thanks.
 
@AaditMShah Yes, although Ramda is lacking in that it's not lazy enough but that can be fixed I guess.
 
3:15 PM
 
@Luggage yes, that was me and it was the same context - although if you do acorn + Ramda -> knex it could be really nice.
I want to be able to write free code though, not just Ramda calls. Ramda calls would be a start.
 
What about string-based query languages, like HQL
Not as sexy, but usable in any language.
 
@BenjaminGruenbaum Do you know how to create complex GitHub search queries?
 
Did anyone here used the Node.js module called Sequelize?
 
I've played with sequelize, but am no expert.
 
3:18 PM
@Luggage I want my code to not care if it's running against a local array, a relational db table, an external json file, redis or whatever.
Personally in Node I just write SQL.
 
@GabrielTomitsuka @darkyen00 did
 
I jsutuse knex whichi is not much different.
 
Nice. I'm doing a few experiments with it.
 
I came up with the transaction syntax for Sequelize but I admit I haven't really used it very much.
 
@FlorianMargaine And why did you stop?
 
3:19 PM
HAMMERTIME!
 
@GabrielTomitsuka @darkyen00 did, not me.
 
@CapricaSix Excuse me? (Yeah I know she's a bot)
@FlorianMargaine Oh sorry.
 
GitHub Search reveals 1.9 million results for reduce and 0.2 million results for reduceRight for JavaScript.
 
halt
 
HAMMERZEIT!
 
3:20 PM
@AaditMShah 0.2 million uses?
Who's using it?
 
Just one crazy guy. A lot.
 
people using reversed linked lists, of course
 
@Shmiddty Woher kommst du? LOL
 
@BenjaminGruenbaum Everyone seems to be implementing it. Nobody seems to be using it.
 
@FlorianMargaine I feel like that's not a thing.
 
3:21 PM
So I have an object with a bunch of properties. I can take a look at this object in the console and click the little triangle and see all the properties and their values.
 
@AaditMShah haha, priceless. Yeah - it's everywhere but no one is using it.
I wonder if this is esdicuss worthy.
 
to get function count up on your library :)
 
but for some reason when i do "object.prop" in the console it comes up as undefined.
 
@GabrielTomitsuka i hate it
 
3:22 PM
@GabrielTomitsuka Colorado
 
even tho i just saw the prop exists AND it has a value. wtf?
 
@AaditMShah yeah. I had to implement it in github.com/Ralt/iter-shims because @copy asked for it iirc
 
when i used it it didn't allow fkey constraints
 
anyone know why i might not be able to access the property?
 
was enough to make me go off and write direct sql commands
 
3:22 PM
@Shmiddty Und wieso sprichst du auf Deutsch?
 
@Bubbas sandbox environment?
 
+ logged the work it was doing.
 
this is in production
 
Its good, very redable but when i used it it was crappy
 
Are you sure you are refering to the same object and the scope in which you log it isn't different than the console?
 
3:23 PM
scope blocked?
 
@GabrielTomitsuka nein. I know a phrase or two, but I can't hold a conversation
 
I'm going to keep guessing random ass shit until you post some code by the way
 
well in terms of scope. im doing this manually at the moment in the console
 
so i figured scope shouldnt be an issue
 
3:23 PM
scope can block you
if the object isn't in the global scope you can't access it from the console
!!> (function foo() { var a = 1; }()); a;
 
@rlemon "ReferenceError: a is not defined"
 
even tho i can just type the object's name and it will then show me all the prop's and vals?
 
the console.log(object); that shows the property is done in the console?
 
1 min ago, by rlemon
I'm going to keep guessing random ass shit until you post some code by the way
 
while im testing, yes
ok - so scope. let me take a finer look
 
3:25 PM
why not post your actual code and then we can probably identify the problem in seconds instead of guessing like mad fools
 
basically this:
Report = Report[0];
ReportGroupId = Report.ReportGroupId;
 
@BenjaminGruenbaum We should create a post on esdiscuss to determine whether it makes sense to keep reduceRight around.
 
Report[0] is coming from XMLHTTP/response/parsed json
 
@AaditMShah you can't remove it now, but you can avoid introducing it into new collection APIs and such
 
3:26 PM
(function isJSEnabled() { 'use strict'; console.log('yes!'); }());
 
That would be valid, right?
User.findOrCreate({where:$or: [{username: username, email: email}]}, defaults: defaults})
 
@FlorianMargaine I figure it's the same reason for everyone. We need to implement it because it's documented on MDN, so it's reasonable that people will expect to see it in the API.
 
Who wants to be caught in public WITHOUT a reduceRight()?
 
@AaditMShah it was never added to bluebird and no one ever asked for it.
 
reduceMiddle()
 
3:29 PM
@BenjaminGruenbaum I hope JavaScript native prototypes are cleaned up one day. GHC 7.10 plans to make major changes to the Prelude: yesodweb.com/blog/2015/02/awesome-haskell-community
 
Yeah yeah we've all heard the big news
 
It would be nice to see similar developments in the JS community.
 
JS isn't versioned
It has a much much much harder deployment target and it's a moving one.
Haskell is effectively just the GHC.
 
That's unfortunate.
 
> The awesome Haskell community
has never been discovered, just like a practical application for Haskell itself
 
3:32 PM
posted on February 19, 2015

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} New bonus comic exclusively at The Nib!

 
no need with js. you can write how you want. Promises and 6to5? ok. coffeescript and async.js? Umm.. ok, sure.
 
@ssube xmonad is a practical application of Haskell. So is pandoc, yesod, warp, parsec and lots of other packages.
 
I get the impression Haskell was created for the opportunity to create new words for familiar concepts, rather than to make a language :P
 
@AaditMShah well, JS is a lot less global namespacey than Haskell - also - abstract references are coming in ES7
 
pandoc, something I actually use.
 
3:34 PM
@KendallFrey isn't that the definition of making a language, though?
 
@KendallFrey thats how I feel about Angular as well.
 
Haskell started in academics but I can't argue it's not practical since I use it at work sometimes.
 
I do all sorts of useless things at work. That's no argument.
 
@ssube "operator precedence" has a familiar meaning in many languages, but in Haskell it's a subset of "fixity"
 
python strikes me as being kind of academic
 
3:35 PM
@KendallFrey but creating new words for existing concepts is like the definition of creating a language
 
@ssube The words are in English, not in the new language
 
I know it is used for web application development, but I have yet to come across a situation in which I tell myself, "Hmm, python would be best to use here"
 
The language I'm making just has operator competition. It's precedence of the fittest.
 
0
Q: How can I add an event for a one time click to a function?

Adam PiperI would like to add a click event listener to a function but would only like it to happen once. How could i do this? I would like to stay clear of JQuery as well if it is possible please.

 
I heard functional languages are good for making parsers, but I'm trying to roll my own parser in Haskell and can't figure it out.
 
3:36 PM
> How can I do X without jQuery?
> First comment: use jQuery
 
@KendallFrey That's only because English is not descriptive enough for programming languages. Think of the noun "transducer". There's no good alternative for it in English.
 
Sure, every language is good for making parsers, if you have a parser library -_-
@AaditMShah Most people use words like "speaker" and "microphone"
 
And if not, just get an AST from an outsid eprogram.
ohh, parser, not compiler
 
@KendallFrey That's totally different.
 
I get it, now.
 
3:38 PM
@KendallFrey Building a pratt parser in Haskell is easier than building it in JavaScript.
 
what is a pratt parser
 
It's a top down recursive descent parser which can easily parse infix expressions.
Normally recursive descent parsers can't handle left recursion.
 
I don't care how it works, as long as it's :: [Token] -> AST
 
Pratt parsers fix that. It's like Dijkstra's shunting yard algorithm, except that instead of maintaining an explicit stack you make use of the call stack.
 
oh man, Recursive Descent would be a great programming horror movie. No matter how far you go, the conspiracy has another layer.
 
3:41 PM
Indeed it's of the type [Token] -> AST.
@ssube Most hand written parsers are recursive descent. If I am not mistaken GCC uses a recursive descent parser.
 
@AaditMShah I both know, and don't care, about that.
 
@ssube How many saw movies are there now?
 
I'd rather have a horror movie than GCC, despite their myriad similarities.
2
@Shmiddty not sure, I got sidetracked with Repo! The Genetic Opera and The Devil's Carnival and lost track.
 
Anyway, @BenjaminGruenbaum thank you for your feedback. Now I know for certain not to implement reduceRight in my API.
 
!!> var a = 'cheese', b = '42'; '${a} + ${b}'
 
3:46 PM
@towc "undefined"
@towc "${a} + ${b}"
 
why doesn't it return 'cheese + 42'?
 
You used single quotes, rather than not-tildes.
 
@towc you want template strings, es2015.
 
!!> var a = 'cheese', b = '42'; ${a} + ${b}
 
@ssube "cheese + 42"
 
3:47 PM
@ssube you mean backticks?
 
oooh! on my screen they look exactly the same in the SO chat
 
Also called quasiquotes
 
and I thought that the things from a few tutorials where just ' in a weird font
too bad I can't easily acess them from my keyboard, I'll have to rebind something
 
Good morning Sheeple
 
@SterlingArcher I REMEMBERS THE GOODS
sitting on my desk right now
took a picture AND my phone crashed
 
3:50 PM
@towc you don't have a backtick on tilde?
 
@ssube I don't even have tilde
 
hwat?
 
I have to copy it everytime I want to use it
 
what kinda crazy keyboard are you using?
 
3:51 PM
Change keyboard layout to US
 
@rlemon italian keyboards are the worst
@copy some letters and other stuff above the numbers are in different order
but I should change before it's too late
 
what?
 
!!go or not go
 
@towc go
 
you don't have any of the good keys!
 
3:53 PM
@towc You don't look at the keys anyway, do you?
 
gif from rlemon was moved
 
time to get a new keyboard
 
@copy no, I don't, but I'd have to mentally reconfigure my way of typing
 
I want that rainbow-y razor, mechanical one
 
@towc That doesn't take too long
And while you're at it, start using vim: yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively
 
3:55 PM
@AaditMShah keep doing awesome things! What API is that?
 
@rlemon xD I can't wait! I left my vape pen at home by accident, and almost locked my keys in my car at the metro. Today is already not my day lol
 
@copy I was once using a french keyboard (azerty), it took me quite some time to change to the italian layout. Now that I'm so used to it I'm not sure I can be as efficient with a different keyboard as I am now before a few months
 
@SterlingArcher yesterday was that for me
sorry for the shakey cam
 
@towc Better than copy-pasting backticks
 
How does Caprice JS work?
 
3:56 PM
the white box is the battery
couldn't find the original box for it
 
@towc You say that as if you were so old it were too late to learn...
 
the metal ring is a 'vanity ring' it goes between the mod and the atty to make it flush
 
> "Besiege"
 
@GabrielTomitsuka Javascript :P
 
@towc I'm used to the italian keyboard, but on occasion I need to type on a chinese computer, which incidentally has the same as an american keyboard.. takes me a few moments to readjust my bearings
 
3:57 PM
gif from Sterling Archer was moved
 
@rlemon Just browser JS?
 
What's that on the bottom right? A soda?
 
yes
@SterlingArcher empty beer bottle :P
not drank at work
 
Y U NO BANANA FOR SCALE
 
3:58 PM
No jQuery or anything like that, though?
 
@GabrielTomitsuka god no
 
U mean @CapricaSix isn't a jquery plugin ?
 
3:58 PM
Cap uses jQuarry
 
@dystroy $.CapricaSix({attitude: bitchy});
 
s'tru
 
@dystroy kind of?
 

« first day (1587 days earlier)      last day (3371 days later) »