« first day (2600 days earlier)      last day (2573 days later) » 

13:00
any string excluding closing curly braces?
I dont know what value it will have
yes
excluding ${}
@FlyingGambit So you basically want to match everything?
\${[^}]*}
If "foo" can be anything, then this is somewhat of a pointless exercise
The additional requirement that it can be wrapped in ${} really means nothing
@FlyingGambit const extract = (str) => str.startsWith('${') && str.endsWith('}') ? str.substring(2, str.length - 1) : str
13:01
if you want to extract the value, you can do that using capturing groups, or wrap the outer parts in lookbehinds and lookaheads
depending on the engine, one solution might be better to use than the other
@towc the problem is that the string is not always wrapped in side ${ } ... sometimes it is sent from he server unwrapped
or const extract = (str) => str.replace(/^\${/, '').replace(/}$/, '')
@FlyingGambit that's the second clause of the ternary
the condition checks if its wrapped
@FlyingGambit can you get "${foo1 ${foo2} haha}" ?
@Wietlol thats not working
@towc I can use that too
@FlyingGambit for me it is
13:03
@FlyingGambit then do
don't overcomplicate everything
because you didnt specify it cant
I think I'd personally use the ternary version, even if its longer
Thanks guys
@towc but that one doesnt account for leading noise and trailing noise
@Wietlol there is none
13:04
how are you so sure?
he explained it
not very well, but he did
hmm... ok
he either gets ${<value>} or <value>
i get nothing or nothing
as the only piece of data, as far as I can understand
13:07
i once wrote a thing that reads out the stuff between curly braces and processes it based on the values
but couldnt do it with regex
cus <[^>]
I have question about structuring a video streaming site. Say the index page has a gallery with images linking to the videos and the user clicks on a link.
Can I route them all to the /videos url and replace the video file for every link or would I have to have a url for every video like videos/1 , videos/2?
using express/node btw
yay, keyboard based stuff... how about no?
@ptts that boils down to how you wanna do it
hey rlemon:-)
13:11
but for accessibility sake, having a dedicated url for each is probably recommended.
however that doesn't mean you can't use that url to just pull the stream to the main page without navigating there
got that right now, the name:-)
@Wietlol Rude
Ok I would like to now have a 1000 video/var text files, that is why.
Something can be cute without being functional
I really like keyboard layouts for my laptop, but that has more to do with my hatred of touchpads than it does for liking keyboard things
@Cereal if I wanted something cute, but not functional, I'd get a kitty
13:14
@Cereal Like QT
putting common action types (LOADING_ERROR, etc) in one file vs including it in types of every reducer (ducks) with better naming convention (ANALYTICS_ERROR) ?
@Prakhar Is that a question?
what would u prefer ?
13:15
I don't know what a duck reducer is
So, no idea
But I like to manage constants centrally
@rlemon
So, if I have an imag on the index.html page and they click on that, this will still be a get request, right.
Then the link goes: <a href="/video/"></a>
ducks is a pattern for redux
@ptts sure
@OliverSalzburg github.com/erikras/ducks-modular-redux , in case you want to know about it
@Prakhar No thanks
13:17
@Prakhar use mobx
:D
@rlemon
now there are say 100 such links on the index page. I can send them all to the /videos/ , right
on the next app , thanks.
@ptts well you could, but you'd need to pull the video in somehow
what would be more useful is to have links going to /videos/:id and have that serve just the video, so you can pull them in on other pages
so the link wouldn't open a new page, but refresh the current view with the video stream
don't care
1 message moved to Trash can
@ptts Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
how your video is formatted or what it contains, or how long it is, or any actual details. I don't need or care
if you have to pull videos from the server, you need a way to pull them. if you just wanna post with post vars to lookup the video, that'd work too.
like, your question was super vague and easy to answer 😛 so now I'm just listing different options.
13:23
@rlemon
well thanks, the video are on the server, no need to buffer or anything.
@rlemon
So having an video file for every video? Like video/1, video/2 etc?
app.get('/videos/:id', (request, response, next) => {
  const video = getVideoById(request.params.id); // or however you look up videos.
  response.send(video); // or however you stream videos.
});
> In IT we are just googling the exact error message you read out to us and using the first forum search result as the fix. We aren't actually geniuses.
:D
something seems to have given him the impression anyone thinks tech support people are geniuses
I don't have that impression
maybe it is because I am working in IT
guys is this statement accurate?: "
When a new object instance is created from a constructor function, the functionality is not all copied over to the new object like "classic" OO languages — instead the functionality is linked to via a reference chain called a prototype chain (see Object prototypes).".
I can avoid prototype and attach a property directly to the object inside constructor isn't it?
@Mosho non-computer people think computer people are some magical creature that can tickle your keyboard and make the smoke go back into your PSU
@GiorgiMoniava yes, but usually you don't want to
13:39
@rlemon I know but I am intersted in the accuracty of the statement. So this is not that accurate, am I right? (this is from MDN hence the question)
no, it is accurate, but usually you don't wanna attach methods directly to the instance, you want them on the prototype.
@rlemon I guess so
@rlemon to me it claims that always the functionality is provided using prototype which isn't true
I remember my grandmother calling me after they had a technician over
he tried to sell them so much shit
and she was really into it :|
@GiorgiMoniava you'll have to give me an example of where you think it is inaccurate.
because I don't see a problem with how it is phrased.
13:41
@rlemon :) Like I said to me it seems that paragraph claims that ALWAYS prototype is used to give functionality to object. isn't what that says? (otherwise it seems I am missing smth).
class Foo() {
  bar() {}
}

