« first day (1600 days earlier)      last day (3351 days later) » 

1:00 PM
Sometimes people who aren't idiots get replaced by people who are idiots and you end up working for them anyway.
 
anyway I think that the myth of "if you write out types explicitely that means you need to use static typechecking" should die, the sooner the better
 
@BartekBanachewicz actually curious, what is an example where you would have explicitly typed code and wouldn't want to do static typechecking?
 
Well a most notable example is implicit IO I suppose.
basically every use of unsafePerformIO uses the escape hatch from type system in Haskell
 
Guys if I am checking if a parameter is of type array, what should happen when I send undefined, null or NaN with my function?
 
so if you write a lot of such code, it might be better to make the IO implicit and pure annotation optional, so that that check is opt-in
 
1:04 PM
Seems reasonable
 
isArray: function (arr) {
            return arr &&
                typeof arr === 'object' &&
                typeof arr.length === 'number' &&
                typeof arr.splice === 'function' &&
                !(arr.propertyIsEnumerable('length'));
        }
 
@Vlad Any reason you want so many checks? You could just document what you expect and let the caller take care of the contract, instead of checking everything everywhere because that's such a huge hassle.
@Vlad Array.isArray?
 
this is from Doug Crockford
 
@RoelvanUden what if you could express the fact that the function works only on arrays in the language? :)
 
wait
 
1:05 PM
@Vlad function (val) { return val != null && !isNaN(val); }?
 
@BartekBanachewicz I'm quite used to static typing, thank you very much.
 
Ironically I think a lot of code in JS looks like what Vlad wrote
 
isArray is from ECMA5
 
with if typeof x ...
 
but ok I m using strict mode
 
1:07 PM
@Vlad It's 2015 you know. ECMA5 is pretty standard.
 
IE9 :)
 
gotta say, I don't hate TypeScript
 
@Vlad IE9 is ECMA5 too
 
@SecondRikudo I do love Haskell. Sue me.
 
@Vlad < 2% of people. Worry about them later.
 
1:08 PM
May 15 '13 at 22:00, by phenomnomnominal
Even MS know TypeScript is dumb
 
I have tests but they are failing when I send null, undefined and NaN
 
@BenjaminGruenbaum Hey fuck you :P
 
Aug 6 '14 at 2:40, by phenomnomnominal
Ugh. I don't like TypeScript
 
@BenjaminGruenbaum YES, I'M VERY CONTRARY.
 
1:09 PM
mary mary
 
I like typescript too that's fine :) I'd take babeljs with flow over it any day though
 
It's grown on me. I can see it's use at scale
 
ok gonna make a break, brb
 
@BenjaminGruenbaum seems like 6 of one and half a dozen of the other, any particular reason? Workflow?
 
CLASS EXTENDS FROM OOP
 
1:10 PM
@phenomnomnominal it extends JavaScript - so you don't really lose anything by using it since most people have a build step anyway - and it has interfaces which I always wanted.
 
@BenjaminGruenbaum you used the E word
 
@phenomnomnominal TypeScript is missing a lot of ES6 and ES7 methods that are really nice.
 
TypeScript will get there, though. Give it time. :-P
 
@BenjaminGruenbaum just methods?
 
I'd pick TS over Babel any day due to the type checking and interfaces.
 
1:11 PM
@RoelvanUden get where exactly?
 
Even though Babel is so fucking brilliant.
@BartekBanachewicz ES6/7 features.
 
you seem to be thinking its javaesque type system is perfectly ok
because, pardon me, "interfaces"?
 
@BartekBanachewicz I read "perfectly ok" but I think you just meant "perfect"?
 
@phenomnomnominal does TS have async/await yet? Babel does.
 
It's not perfect, but it's better than nothing, so yeah it is perfectly okay
 
1:13 PM
What about the module system?
 
@BartekBanachewicz It's fine. You just love to hate everything that isn't Haskell. Please don't.
 
Or abstract references
 
@BenjaminGruenbaum async/await is on 1.5, so, soon(tm). Modules, sure.
 
@BartekBanachewicz yes, interfaces - they define a contract to work against.
 
@RoelvanUden Haskell has nothing to do with it in principle. I am comparing features of languages, not languages.
 
