« first day (2570 days earlier)      last day (2603 days later) » 

14:00
with?
classes, oh.
I use objects for storing data (or transitioning functions and stuff like that, if that's a thing you say)
using objects to manage things like the chat bot doesn't seem ideal
I don't doubt zirak had good reasons to do it that way (well, laziness can be a decent enough reason in programming)
it also makes sense, far more than a singleton
when he first wrote it there was no class sugar, and function constructors kill projects
and that is what objects are for in JS, even your singleton will be an object until it betrays you and you remove it
14:05
@SterlingArcher go green
@ssube how'd you mean?
> function constructors kill projects
why?
the singleton is an obsolete pattern for very good reason
they were never truly single (just within the thread) and, in short, break all testing
@littlepootis usually when I see one, unless I wrote it, I feel like "urgh, I actually need to put thought into reading this", because it tries to both create data and set up the management stuff at the same time
if you need to know your memory footprint and keep it perfectly constant, they might make sense
14:08
@towc How does the class sugar help with that?
it gets rid of a few function assignments, but if you have trouble reading an assignment...
@ssube the way I would handle zirak's bot now is creating a bot pseudo(js)-class, and separately making a variable that instantiates it. Ofc that means that ideally you should be able to instantiate it multiple times, so you can actually have multiple bots if the i/o allows for multiple streams, but you most likely wouldn't want that, so you just happen to instantiate it once and that's it
but it'd still be some form of constructor, not a plain object
@littlepootis it encourages you to compartmentize how you do things, and provide recognizeable patterns for the eye to read, if that makes any sense
I know it helps me. I do see how it might not help a lot of other people
and maybe I'm just not trained enough, sure
> it encourages you to compartmentize how you do things
but it helps
it does the opposite
14:12
^
it sounds like you want to put the basic class/object setup in another function to keep the constructor short
that's a big part of it, yeah
if your ctor is actually too long, you're doing SRP wrong elsewhere
SRP?
Single Responsibility Principle
oh, fair
the S in SOLID is one of the most important
if you screw that up, none of the other letters will work
Actually I want to use 'leaflet.smooth_marker_bouncing' library
and this library is written in ES5 and I want to use this in ES6 or (Typescript)
I am using Babel.
Please help!
ES6 is backwards compatible to ES5. So is Typescript, almost.
Just use it.
does ionic 3 has webpack in it ? not sure — Yunus Emre Guney Student 35 mins ago
@littlepootis Can you please check this.
I don't know anything about ionic. Or webpack.
14:25
I'm pretty sure you can't just drop the JS file from NPM and import it.
about as sure as I am that "couldnt make it work." is not a suitable problem statement for SO
Actually this library code does not have module.export
@ssube Actually if any body in this situation (have the es5 code and want to import in es6 where typescript also using) then how to deal this.
this is amazing 0.o
> Pick a uniformly random number in [0,1] and repeat until the sum of the numbers picked is >1. You'll on average pick eā‰ˆ2.718... numbers!
let tries = 100000000;
let total = 0;
let localTotal = 0;
let localAmount = 0;
let amount = 0;
while(amount < tries) {
  localTotal += Math.random();
  ++localAmount;
  if(localTotal > 1) {
    total += localAmount / tries;
    localTotal = localAmount = 0;
    ++amount;
  }
}
console.log(total);
this consistently gets the first 3 decimals of e
@AnkitPandey add it
14:53
Such wrong room.
user6893344
dropzone.js help neede. any one can help
@dil Welcome to the JavaScript chat! Please review the room 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.
user6893344
dropzone how upload multiple files one by one ?
user7222571
15:14
hi
@TobiasK Welcome to the JavaScript chat! Please review the room 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.
15:27
@towc it's not new, it's more of the same
I would only ever learn vue at this point if I get a job where I need to use it
@Mosho have you tried meditation?
Being "new" is the biggest thing vue has going for it, to be honest.
Everybody loves that new car smell.
Yeah, when I was in NY the Vue meetup had the most new subscriptions but none of them actually used Vue very much.
Chrome does not love my sourcemaps, however. :(
It's not that we hate vue @towc it's that we find it not very interesting - it has some nice ideas but React has many of those ideas too.
@ssube I believed for a whole two years that Chrome doesn't handle source maps well because @Mosho told me and when I tried it didn't work. I showed that to a Google engineer from the devtools team one day and they made fun of me and fixed my config :(
15:31
lol
I just have some path mismatch thanks to Ubuntu WSL
haven't figured out which info field to use in webpack yet
fuuuuu can't find my credit card
devtoolModuleFilenameTemplate: (info) => file:///C:/Users/seans/codeproject/${info.identifier}, works for most of the paths
15:54
@KendallFrey @Loktar fuck.. just realised I forgot to generate supports
:/
think the hat will print without?
everything else seems fine...
the scarf printed fine without supports
@BenjaminGruenbaum eh, a long time ago
@Mosho Warmly recommend Headspace
I'll check it out
@BenjaminGruenbaum pfff what config :o
it was never about the sourcemaps themselves, it's about the debugger
16:17
@BenjaminGruenbaum Update: Got webpack working today, both the WDS and webpack itself, with routing (async and sync)
Code splitting still mysteriously not working, and running webpack with the -p flag makes for some... interesting results.
16:32
@rlemon did you have trouble 'leveling'?
I am considering a cr-10 or other 3d printer. Maybe.
@Luggage nope
Did the paper method. Takes like 5 minutes.
I relevel between every print
oh.
this is just making it a flat surface, right?
You don't have to I suppose. But it doesn't take much time so I do
is it the heat that makes you need to re-level?
@Luggage yea
@Luggage it's probably fine I'm just paranoid
16:33
I see.
I think it's more an issue of vibration tho
But really. Leveling was super easy.
is the cr-10 supposed to be the 'moddable' choice?
What do you mean by moddable
is a 2 foot depth table big enough?
I mean table to sit this on.
I don't know what I mean. It seems people modify them a lot on youtube.
@Luggage hard to say. Probably not? It needs more wide than deep. It has a control box that sits next to it.
16:36
width is no issue.
@Luggage ohh they add things like stress relief stuff. I haven't yet. Loke has
right now I've got mine on the coffee table
it's the most stable table I have that doesn't have piles of crap on it
:D
yes, that look less than 2 feet
3d printer on the coffee table? Aren't you married?
I'm printing stuff for her
all of my prints so far have been things she wanted
compromise šŸ˜ƒ
sneaky
I'm worried about this current print tho
I forgot to add the supports in cura
the hat brim calls for them.
16:40
I have plenty of space in my tiny house alone. I was looking for a new table today to put this on.
My space is not really configured in a usable way, but I have more than enough to work with..
I plan on building a desk for it
with covered filament holders and doors and shit
so I can keep the cats away from it
heh, yes. fuckin' cats.
(I like cats, but they can be a hassle)
it's a flat rectangular bed
it's only a matter of time before they figure out they fits
if you don't have issues with hairs on your prints yet, you will.
lol that's why I need to build a desk for it
16:43
you'll have to shave them
well, a cabinet really.
ohh, to cover it while running, too?
sure why not
some people do it to keep the heat in for printing things like ABS (and the smell of ABS)
you don't need to for PLA, but I dont' think it'll hurt
that wood stuff looks like the best.
all the prints look smoother
PLA has no smell (close to it you smell warm plastic, but you have to be like right next to it)
@Luggage really depends on the settings
right now I'm printing at .1mm layer height. so the print is coming out super smooth
16:45
@MadaraUchiha we can take a look together some time if you'd like
Can you feel the horizontal striping you can see in the image above?
depends.
and by no means am I an expert.
but on the first .1mm thing I did, the flat surfaces are super smooth.
well, in that specific one in the pic, i mean.
on the .2mm ones I did, you can feel the banding, but that's not anything 15 minutes with some 600 grit sand paper wouldn't solve.
@rlemon It'll be a bit janky at the back
16:47
or if you are painting it, a little primer
@KendallFrey so far seems okay. just the hat brim looks.. idk. hard to tell
I'll try to take a pic
you can't print silicone, can you?
no clue
probably not, but you can print a negative and mold it
@KendallFrey hard to get images of a moving bed
looks fine?
yeah it's pretty good
60mm/s speed, .1mm line, 10% fill
Looks like it was designed to print with no supports
16:52
hopefully
gotta take off before it finishes
@MadaraUchiha what are you doing with webpack?
packing webs
@Luggage have you ever considered being a full-time comedian?
you are wasted in software
I'd starve.
!!afk āš°
17:06
@rlemon yeah I can't see what that would need supports for I guess
@Loktar rlemon is afk: āš°
looks like it will print fine
Hey, I can't figure out why e.total gets set on a ProgressEvent HEAD request - I'm looking at xhr.spec.whatwg.org/#interface-progressevent
17:25
Meanwhile in Pripyat:
Btw this is how Russia used to spy on you Americans
Big radar thingy
@KamilSolecki noice, I remember pictures of that
Yeah seeing it all live, incl. all the clothes, newspapers etc. was super fun
Like urban exploring, but on a city scale ^^
Do you have cancer now?
17:35
Meh. The radiation dose is hardly any in most places
Around 20-50 microsieverts
So is that a no
which is ok, just anticlimactic
The most I've seen was ~1000 microsieverts
huh, I was poking around on linkedin, and apparently my last boss now works at SpaceX
But I couldn't go to the most radiated zone, which is the hospital
@KamilSolecki it looks just like all the games and movies
which is super cool, very few places are actually that striking and dramatic in real life
17:40
man
the typescript source looks like java
@Mosho Or, you know, C#
I guess
they have the weirdest test framework
/// <reference path='fourslash.ts'/>

/////*1*/const {
/////*2*/    a,
/////*3*/    b,
/////*4*/} = { a: 1, b: 2 };

format.document();

goTo.marker("1");
verify.currentLineContentIs("const {");
goTo.marker("2");
verify.currentLineContentIs("    a,");
goTo.marker("3");
verify.currentLineContentIs("    b,");
goTo.marker("4");
verify.currentLineContentIs("} = {a: 1, b: 2};");
that's fucked up
^ lol it is
17:59
Meanwhile, I've had a big big steak
@ssube yeah, if you ever have a chance, do go. Ive always wanted and it's absolutely worth it.
I just might, I do want to visit that part of the world
It's ridiculously cheap here
yeah, the flight would be 80% of the costs
0.25$ for quality coffee lol
0.7$ for a beer
what's the closest international airport? There can't be a direct flight
18:14
yay 800 people are following me on cp codepen.io/towc
in the meantime I'm here worried about my credit card, passport, and life :P
@ssube Kiev
Thus I've also joined it with a visit of the city
$1000 round trip, which honestly isn't bad for 12+ hours
Aye, doesnt sound that bad
And well, if you are somewhat around, you can always visit me and Matei :D
It'll be some time until I can travel there, we might be moving next summer.
Where to?
18:18
If we move, LA.
Oh, pretty. I was hoping to visit the west coast
I enjoy winter, for the most part, I just don't like the midwest much and my housemates are equally fed up with it.
I've only seen the east coast of us, the furthest west I've been is Philadelphia:P
I grew up out there, like 30-40 minutes (depending on how much you sped) west of Baltimore
lived in a few other cities around there, it was nice
Hey @OliverSalzburg
o/
18:30
I've only visited Philadelphia for New Years, and frankly I do not remember much of it.
it's a pretty average east coast city
so, I hacked toghether a working markdown view chrome extension for twitter
window.setInterval(() => {
  Array.from(document.querySelectorAll('.js-tweet-text')).forEach((el) => {
    if(!el.hasBeenMarked) {
      el.innerHTML = marked(el.innerHTML);
      el.hasBeenMarked = true;
    }
  })
}, 5000);
surprisingly, that's all you need
@sultanul Welcome to the JavaScript chat! Please review the room 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.
(well, you need to import a marked build and set up the manifest, but still)
18:35
Sure @CapricaSix . Thanks-
I am interested about AngularJs
Inb4 caprice is a bot
Hello
@FlorianMargaine I figured out what I was doing wrong
I was way too sleepy, I was piping data to /dev/null
once that was fixed, :D Voila
(or it seems so-so-far, looks at OSX)
18:55
dafuq google
> As of 21 November 2016, all newly published packaged or hosted apps are restricted to Chrome OS, and are not available to users on Windows, Mac or Linux. Existing apps will continue to be available on all major platforms and will continue to receive updates
(trying to publish a chrome extension)
I'm confused. The latest extension was published on 26 Oct 2017
oh, apps are not extensions
bah, they're treated similarly. Don't want to get into that, I'll just offer the crx file on github
time to cook dinner
@towc :)
Any idea why the name wont show in vue, this is pretty basic...
https://jsbin.com/rabadecovi/edit?html,js,output
19:13
what makes you think it would?
Where does name come from?
what suggests the button does anything?
oh wait nvm
the method just returns some data, doesn't set the actual data
@Mike
I tried pulling name from return of the function , I also tried just calling the function in expression
1 message moved to Trash can
@Mike Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
Sorry @CapricaSix
Thank You so much @towc I am so DUMB
19:17
also, please don't use the global component register
ERROR in [at-loader] ./src/service/logger/Logger.ts:20:18
    TS2320: Interface 'Logger<TData>' cannot simultaneously extend types 'Log' and 'Service<TData>'.
  Named property 'error' of types 'Log' and 'Service<TData>' are not identical.
šŸ˜¬
I can't refactor service
export interface Log {
  debug(msg: string, data?: LogTags): void;
  error(msg: string, data?: LogTags): void;
  info(msg: string, data?: LogTags): void;
  warn(msg: string, data?: LogTags): void;
}
gonna have to give up the classic log methods
@towc Means?
no more Vue.components
they're bad and you should feel bad
unless it's a small hack
then what?
Sorry but I am just getting started.
well, here's the extension!
# twitter-markdown I made a small chrome extension to enable **markdown** on *twitter*! [check it out!]( https://github.com/towc/chrome-extension--twitter-markdown)
19:42
you should post a picture as an example. I didn't think twitter supports linebreaks so it I'm guessing it is somewhat limited
@towc
It literally has a gh link
Just click it :P
not trying to market it or get famous for it
forgive me if I misunderstand but don't you have to install it to figure out how it looks
it's just a really small implementation and I'm like "fuck it, I'll make this for myself so I don't feel back writing markdown in tweets"
@William what part of what I said makes you think I meant that you don't need to install it?
@Kamil was who I was referencing. It looks great
I like it a lot towc. I haven't created a chrome plugin myself so this migth be a good way to understand
19:54
sure, it's really really simplistic and doesn't go nearly in depth in how to get things done with extensions
but shows that you can still do a lot with very little
which makes it powerful
very little and a library
welp, yeah
Seems pointless
it is
it's twitter
19:55
idea came up just because I saw so many people writing code in tweets, and couldn't deal with the lack of monospace
even just for that, I think most programmers would consider using it
does it detect if it is markdown before attempting to render it? I guess I could figure that out by reading it but figured I could ask
how do you detect if something is markdown?
the only thing I can think of accidentally happening is starting with a #
the *, for example, is ok
yeah # and lists are the most common confusion with numbers
@Mosho We're rewriting the website build
Progress is good.
@William if the lists have numbers, now they'll have better numbers
I don't see the downside
I can make it so that users can decide not to have their tweets parsed by making the first character a _
19:58
as long as you like it & it fits you rneed

« first day (2570 days earlier)      last day (2603 days later) »