« first day (1125 days earlier)      last day (3822 days later) » 

10:00 AM
ehm
 
I should reread the tutorial
 
(defun hello ()
  (map #'odd-p
       'sym))
@JanDvorak does that make the indentation clear? ^
if you need multiple arguments of a function call, you align them
otherwise, 2-spaces
 
but the form is an argument for defun
 
you align arguments if you need to split them into multiple lines ofc
 
Hi, I am a bit confused about how for loops interact with JSON. If I understand correctly JSON data is automatically an object, but I don't understand how it is stored when I am iterating though. Here is a bin (jsbin.com/EXizaLIF/1/edit?js,console) . I want the var url to be an array or object which I can access with with url[1] style notation. I have tried a few things but I can never access a single url. Can anyone help?
 
10:02 AM
then yeah, use 2 spaces if it starts with a form
 
; like this?
(my-construct arg-1
              arg-2
              arg-3
   (progn
     (step-1)
     (step-2)
     (step-3)))
(assuming I do want to line-break between the arguments)
 
hi there;

i found this project for creating rpg games: http://rpgjs.com/

do i understand correctly that the basic idea is to use the <canvas> element to display stuff and image-loading, animation and user interaction stuff is done via javascript and nothing else?
 
@user2422960 define "nothing else"
@jonahfree look up "$.when" to wait for multiple events
 
@JanDvorak
i mean, the whole game is coded in javascript and nothing else is needed? i remember such in-browser games as java applets or even flash
 
@user2422960 a lot has changed in the last 2 years
 
10:07 AM
@user2422960 yep, no plugins
also, I haven't seen new java stuff in months
 
i want to understand how that actually works. i assume, i should go for learning about canvas in the first place. i played around a little months before but never got any further than creat a tiny blue box. where should i start when i'm interested in simple animation via keyboard interaction?
 
@user2422960 canvas is a nice way to manipulate graphics. It doesn't facilitate timing, however
requestAnimationFrame for animation, and a keypress or keyup/keydown handler to manipulate variables the animation loop reads
> Each special form has its own indentation rule. Here, we give a list of the most common ones.
oh.
 
@JanDvorak cough requestAnimationFrame cough
 
@phenomnomnominal fixed, thanks.
 
@user2422960 There's even a fully functional html5+js gameboy emulator on the internet somewhere. Can't currently find the link, though
 
10:15 AM
so i can basically say that the canvas shows a static image while my script updates and manipulates this image?
that's amazing. i've seen even an ego-shooter which runs with around 35 fps
 
aka how every computer works
forget gameboy, at mozilla they've got unreal engine 3 running in pure js at 30fps (i think, maybe it was 60? maybe less.)
 
Well, that would be very cpu-intensive to actually manipulate the image realtime, but it certainly is possible.
A better guess would be to use sprites with defined keyframes (based on x and y offsets) for "animation"
 
@user2422960 correct. Most often "updates" starts with "paints a solid rectangle over"
 
@phenomnomnominal yeah, but that was WebGL instead of canvas, though
 
WebGL is still canvas
 
10:17 AM
^
 
just a different drawing context
 
When does Quake for Firefox come out? :-)
 
pretty sure it's out
 
FireQuake?
 
QuakeLive
though that runs in unity, I think?
 
10:18 AM
I've seen a 3d FPS using only CSS transforms
 
How would that even work?
 
basically with a whole bunch of divs tansformed
aka a whole lot of dirty dirty hacks
 
+------------------+
|tn=co             |
|p+=1              |
|=j1               |
|=+                |
|f          #  ##  |
|           # #    |
|           #  ##  |
|        #  #    # |
|         ##   ##  |
+------------------+
 jsstyle.github.com
 
Yeah, that's what I figured, but wouldn't it perform horribly?
 
10:21 AM
Why does it actually show the other users' percentages during the selection, though? Wouldn't that greatly influence the choices they make?
 
@Kippie not really. Depends on how much you draw. 3D transforms map pretty well to GPU
and you don't need to rerender the textures, meaning the GPU only ever gets transformation updates
 
would anyone consider the MDN canvas tutorial a good one? or are there better starting points?
 
@user2422960 MDN in general is good
avoid w3schools at all costs
 
Didn't w3s fix alot of errors recently, though?
 
@Kippie like document.write in all their examples? No.
 
10:24 AM
Oh, they don't use console.log?
 
also, that
also, <br>
also, the lack of indentation
or proper naming conventions
 
@Kippie w3school is not community based so u have atmost 10 people updating stuff vs millions updating stuff
also people updating stuff on mdn get revised by better code / example / information
by better developers
developers
. developers
.. developers
... my Steve Balmer Moment ! <developers>
 
Comparison
Mixed, as necessary
WAT
 
they use AJAX errors as an example for the try..catch statement
@FlorianMargaine == null is perfectly fine
 
no it's not
 
10:29 AM
WAT?
 
@FlorianMargaine k == undefined
is
 
why would you need to have a cognitive load every time you read == because you know it's a bug pit?
 
@FlorianMargaine I don't consider == undefined a cognitive load
it's a useful corner-case
 
What I dislike is the fact that w3schools has got fairly high up in searches despite the fact its quite poor
 
10:32 AM
@FlorianMargaine is it correct that macroexpand doen't expand macrolets?
@vogomatix and in Web of Trust rankings (but WOT is a joke)
 
Well I don't think w3schools is untrustworthy, it's just that it is not a good site for learning HTML, Javascript or anything else for that matter
 
@vogomatix gogole
 
@vogomatix they have plenty of factual errors
 
A lot of sites have factual errors, but like you said the fact w3schools doesn't have any user input to correct those errors is the problem
being incorrect is not quite the same as being untrustworthy
 
@JanDvorak do you mean macroexpand-1? I've never used macroexpand
 
10:40 AM
Btw, the "Room Project", what exactly is it? Can you use your own custom implementation of a chatroom on StackOverflow?
 
and I never tried it actually
@Kippie no
@Kippie it's more a fun project for the regulars to work on together
 
i love the font !
 
At least it isn't Comic Sans
 
lol
I often feel Wifi and Mobile Network are waste of energy
but God Damn they are so useful
 
I think that productivity would rise 100% if we didn't have wireless and mobile
Go back to phones with dials is what I say
 
10:55 AM
@JanDvorak I'm not sure the "$.when" thing is what I need. I have updated the [bin] (jsbin.com/EXizaLIF/1) a little to illustrate my problem better. As you can see the JSON data is not being stored in an array. I have tried declaring the variable as an array and pushing the JSON data to it. I don't understand how JSON data behaves. It seems to be stored as a series of strings but with no way of accessing an individual one.
 
@vogomatix nay
i'd spend more time on facebook and twitter right now i have blocked them off my chrome (yesterday night) and switched to using them only on my iPhone
 
You can't go on Facebook and twitter with one of these
 
@FlorianMargaine macroexpand is supposed to expand recursively, but it always dumps me something with macroletwhen I expand loop. Should I feed it back?
@jonahfree Pushing data should work, but you need to pass the array only after it gets filled with data. I'll take a look at your code.
 
@JanDvorak thank you
 
@vogomatix neither can you use them properly from iPhone ;-)
and that pain is making me stay more in this room and work
 
