« first day (3348 days earlier)      last day (1600 days later) » 
08:00 - 21:0021:00 - 00:00

9:00 PM
i think its working, fans started
 
lmao that's always my metric for being able to tell whether ffmpeg is working correctly
is it running? yes my laptop just became a space heater
libvpx is not kind to CPUs
 
my fans are always runnin full speed
is that a problem
 
free resources are wasted resources
 
just put your computer in the fridge, works well. Reduced render time for a video from like 2 hours to a half an hour
 
are you serious? that's amazing
I mean that totally depends on the specific machine but that's the greatest solution
 
9:05 PM
this is bullshit. Uglify doesn't support es6
 
Lol
so, what's the goal atm?
 
obfuscating code that you're about to put into electron?
 
/minifying but yes
 
i hate medium but here's an article that i haven't read on the subject medium.com/@annexare/…
 
9:07 PM
dumb to hate an entire platform
 
It's the platform i hate
not necessarily the content
 
ah
that's acceptable
 
They give users a way of +1'n content, but no way of indicating the content is hot garbage
 
I should expect nothing less from such a prolific downvoter
a connoisseur of hot garbage
 
so i have to transpile using babel to es5 and then uglify shoot me now
 
Hi all. I'm using TypeScript and I'm getting this TypeError: Cannot read property 'mount' of undefined, but it's clearly there:
import {Application} from "express";
import {swaggerUI} from "./index";

const apiDoc = require('../swagger.yaml');

class Swagger {
    public static mount(_express: Application): Application {
        _express.use('/apidocs', swaggerUI.serve, swaggerUI.setup(apiDoc));

        return _express;
    }
}

export default Swagger;
 
show the broken code
 
my guess is that mount is undefined
;)
 
err, no
mount is not undefined
 
but the method is defined there as you can see.
 
9:13 PM
read the error message closely
it doesn't indicate that there's a problem in the code above
 
import {Http, Locals, Application, CORS, Swagger} from '.';

class Kernel {
  public static init(_express: Application): Application {
    if (Locals.config().isCORSEnabled) {
      _express = CORS.mount(_express);
    }

    _express = Swagger.mount(_express);
    _express = Http.mount(_express);
    return _express;
  }
}

export default Kernel
here's where it's actually being called from
 
CORS is undefined
 
why are you importing from a directory
 
i assume there's an index.js
 
@forresthopkinsa thanks
 
9:14 PM
there's an index.ts
 
that can work but it might not be what you're meaning to do
okay, gotcha
which line is causing the error
is it definitely Swagger.mount ?
 
yes
 
Ah, i see there's a lot of .mounts, good catch, heh
 
typescript compiled that line to: _express = _1.Swagger.mount(_express);
 
so it's very likely a syntax error in the index.ts
 
9:17 PM
import express from 'express';
import dotenv from 'dotenv';
import bodyParser from 'body-parser';
import corsApp from 'cors';
import {Application} from 'express';
import {Server} from 'http'
import Api from '../api/Api';
import Routes from './Routes';
import Locals from './Locals';
import Kernel from './Kernel';
import Http from './Http';
import Express from './Express';
import CORS from './CORS';
import App from './App';
import swaggerUI from 'swagger-ui-express'
import Swagger from "./Swagger";
that's index.ts
 
is your Swagger file hitting an error during compilation?
 
Swagger.ts?
 
No, there is only one error, and cannot read property 'mount' of undefined in the Swagger.mount(_express) line is it
 
darn. This is tricky
 
9:19 PM
start logging stuff
 
yeah, reduce as many factors from the equation as you can
 
I must mention that everything worked well before I added swagger to the project
if I remove it, everything works!
 
9:48 PM
finally, it works. That took longer than it should.
shitty minifyer tho
 
you were right with minifier
 
its just a whitespace remover, doesn't change variables or anything
 
pretty sure that's configurable
 
does it keep the whitespace in strings?
 
@ndugger yes
 
9:58 PM
just checking, some people might forget about that
 
he's using uglify
hopefully the most popular minifier is not gonna mangle your strings lol
 
oh, thought he was making his own for some reason
 
gotcha
 
alright, pirates can do what they want. Its taking too much time.
 
tbf if they're good enough to find the source, they're probably good enough to deminify it and understand it
 
10:09 PM
true
 
Anybody with good react knowlegde?
 
@Gunthervon Goetzen Sanchez Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
oh well, I will just put a message asking people to pretty please not pirate
@GunthervonGoetzenSanchez just ask your question
 
i wouldn't consider myself good with react knowledge
but i can probably find the answer
 
I only use my react knowledge for evil
 
10:13 PM
I am using right now react Hooks (import React, { useState, useEffect } from 'react';)
 
Yay, my app works.
 
1 message moved to Trash can
@GunthervonGoetzenSanchez Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
 
and initializing an object inside the useeffect function
 
useEffect(() => {
     story = new Swiper()
});
 
useEffect(() => {
story = new Swiper()
});
 
10:20 PM
);
 
I haven't jumped on the whole... react hooks wagon yet
 
later i am calling a function of Swiper Uncaught TypeError: Cannot read property 'story.slideNext' of null
 
Any ideas on my issue guys? :'( I've been stuck on this for days, lol
Not that it means anything, I literally started using typescript this week
 
like we said, narrow down the issue
 
@J.L.Louis can you post the relevant files in a gist?
 
10:23 PM
start logging values, remove other factors from the code
 
I got to get into ts. As I am working on more complicated projects, I am seeing how types are really useful.
This recent electron app was really confusing because I couldn't remember what type certain things were so I had to create comments with the types.
 
you also could have skipped the es6 -> es5 step with ts
 
very cool
alright i'm out for now o/
 
 
1 hour later…
11:46 PM
||choose Poe or Skyrim
 
Poe
 
||choose poe or skyrim
 
skyrim
 
looks like that glitch fixed itself
answered correctly on the second go
 
08:00 - 21:0021:00 - 00:00

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