1:14 PM
It pretty much boils down to everything that isn't exactly like Haskell is bad.
 
Nope, not yet! I'm about to convert tractor into babel though, so will be good to compare
 
@RoelvanUden you can import in TS?
 
@BenjaminGruenbaum yep
 
@BenjaminGruenbaum Of course.
 
sorry @RoelvanUden
 
1:14 PM
Oh, didn't realize.
Do generators work well?
I did TS but it was a while ago
 
@BenjaminGruenbaum No. Expected to be in TS1.5 along with async/await.
 
@RoelvanUden that's just a consequence of the fact that Haskell does a lot of the things right
@BenjaminGruenbaum same here
apparently it got tuples since then
 
no import { } = blah syntax though
 
@RoelvanUden so not yet, what about destructuring?
 
it also got variant at some point IIRC
 
1:15 PM
@phenomnomnominal oh? That kind of sucks
 
@BenjaminGruenbaum No. It's ECMA5 with some features. Most of ES6+ isn't in yet.
 
Yeah I assume they're gonna wait for "stability"'s sake
 
So no destructuring, no proper modules, no async/await, no abstract references
 
@BenjaminGruenbaum It's TypeScript, not ES2015Script :P
 
class Dog { woof() { } }
class Cat { meow() { } }
var pet: Dog|Cat = /* ... */;
if(pet instanceof Dog) {
   pet.woof(); // OK
} else {
   pet.woof(); // Error
}
aaaand flow typing
looks similar to Ceylon
 
1:17 PM
I think TS can do that now @BartekBanachewicz
 
@BenjaminGruenbaum yep.
 
That's the type guards from 1.4 indeed.
 
I am not a huge fan of flow typing
 
That's ok, you don't have to be a huge fan of stuff.
 
if becomes too magical for my taste
 
1:18 PM
Night gents!
 
that being said, it indeed seems that TS typesystem is evolving. @RoelvanUden with, no less, a lot of stuff you'd find in Haskell
 
@BenjaminGruenbaum You can also use it by converting stuff, e.g. github.com/Deathspike/crunchyroll.js/blob/master/src/subtitle/…
 
@BartekBanachewicz the more actual Haskell I write the less I enjoy the non-strictness defaults.
Debugging things 10 files back because they just got evaluated is so annoying :S
I think explicit lazy like Scala or through an attribute like Python or in specific obvious cases like LINQ is usually better.
 
@BenjaminGruenbaum cooooming
I am pretty sure there are people working on it intensively right now
 
It'd be another language.
 
@BenjaminGruenbaum no.
It's a matter of one extension you enable for a module and bam.
 
Can't wait for that to be here so we can stop using shitty Haskell and use a real language. Also a better typesystem.
And proper namespacing, and proper record/object syntax without shitty lenses.
 
yeah well I also wait for people to leave in peace and without hunger
record syntax should be kicked out alright
records should be defined with TH in the first place
 
And proper numeric type defaults that make sense, and type inference that tells you when you're shooting yourself in the foot by not being explicit.
 
1:25 PM
which you can already do...
@BenjaminGruenbaum um, what?
 
And error messages that don't just say arising from (500 lines)
 
@BenjaminGruenbaum do you have -ferror-spans turned on?
@BenjaminGruenbaum namespacing? You mean for instances?
 
@BartekBanachewicz there is no reason to have IEEE 754 doubles and Ints and strings as char arrays in a language today. It's just baggage.
 
@FlorianMargaine woah :)
 
@BenjaminGruenbaum what?
I can agree with strings, but floats?
I use them, and use them a lot.
 
1:27 PM
@BartekBanachewicz I mean namespacing mymodule.SomeData instead of stupid import qualified
 
How do you propose they get replaced?
 
Let's just have numbers and strings and slow software, but happiness and booze
 
@BenjaminGruenbaum what? (module system is broked alright)
 
@BartekBanachewicz why should you care whether they're double or int or float though?
 
@FlorianMargaine because it's important for the calculations I do?
 
1:28 PM
And for performance reasons.
 
@BartekBanachewicz why?
 
@BartekBanachewicz language should default to better precision floating point numbers and figure out precision needed - optimize to floats, kind of like how JS jits optimize double to ints. At least by default. When you do 3.2 as a literal it should not default to a type that does 0.1 + 0.2 /= 0.3.
 