[new Foo(), new Foo()] // both instances _share_ a bar function, but it is called in the context of the instance invoking it.
man, I'm so happy since the last VS update
being back to a non orange icon feels amazing
@GiorgiMoniava a prototype is always provided when you create an instance with new
but you can provide methods that are not on it, if you so wish.
that's what it is saying.
@rlemon OK I interpret that differently
@KamilSolecki bah, vim 9.0 is better than anything I've ever seen
13:44
@rlemon
A thanks. And how does the href attribute have to look in html for that? Just <a href="/video/1"etc?
I have literally not left the house in 4 days
@ptts dude, write your own app :P
I don't know how you wanna link or load the videos.
that is not a technical problem. it's a personal decision.
@Mosho when was the last time you showered?
I imagine Mosho showers twice a day
@Mosho you work out daily yea?
not after surgery, for a week :P
13:46
just put a bag over your head.
problem solved.
make sure your eyes don't see that you're working out, huh?
eh mosho, reset your record by stepping a foot outside and then turn back in house
@towc an hour ago
that's too long, go back in there
@rlemon not since the surgery :(
I was told I need to wait a week
13:48
Can we remove pastie.org from that list
seems to goto an error page
@ShrekOverflow what list?
@rlemon ah, my secretary @towc told you already
yes, a bag wouldn't work I'm afraid
I asked
@Mosho Mr Mosho, I'm still waiting for my salary. I trust it's being taken care of
You sounds so much like a nigerian scammer
"I trust" bam, I don't
that reminds me, time to check my spambox
@Mosho goggles?
13:50
@rlemon it's about pressure, not vision
how does a shower create pressure on your eyes?
generally interested in hearing how
a shower?
I'm talking about working out
I've been showering
lmao you thought I wasn't allowed to shower for a week :P
sorry, it looked like towc implied you couldn't shower for a week
which sounded stupid
@towc this will be deducted from your salary
13:52
bah, humans and miscommunication
I blame the english language
there may have been some projecting
how dare you
the good thing is that I get much fewer miscommunications with you and techies than with others
How'd your date go
1) not a date, I think
using eye drops 16 times a day is getting old
13:54
lay off the thin mints, join ass kickers united
2) turns out I'm really hating a couple of things about her, but the rest is as good as always
@Mosho We are all getting old, slowly but surely
@KendallFrey talk for yourself, three dimensional being
@towc so definitely a date
@KendallFrey how?
13:55
@Mosho Just drink the bottle and try crying a lot
@OliverSalzburg if you inject it, you get crocodile powers
more accurate
@ssube Crocodile powers? I'm intrigued :D
I feel like the whole room's been playing pranks on me and fucking around with my emotions at this point :P
tbf I make it real easy for you
the russians make krokodil from boiling eye drops and other forms of party liquor
13:57
😂
There is a skeleton inside you guys as we speak.
Be careful..
37 mins ago, by Caprica Six
@ptts Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like https://gist.github.com, http://hastebin.com, http://pastie.org or a demo site like https://jsbin.com/
My itnernet is so fucking bad
@towc You're the one doing that
I can't even send 1 message before it disconnects
and it has been this way for 5 months
@rlemon I saw that movie some months ago
like wtfffff
13:59
he I have slipped off the shift key there:-)
@ShrekOverflow hmmm call them up, maybe they haven't noticed?
@towc I have been calling them every week since past 5 months

« first day (2600 days earlier)      last day (2573 days later) »