11:01 AM
@AbhishekHingnikar Hahaha
 
@jonahfree You are calling postUrls once for each result. I'll write an example on how you could do it without $.when and with $.when
 
@AbhishekHingnikar What's that "room.tension = π"
 
:D :D @AbhishekHingnikar
 
@CJRamki pi, I assume
 
:-P Web pages would be so much less cluttered if they had to be sent through an acoustic coupling modem
 
11:02 AM
@vogomatix You would like Lojban
 
@CJRamki 3.141592653589793
 
oh, acoustic coupling, not actual voice
@AbhishekHingnikar What was RLemon's threshold, again??
 
@AbhishekHingnikar Why this line placed bellow to chat room name "JavaScript"?
 
@jonahfree scratch that "you need" part. I thought you fired multiple JSONs
 
..because even JavaScript developers like pie :-)
 
11:06 AM
@vogomatix really, Its interesting... How pie related to javascript?
 
vocaroo.com/i/s14RFunv0gfo @vogomatix @CJRamki @JanDvorak
 
@AbhishekHingnikar hearing the robotic voice, I think my own is still somewhat better
 
@AbhishekHingnikar I know something was played on that link. But I have no speaker facility in my system. Could you text that...
 
@JanDvorak i can do better with a proper mic
 
11:13 AM
@jonahfree check out now
 