don't you just want a Number?
 
@FlorianMargaine no?
 
1:28 PM
I'm not blaming haskell, it's old and shitty (and has good parts), I'm just saying that I'd really appreciate a new language that doesn't have 25 years of baggage.
 
@FlorianMargaine choosing a number type is a compromise between correctness and performance. I need to tune that.
@BenjaminGruenbaum by the time that languge gets tools and adoption, in a perfect scenario it will be at least 10 years old
 
@BartekBanachewicz it shouldn't. The compiler should choose the most performant-as-long-as-it's-correct number type
 
@FlorianMargaine what's "correct"?
 
Oh of course, by the time that language exists if Haskell will be successful it'll be like JavaScript.
 
Red?
 
1:30 PM
if you're not doing symbolic calculations, you're only correct to some degree
 
@NickDugger Meh, not a huge fan.
 
@BenjaminGruenbaum I find it to be intriguing, but I don't think I'd ever use it over the alternatives
 
@BartekBanachewicz the compiler can usually infer what degree you need to be correct to since it can figure out the possible error range of computation operations and use the smallest type that fits.
@NickDugger the Rebol room is super awesome btw, they're great people.
 
@BenjaminGruenbaum still doesn't solve the problem; GPU can't do that, and I want to be in line with GPU
to get 1:1 binary compat
even more important in Vulkan
I need to fill the bytes with the precise type of values I choose both in the rendering API and my logic
That's why I need exact floating point types and sizes
 
Vulkan? That cross platform thing that I just heard about while reading an article on source 2?
 
1:32 PM
@NickDugger aka GLNext
 
@BartekBanachewicz why not?
 
@BenjaminGruenbaum presumably you're the one supposed to make that choice
 
Well, Haskell doesn't do that but we're discussing an hypothetical non-shit language that's not 25 years old and is up-to-date on current inference.
 
Did you guys read that article about "ionics"?
 
@BartekBanachewicz And you will be able to make that choice if you're not satisfied with the one the computer made.
 
1:33 PM
but the GPU is outside of that
 
Why? Does the GPU compile your code?
 
the driver does, yes
your GLSL code
in Vulkan you're given GLSL -> SPIR-V compiler
 
The compiler can't tell what precision your arithmetic operations have?
 
@BenjaminGruenbaum In desktop GL it can, I think. In ES you have to be explicit.
 
1:35 PM
Well, one way to go around that is to write a compiler from Haskell (or language-X) to SPIR-V and use the same inference for both shaders and your logic. This is possible and should indeed solve the problem, at least partially.
@BenjaminGruenbaum ask ES spec designers.
Also you need to separate integers anyway because lenght [a] can never return 3.5
well, if you have dependent types you don't need a separate type, because integers are a strict subset of floats
 
1:51 PM
I could possibly make a function isArray(myvar) that will work if I send NaN, undefined or null, but should I be bothering? Is it going to be useful?
 
!!tell Vlad mdn array.isarray
 
yup
 
2:15 PM
is there a generic oauth package for meteor just for doing the generic flow of oauth?
 
@corvid Haven't got a clue about meteor, but passport-oath might work?
 
@RoelvanUden there's actually a passport package for the authentication I want... just not sure if it's usable in Meteor. Meteor abstracts the OAuth methods a lot
 
first google result: meteor.com/accounts
 
Long live frameworks that hide everything.
 
it's like the framework version of "job security"
oh you're using our framework? Now you're stuck!
 
2:20 PM
existential quantification is amazing
 
it's also not universal
 
it's fantastic, when it's already included... but otherwise gets to be kind of a pain
takes two seconds to set up oauth with github
 
2:36 PM
in PHP, 23 hours ago, by PeeHaa
when aptitude tells you it is going to remove the kernel and the system might become unbootable it isn't lying
cc @copy ^
 
user3949359
2:54 PM
Is a map in JS the same as an associative array?
 
@nosille Yes. A key/value store, a dictionary, an associative array, etc.
 
hello.
 
I want to try some node-webkit, do I need to know Node.js to know how to work with node-webkit?
 
P.M
3:00 PM
@Vlad
 
I mean core Node.js
 