@JanDvorak hm weird indeed. I never tried to macroexpand loop tbh, way too scary.
 
@FlorianMargaine I like assembler, so...
 
hahaha
then try (disassemble #'fn-name) :P
 
does that work for macros?
 
not sure
try it
 
11:15 AM
Disassembly of function LOOP
(CONST 0) = #<SYSTEM-FUNCTION ATOM>
(CONST 1) = SYSTEM::EXPAND-LOOP
(CONST 2) = "LOOP-"
(CONST 3) = BLOCK
(CONST 4) = TAGBODY
(CONST 5) = GO
2 required arguments
0 optional arguments
No rest parameter
No keyword parameters
25 byte-code instructions:
...
 
@FlorianMargaine my paste is for (disassemble 'loop)
[12]> (disassemble #'loop)

*** - FUNCTION: undefined function LOOP
The following restarts are available:
USE-VALUE      :R1      Input a value to be used instead of (FDEFINITION 'LOOP).

RETRY          :R2      Retry
STORE-VALUE    :R3      Input a new value for (FDEFINITION 'LOOP).
ABORT          :R4      Abort main loop
Break 1 [13]> abort
 
I get the same for disassemble 'loop
but I'm using sbcl on linux...
 
I'm getting a nice bytecode in the clisp console
but not when using #'
 
11:20 AM
k
 
@JuzzCoding where are u whne interesting stuff is being talked about in the room
 
I think sbcl is laxist there
I guess #' is only supposed to work on functions, not on macros
 
0     (LOAD&CDR&PUSH 2)
2     (CONST&PUSH 0)                      ; #<SYSTEM-FUNCTION ATOM>
3     (LOAD&PUSH 1)
4     (CALLSR&JMPIF 0 41 L31)             ; SOME
8     (CONST&PUSH 2)                      ; "LOOP-"
9     (CALLS2&PUSH 170)                   ; GENSYM
11    (CONST&PUSH 3)                      ; BLOCK
12    (NIL&PUSH)
13    (CONST&PUSH 4)                      ; TAGBODY
14    (LOAD&PUSH 3)
15    (LOAD&PUSH 5)
16    (CONST&PUSH 5)                      ; GO
17    (LOAD&PUSH 6)
18    (LIST&PUSH 2)
 
ah
does clisp compile to asm?
or does it compile to some kind of bytecode?
 
@JanDvorak thank you. i don't understand where the iteration happens in the es5 example, can you explain?
 
11:22 AM
@FlorianMargaine i have an intruiging question , @Esliaja
is there any way you can sniff the opcode generated by your browser ?
any --flags or something ?
 
@jonahfree the map method of arrays does implicit iteration and collects the return values
 
i wanna read how much of a beauty v8 generates :D :D
// and also spidermonkey and compare em :P
 
@AbhishekHingnikar download v8, compile it
then you can run some code and disassemble it
 
@jonahfree map calls the function for every element of its context
 
no in browser itself
i know about building v8 from source
 
11:24 AM
then not afaik
 
i wish to do it for both node.js and chrome
 
@JanDvorak i did not know that. thank you, very clever. if you have a second could you also explain what your thoughts were with $.when?
 
it'd be kinda super cool :P
 
@jonahfree When you fire multiple AJAXes in a loop, you get multiple events. You can collect those in an array as promises, then do $.when.apply(promises).then(function(args){...})
 
$.when.apply(promisies).then yuck
i mean friken look at that
 
11:28 AM
haha
yes i am staring at it now
 
there needs to exist promises.then(function(args){ });
abstracting that !
something like promise collection
 
hi
 
@Neil hi
 
I am not good in jquery and want to create a custom light box with preloader, the problem i am facing is that i am not able to apply the preloader on light box it is applied on page.
here u check the live example: jsfiddle.net/6tx8h/2
does some has solution..
 
@AbhishekHingnikar i'm completely lost. i have lots of reading to do.
 
11:31 AM
@AbhishekHingnikar $.when returns a promise that resolves when all constituent promises do. It's a vararg function, however, thus the apply
 
@JanDvorak thanks, i need to read into it more. i feel very comfortable with es3 version. i was only using .each because it was used in another example. i like you es3 one a lot but it's also good to know about the es5. as for $.when it's gunna take me a while to get my head around that.
 
@jonahfree an alternative to $.when would be to collect the results in an array, count how many callbacks are left, and call the handler when there are none.
 
@JanDvorak ahh ok that makes much more sense. i got it in theory now.
 
@JanDvorak i know my love
but my dear friend it just looks fucking horrible to read
$.when.apply(<array>).then(<callback>)
yuck
 
$.whenAll = function(p) { return $.when.apply(p); };
2
there, you can use $.whenAll(promises).then(fn..)
 
11:38 AM
@jonahfree $.ajax returns a promise that resolves when the response arrives. $.when returns a promise that resolves when its constituent promises resolve. A promise is an object where you can attach event handlers.
@FlorianMargaine meh. $.whenAll = Function.prototype.apply.bind($.when)
 
@JanDvorak Started writing this. Then thought: "should I really confuse him even more?"
 
True, true
 
@FlorianMargaine there is a reason why i love you florian :P
 
i am staring at everything that has been written
 
or i should say your style :P
of writing code :'P
and this is the wrong tab :P < COMON BRAIN U ARE NOT ON FACEBOOK STOP STICKING TONGUE OUT >
 
11:40 AM
@FlorianMargaine doesn't your badge say "polyfills only", however?
 
@JanDvorak since when is jQuery a host/built-in object?
 
@FlorianMargaine My rule is "don't touch objects you don't own". You don't own jQuery more than you own built-ins
 
jQuery is made to be extended though. Look at jquery plugins...
 
I'm going to test the rule "the page owns everything" and extend built-ins freely
 
... that's not the same?
 
11:43 AM
I wouldn't extend jQuery from a module
I'm gonna try "extending prototypes FTW (except Object.prototype)"
 
@JanDvorak but every single jquery plugin does that...
and the $.whenAll is a jquery plugin, if you ask me
 
@FlorianMargaine I mean, from a module that isn't that plugin
 
I'd say it depends
you can write modules that are plugins
 
I mean, "don't force your utility functions to everyone without actually providing them as part of your functionality".
Also, jQuery plugins go by the way "one function per plugin" to avoid namespace collisions
Unfortunately I have to leave now, but we can discuss the topic of extending builtins later
bye
 
@JanDvorak ok so i now understand what you mean by * $.ajax returns a promise that resolves when the response arrives.* but i don't understand what you mean by constituent promises?
 
11:50 AM
@jonahfree the promises you pass as arguments to $.when. Not an official term.
 
@JanDvorak oh so $.when will resolve when the promises it waiting for arrive?
*it is waiting
 
@JanDvorak $.when gets rid of some of the problems with asynchronous calls by not letting that part of the program move forward until it has the info it needs?
 
@AbhishekHingnikar Thanks for you chololate
 
@AbhishekHingnikar Thanks 4 u cholatatl
 
12:01 PM
:-) i am happy a lil
 
What is the origin of that chocolate?
 
did anyone in here ever use "jwPlayer"?
 
12:17 PM
well , i was just wondering to build an app/software that can control all our home appliances at once through our Computers. Is that possible? Or is there any existing??
:\
 
well, there is stuff like that, yeah
 
@GNi33 any link ??
 
!!live
oh well
Home automation is the residential extension of building automation. It is automation of the home, housework or household activity. Home automation may include centralized control of lighting, HVAC (heating, ventilation and air conditioning), appliances, security locks of gates and doors and other systems, to provide improved convenience, comfort, energy efficiency and security. Home automation for the elderly and disabled can provide increased quality of life for persons who might otherwise require caregivers or institutional care. The popularity of home automation has been increasin...
Home Automation would be some kind of collective term for this
 
12:53 PM
@GNi33 hmm
 
Hi
 
Hello
 

« first day (1125 days earlier)      last day (3822 days later) »