P.M
yeah
node-webkit is node-js anyways
 
no you don't
you can use it perfectly fine with frameworks like express
 
@Vlad No. It's just a browser. You can use it just like a regular browser. If you want to use more than what the browser allows (read files?), you have to use nodejs stuff (including frameworks etc)
 
I meant can I develop cross platform apps withouth much knowledge of node.js except basic one.
 
3:02 PM
(Also, it's called nwjs now)
@Vlad Yes, you can.
 
@FlorianMargaine the allcaps was a nice touch
 
@NickDugger thank you. I pressed shift for that.
 
posted on March 04, 2015 by admin

New comic! Today's News:  Hey geeks! We're switching to a new server and changing the layout a little. If you experience any problems, please let us know.   Also, we have a new blogposting interface. So...     

 
mmm thanks. :)
 
3:07 PM
anyone familiar with chrome apps
 
I uploaded three apps on Chrome web store. What is the problem?
 
Not really a problem but im little confused about the concept. I need to port a website to a chrome app, do I need to write code from scratch or I can embed my existing system into the app
 
Is there anywhere you can see the most popular NPM tags, or recommended/standard ones?
@AhmedDaou depends on what it needs to access. Apps have stricter permissions than a normal site.
 
sometimes I see apps that link directly to a site @ssube
 
3:12 PM
npmjs has some kind of ranking?
 
@RoelvanUden not that I can find. Looking for a tag cloud in the bigger=more sort of visualization.
 
Good morning
 
we should rename it to iopm
 
I don't think most packages are aimed at iojs :P
 
Don't tell me facts
 
3:15 PM
@BenjaminGruenbaum dang, I guess I'm once again one of the days lucky 10,000!
 
@NickDugger opium
 
@RoelvanUden they should be compatible with both afaik
 
@KendallFrey iopium?
 
@rlemon it's en route! I hope they don't put the box in the rain or since it's raining delay the delivery :( I'm stopping by the vape shop after work to pickup a charger and then we can video chat!
I'll be 79% nude
 
@NickDugger hows it goin?
 
3:21 PM
I am 100% nude, but nobody can see it because my clothes are in the way
2
 
How cool would it be to work in a nudist office?
 
@KendallFrey heated ? If not it would be very cool.
 
oh it would be heated
 
@SterlingArcher :P
you should open it at work
I think that is a great idea
 
3:24 PM
lol I don't have the box yet but I totally would
#ReactionVideo
 
how awesome is it going to be when you open the box and it is @KendallFrey in a banana hammock
 
Do you guys know OmniRef ?
I've received this :
Hi,

I'm building a website for programmers that has comprehensive documentation,
Q&A and annotatable source code for open-source projects.

Since you're an NPM author, I wanted to reach out to get your feedback on
the docs we've rendered for your code, and to offer you moderation controls that
allow you to edit or delete comments on your project.

If you're not interested, don't worry -- you're not on a mailing list, and I
won't contact you at this address again. I'm using the address listed in your
But everything I read let me think it's a Ruby thing...
 
there's a big announcement on the homepage "we've launched a JS thing!"
 
Yeah, the title of the page still says "Ruby ..."
 
3:28 PM
Do you know them ?
 
So, these guys scraped NPM, and threw data on top of bootstrap, and they think that it has value? Ok, internet.
 
@NickDugger it might have
 
@dystroy nope
it's missing auto completion though imo
 
Hehehe it doesn't understand the packages I published at all.
 
it's like quickdocs for js... except it doesn't work much ^^
 
@SterlingArcher good for you :)
 
The last time I was here, someone shared a pretty cool link which helps you find a laptop by specs. Does anyone else happen to know what it is?
 
@rlemon I've seen that kind of thing lots of times :P
 
STILL FUN!
 
3:32 PM
I'll take that as no
 
@BenjaminGruenbaum Hmm?
 
sorry, typo
 
@AhmedDaou chrome apps are web apps in a container
By downloading a chrome app, all files from the site or app are downloaded on your machine, so can use them offline
 
3:35 PM
^ I love that one
 
@AhmedDaou try downloading entanglment game
 
imgur.com/gallery/nSRHOyQ this is a thing and i enjoed it
 
You can develop your web app and you need xml configuration file, or was it json, I cannot recall, where you set all basic stuff. You open a new app entry in you chrome developer dashboard and then you upload files
and ofcourse set basic info, screenshots, video etc...
 
@Vlad would it be just simpler if I use an iframe pointing to my webserver
 
You right I will need JSON because I realized I need to talk to my db
so AJAX request will be needed
 
@AhmedDaou not sure, iframe is again html, but you still need to open entry in chrome dev dashboard so your app will be visible on the Chrome store
 
Nobody uses XML anymore, it should be called AJAJ now.
 
@Vlad ok but what is the purpose of a chrome app then I fail to see the benefit
 
3:41 PM
developer.chrome.com/apps/first_app yes a manifest JSON file
 
is it just to have it in the store
 
can you guys see the link and the forum?
 
The benefit is to enable user to use your app offline and also without the need of a browser
when you press launch app it opens in a window separate from a browser
 
@SterlingArcher Disappointed to see zombies don't use air travel
 
I to was dissappointed lol
 
3:43 PM
Ofcourse people can vote for your app and tell you problems/bugs and give you feedback
@AhmedDaou try the replacement of Google talk, Hangouts
 
Looks like if the zombies break out in NY, I'll be infected within 2 days
 
I started it in PA I think, within half an hour all of NYC was gone
 
pocket is also awesome app
 
@KendallFrey which is a little unrealistic, since it takes like 3 hours to drive from one to the other
the zombie simulator is WRONG and BAD
 
hi all
 
3:47 PM
oh, my bad
i missed a zero
 
quick "easy" question please
 
it doesn't account for red lights and rush hour
 
within 1/20 hour
 
Also all chrome apps are placed in panel so you can access them with a click
 
@SterlingArcher that's super cool
 
3:48 PM
i have an array (ordered elements),
I need to call a $.ajax on each elements (in array order),
and on success I need to write the result in a div (text line)
I'm doing this this way :
 
@rlemon Oh man. [style]{display:none !important;} Seems like a really good idea sometimes
 
for(var i = 0;i<myArray.length;i++){
    ajaxFunction(myArray[i],function(responseFromAjaxSuccessCallback){
        writeInDivFunction(responseFromAjaxSuccessCallback,function(){
            console.log("record "+i+" ok);
        }
    });
}
what I get is always "record 1764 ok"
 
recursion
 
(array length is 1764)
the "for loop" does not wait for ajaxFunction to be executed...
 
function makeCall() {
  var item = items.shift();
  if( !item ) return;
  // ajax that shit
  .done(makeCall);
}
@Julo0sS don't use a for loop, it won't end well for you
 
3:51 PM
don't understand your idea
 
0.185 hours: Detroit to Atlanta to the coast is all gone
 
item.shift will take the 1st item
 
187 hours, got bored <.<
 
@Julo0sS yes, OFF the array
therefore you will always get the next first item
 
yes, but then?
so, for you I should do this :
 
3:53 PM
Ajax is asincronous, that means the time when the server responds is not exactily definitive, so by the time your app recieves response the for loop finished
 
there is also other issues in the for loop. think for loops and setTimeout
same shit
 
Chicago just made it to 0.25, but not by much
these zombies are vicious
 
Dont know Jquery but you should monitor when the app recieves response and then continue with the loop
 
for( var i = 0; i < 10; i++ ) {
    setTimeout(function() {
        foo(i);
    }, 1);
}
var foo = console.log.bind(console);
// 10 (ten times)
this outlines the problem in a simpler use case
 
@BenjaminGruenbaum do you have that link for that project that uses ES6 template strings to create parsers?
 
3:55 PM
i is already ten when you call the functions
 
@rlemon if you hadn't used console.log.bind(console), yeah
 
@SecondRikudo it's by mark miller, he goes by the name erights
 
@FlorianMargaine lazy
 
function makeCall(){
    var item = items.shift();
    if(!item) return;
    ajaxFunction(item,function(response){
        writeFunction(response);
    }).done(makeCall());
}
 
so much wrong
 
3:58 PM
@FlorianMargaine lol, that's why I'm asking... ;)
cuz i'm wrong
 
yes you are
well, not you
but your code.
 

« first day (1600 days earlier)      last day (3351 days later) »