« first day (1623 days earlier)      last day (3320 days later) » 

user1596138
7:00 PM
From here in the tutorial th:text="#{${'seedstarter.type.' + type}}" this makes me think there is a special syntax for "doing things" vs. accessing variables/properties
 
user1596138
I could probably find out but.. I'm not the one using thymeleaf, just figured it was worth mentioning.
 
user1596138
Idk I guess that doesn't make sense now that I look at your code again. Ignore me, good luck bro.
 
No no you're definitely helping, better than nothing!
 
@Jhawins that looks sorta like a variable variable
 
user1596138
@SterlingArcher oh yeah there was this relevant issue on github github.com/thymeleaf/thymeleaf/issues/276
 
7:04 PM
Guys, a question: I'm using express.static() to create an asset directory under dist/. The static name I gave it for the server is assets/ So now I have <link rel="stylesheet" href="/assets/css/main.css"/>, but intellij marks this with a warning, claiming that it can't find /assets anywhere. How can I tell it I mean the dist/ directory?
 
user1596138
Fuck thymeleaf already I feel bad for you
 
@SecondRikudo is jetbrains any good for web?
 
warblegarblegarble this is tricky
 
I assume you use it because Java
 
a simple == compare would be fine if my personProg wasn't a list
 
user1596138
7:06 PM
@SterlingArcher you could just use th:field like the docs say...
 
@rlemon It is, still haven't found a better alternative, even for nodejs
 
I tried a th:field but I think it screwed things up
 
user1596138
Yeah it doesn't say how to do it but it says to do it haha
 
What do you use for web?
 
exactly lol
fuck
holy shit, im close!
I just got them all selected
Almost there
 
user1596138
7:10 PM
 
user1596138
I think I found it ;P
 
is this a good place to get my new mac? expeditelectronics.com/…
is £90 less than mac store
 
ARGGG I have the # and $ reversed. Lemme try that
 
@SecondRikudo I use ST for everything
except remote ofc (and .net)
 
I donno if 13" is big enough to code in
 
7:11 PM
@rlemon Any specific plugins?
 
user1596138
@Sterling It doesn't work for single character strings
 
what do you mean?
char?
 
@SecondRikudo eslint, a code formatter, a color highlighter, and that is it.
but I need to work on my workflow
 
user1596138
See linked answer (and the one below it)
 
@SuperUberDuper not for me
17" monitor is almost too small
 
user1596138
7:12 PM
// when going over this with lists.contains
<div th:text="${#lists.contains(product.testList, '3')}"/> // this is `false`
<div th:text="${#lists.contains(product.testList, '33')}"/> // this is `true`
 
well if im good with shortcuts in webstrom i can toggle between full screen mode
 
user1596138
 
only thing is chrome where you need to see a lot at once
 
@rlemon I need to learn to work effectively with sublime
I hear it has amazing features that takes a little getting used to
 
@SterlingArcher lists.contains(product.testList, '3') <- their example list doesn't contain '3', it contains "3"
 
user1596138
 
I hate my ISP
 
I'm anxiously awaiting google fiber...
 
@Jhawins yeah. All those methods use single quotes, so at best, it has to infer the type.
 
So I have to convert the single quotes to double?
 
Guys, I have a question. I have to run a test for my REST web service. The problem is that in that test, a URI is invoked twice, for example http:localhost:8080/id but each time it expects different resources??? is this possible?
 
user1596138
7:16 PM
@SterlingArcher supposedly you can do th:selected="${#lists.contains(personProg, '' + programs.id)}">
 
user1596138
if that's even your issue
 
^ tried that, didn't work
 
@ElaGorilaki Is what possible?
 
user1596138
@SterlingArcher Did you try it after you reversed the $ and # lol
 
yes lol
 
user1596138
7:18 PM
Haha :P
 
trying to wrap it with html entity quotes
 
user1596138
Just hardcode it
 
user1596138
${#lists.contains(personProg, '69')}
 
@taco to have a URI and possible retrieve different resources , for example localhost:8080/id can both retrieve "product" or "category" is it matches the id
 
Interesting... I disable adblock and the thing Google offers me is to advertise through Google
 
7:19 PM
@SterlingArcher you just have to make it a string somehow
you could maybe even do 'a'.toString()
 
convert the list to a string basically?
 
don't want my email public in npm
what can I do, give a fake one?
 
user1596138
Just pretend lol give it a hard coded value that you expect to evaluate to true and see if it even works?
 
Fuck. th:selected="${#lists.contains(personProg, '69')}" doesn't work either
personProg is a list of ids the person has associated, and 69 is one of them. Why isn't this working >.<
 
user1596138
See that's what I'm saying you expect that to be true but you must have another issue
 
7:23 PM
maybe I create a fake gmail account
 
@SuperUberDuper why would you want to hide your open source work? it's usually a good thing
 
user1596138
@SterlingArcher I don't Javashit but does the type matter there.. Like ssube was saying
 
@ssube I dont want trolls knowing my email addresss
 
yeah but that '69' should have worked
gotta figure out why
 
user1596138
7:25 PM
@SuperUberDuper Make one for this scenario.
 
user1596138
Use it whenever you need an email for public-facing development stuff
 
@SuperUberDuper I think they let you use your Twitter
 
user1596138
Oh yeah I think you can just use "@jhawins" or whatever for email
 
nice!
npm WARN Email must be an email address
 
7:28 PM
@rlemon can you help me with configuring sublime linter?
 
@Loktar uses ST
 
I've installed sublime linter, I've install the jshint plugin for sublime linter, it appears when I "toggle linters" in the command palette and yet it doesn't break on obvious lint violations (;;)
 
and I know he has more experience with the plugins than I do
 
@SecondRikudo Im about to head to a meeting, but make sure its installed properly/running
the linters have some weird configuration
I always have trouble getting them working in new setups for ST for some reason.. they arent straightforward
 
from the window to the wall
 
7:30 PM
!!afk boss is sending us home early.
 
@Loktar Both installed because they appear in the command palette.
How can I tell if it's running properly?
 
I cant remember... I had trouble with jscs a few weeks ago.. I just remember it wasnt running :(
Im no help sorry :/
 
@SecondRikudo did you try turning it off and on again?
Half serious, ST needs to be restarted for plugins to work sometimes.
 
@FlorianMargaine Aaaaaand of course that works.
Sometimes it's the basics that get you.
Thanks :)
 
@FlorianMargaine So many missed rickrolling opportunities!
The other day, the restaurant I was at rickroll'd everyone
 
user1596138
7:35 PM
@SterlingArcher lol ohhh ok you're casting id as long
 
Oh, status update! My college stopped forcing us to use TurboC
We used gcc on Ubuntu now
With gedit
But whatever. That's better than Turbo
 
if you're writing C, you don't need syntax highlighting. If you're writing C++, nothing can provide it.
Same deal with Java and Scala, respectively.
 
Gedit doesn't even auto-indent
 
I think I see what's going on
It's not sending a list of IDs, it's sending a list of personProgs
 
personFrogs sounds nasty
 
7:41 PM
When I use cookies, I need to add a disclaimer or not?
 
Can someone explain to me why I'm having so many problems calling methods from my datatype/object? All methods/properties are defined on the prototype, but "this" seems to refer to the window Object, and not my instance. What am I doing wrong?
 
@Dan is it a callback or anything along those lines? this isn't bound to always refer to the object
it's complicated
 
How is the method being called?
 
@ssube In the constructor I call one of my methods that's defined on the prototype, that method then calls another method which is undefined.
 
don't do that
 
7:43 PM
I've been reading about bind, call and apply, but it's not getting through to me.
 
you never call methods in the ctor
that's Bad
 
Ok, understood.
 
if you need to do that, you write a static factory method to call the ctor, then call the method on the new instance
 
Should I assign this instance to a variable and call it there?
 
methinks me gotsit
 
7:44 PM
it's awfully hard to know just how constructed the object is when you call methods from the ctor
 
I just googled, and prototype methods should already exist when the constructor runs.
 
@Dan so class X { constructor() { this.foo(); } } becomes class X { constructor() { }; static create() { let x = new X(); x.foo(); return x; } }
 
So, honestly, that should be safe.
 
YES! YES FUCK YES I GOT IT!
@Jhawins @ssube thank youuuuu
 
user1596138
Watchu do
 
7:45 PM
I had to do some conversions
List<Integer> programIdList = new ArrayList<Integer>();
for (PersonPrograms x : personProgRepo.findByPersonid(person.getID())) {
   programIdList.add(x.getProgramid());
}
model.addAttribute("personProg", programIdList.toString());
 
@Retsam unless it accesses fields, which may not be defined yet
the actual invocation will be well-defined, but the object may not be populated yet
 
It was sending a list of objects, not a list of IDs
 
user1596138
lol nice
 
so I forcemade a list and sent that instead
 
@ssube Either the fields are populated in the constructor, in which case, you just need to not call the method until they are, or they're on the prototype, in which case, again, its safe.
 
7:47 PM
@SterlingArcher no map in java?
 
not that I know of
 
@ssube I'm digesting this, just looking at it in my editor.
 
@FlorianMargaine not till 8
 
sucks.
@ssube meh, if it's streams, the API is... bad
It still requires so much type juggling
 
running map with it isn't that hard, though
map is just a Transform<U, T> { T apply(U) }
 
7:49 PM
class x {

	this.property = true;

	this.init();
}
 
user1596138
lol oh noes all the tech jobs gonna leave Indiana because we reserve the right to not service you
 
Example for this case in java8?
 
@Dan I'm not too familiar with the ES6 class stuff, but shouldn't that be:
class X {
	constructor() {
		this.property = true;
		this.init();
	}
}
 
Yes, it should
You have to add the init method too...
 
user1596138
@FlorianMargaine lol
 
7:53 PM
@FlorianMargaine it should be something like personProgRepo.findByPersonId(person.getID()).stream().map(it -> it.getProgramid()).toString()
something very much along those lines
map is easy to use
 
user1596138
> If there is a place you got to go
 
user1596138
> I'm the one you need to know...
 
user1596138
> I'm the Map!
I'm the Map!
I'm the Map!
2
 
user1596138
 
fuck my fucking job fuck
 
7:56 PM
Oh good. It's a reference to a children's television show that's far past my time, and I didn't get it.
 
user1596138
I didn't watch that when I was little I remember my sisters watching it :P I think it came out way after pokemon an such
 
@Jhawins Hahaha
I loved when she'd ask us shit
 
well this is pretty nice (ES6 in devtools): chrome.google.com/webstore/detail/scratch-js/…
3
 
They'd have pauses for us to reply and everything
 
crl
Why can't we create another chat websocket, when I do new Websocket('wss://chat.sockets.stackexchange.com/events/17/longHash?l=45570795')
WebSocket connection to 'wss://chat.sockets.stackexchange.com/events/17/be64401ce146484e8dca357b98f19534‌​?l=45570795' failed: Connection closed before receiving a handshake response
they made it so only one can be opened?
 
8:06 PM
@crl Yeah
Only one connection per server methinks.
 
crl
Hmm ok
 
@ssube I think I've actually worked out the source of my issue - setInterval(), any idea how I should call one of the Prototype methods using setInterval()?
 
@ssube What I liked about Java streams is that they only iterate once
Until you call a terminal action on them, they don't execute.
 
@Dan instead of just passing foo.bar to setTimeout, use foo.bar.bind(foo, arg1, arg2)
check MDN for how bind changes this
@SecondRikudo they can get super efficient, yeah. Kind of awkward to use, but they force some really good practices that can be super scalable.
 
@BenjaminGruenbaum not too comfortable with using stuff that much in the future :P
 
8:11 PM
@Mosho BenjaminGruenbaum is afk: beer
 
ended up using this:
let get = (obj, prop) => prop.split('.').reduce((cur, p) => cur && cur[p], obj);
for now it'll suffice
 
@Mosho How does that work, is prop.split('.').reduce((cur, p) considered a valid argument?
 
user1596138
@SomeGuy Haha yeah my 6 year old sister loves it
 
@SecondRikudo what do you mean
 
user1596138
8:13 PM
Runs up to the TV to answer questions
 
shit works, you can run it
 
@Jhawins Hahaha that's cute
 
@Mosho Ah, I read it wrong
 
hello
 
So basically, get({a:{b:{c:{d:"foo"}}}}, 'a.b.c.d'), right?
 
8:16 PM
@SecondRikudo What if a key contains .?
 
@AwalGarg Then @Mosho 's function will fail :P
!!> var get = (obj, prop) => prop.split('.').reduce((cur, p) => cur && cur[p], obj); get({a:{b:{c:{d:"foo"}}}}, 'a.b.c.d');
 
@SecondRikudo "SyntaxError: let is a reserved identifier"
 
poo
It has arrow functions but not let, seriously?
 
@SecondRikudo "foo"
 
yeah, that wouldn't work
 
8:17 PM
strict mode?
 
but why would my keys contain dots
 
!!> var get = (obj, prop) => prop.split('.').reduce((cur, p) => cur && cur[p], obj); get({"a.b":{c:{d:"foo"}}}, 'a.b.c.d');
 
@SecondRikudo "undefined"
 
why not?
 
@Mosho it's not uncommon, when you're getting data from weird services
 
8:18 PM
@Mosho {"sites":{"stackoverflow.com":[1, 2, 3]}}
I dunno for what you've made the function, but doesn't TR mostly scrape sites?
It's not that implausible to think you'd have site names as object keys.
 
@SecondRikudo that's why we have {"sites": {"com": {"stackoverflow": {"www": {"ip": ...}}}} :P
 
Yeah, let requires strict mode
 
@ssube Go back to Java, please.
 
@SomeGuy wait what? really?
no turboc
 
URLs should've been TLD-first, man
 
8:20 PM
OMG :O
 
it's so I don't have to do shit like this.shit && this.shit.as && this.shit.as.well
 
it would make so much more sense
com.stackoverflow.chat/rooms/17/javascript
 
@ssube No arguments there.
It would also make it harder to fool people
 
if you want to whois, you go segment by segment and drill down
 
facebook.fake.com
 
8:20 PM
it's a singly-linked list (or tree)
 
it would be easy enough to add dot escaping to the function if I ever need it
 
so efficient in every possible way
 
vs com.fake.facebook
 
@SecondRikudo whois has better results for you ;)
 
8:22 PM
@Mosho try { this.shit.as.well } catch (err) { ?? }
That can be cumbersome too though...
 
I was thinking about it, but yeah, no thanks
 
just use eval...
 
@Mosho you should add a third, optional parameter for the delimiter.
 
nice idea
 
JavaScript needs catching specific exceptions
 
8:23 PM
let get = (obj, prop, del = '.') => prop.split(del).reduce((cur, p) => cur && cur[p], obj);
 
^ (what copy said)
 
@copy Definitely. if (!(err instanceof MyException)) { throw err; } is a pain.
 
or everyone should use gecko
 
@SecondRikudo And even with that, you still can't tell where the original exception was thrown
 
@copy Maybe a hack like throw err.constructor(err);?
 
8:25 PM
@copy I feel like they almost did that for ES6
 
Will that keep the error stack?
 
@ssube Thanks for the help. I need some sleep before I hit this again.
 
but doesn't switch (err.constructor) { MyException: ... break; YourException: ... break; default: others } work?
 
@SecondRikudo I don't see why that would work
 
@ssube Could be, but in some cases, you can't handle more general exceptions now.
 
8:30 PM
@SecondRikudo it doesn't work 100% with inheritance, no
 
I can handle an SQLError at this point, but not an HTTPError.
 
but in general, you can:
 
@AwalGarg It's cool, right?
 
They said that our final exam would be on Ubuntu using gcc too
So I think it's a Mumbai University change
 
8:31 PM
@ssube I wasn't referring to that
Although that's another issue
I was referring to the simple fact that you can't handle all types of errors at one point of your app
 
sure you can
 
An SQL error may be handled at the service level, where an HTTP error is handled at the controller level.
 
@SomeGuy I ... want an immediate transfer to the Mumbai university :P
 
@SecondRikudo you never can? You always let some propagate up to a more appropriate handler.
 
@KendallFrey No, you can't. That's the point of exception bubbling...
 
8:31 PM
yeah you can
 
In which case, you just rethrow in the default case.
 
your users will kill you
but you can
 
@KendallFrey you technically can, but it's stupid
 
very
 
just like in C++, you can catch a sigsegv, but gods help you recover
 
8:32 PM
!!tell 22350666 xkcd technically
 
but we can't pretend that stupid people don't exist
 
love that hover text
 
Isn't it common to use a task runner that catches all exceptions and at least logs the problem?
 
@KendallFrey fucking watch me
3
 
8:34 PM
I will watch you
 
@copy I like to have one at the very topmost level of the app to catch anything that gets loose, log it (or maybe send it to the server), and bail.
 
while you sleep
 
that's cool
 
while you bathe
 
make sure no mice sneak up on me
 
8:34 PM
while you make love
 
Right
 
make sure the lady friend doesn't steal mah shit
 
@ssube Just like that xkcd, my life improved a lot when I realized I can just ignore stupid people.
 
@KendallFrey however, if I ask for rope, you need to hand me the rope
 
8:35 PM
You don't need any stupid fucking rope
 
without rope, there's really no point
@SterlingArcher fuck you, yes I do. It always ends up coming in handy. (I don't remember the full line :( )
 
!!youtube boondock saints rope
 
Confucius say: Man who masturbate will come in handy
 
8:38 PM
Confucius say: Pilot who fly upside down will have crack up
 
*says, *masturbates, *in his hand
 
don't tell confucius how to talk
 
!!summon 29074
 
well then you tell Confucius to come up with some applicable shit once in a while
 
Someone is really messing with Github :/
 
8:43 PM
The Chinese government
 
What's there problem with Github? :(
 
The Chinese government is mitming ad traffic to attack github
 
@copy Any particular known reason?
 
Github says they want Github to take down some content.
 
@SecondRikudo No idea
 
8:47 PM
India
 
Their counter is pretty cool: github.com/cn-nytimes
 
on the one hand, China is stupid for thinking they'll get anywhere by shutting down Github for something the NYT did
on the other, any idiots relying on github for their daily workflow and not hosting somewhere reliable will learn some things
 
Why is that alert not in Mandarin?
 
@Retsam murica
 
@copy Why is there no semi-colon at the end?
 
8:49 PM
Because it saves 1 byte on billions of requests
 
@Retsam they also aren't serving it as utf8, looks like
 
user1596138
> alert("WARNING: malicious javascript detected on this domain")
 
@ssube Github issues. They are super awesome.
 
@ssube Ah, yes, if you don't care to set up your own git server you're "an idiot".
 
@AwalGarg Gitlab CE.
Bunch of places offer it in docker/automated provisioning forms.
 
8:50 PM
@ssube Not everyone can have one running all the time ;)
 
@AwalGarg costs about as much as github, for 10 projects, and only gets cheaper from there
 
@ssube Have you considered being a touch less needlessly condescending?
 
user1596138
Oh remove the trailing slash..
 
@copy then also shorten it to alert("warning: malicious code detected here")
@ssube What about projects that don't require a private repository?
 
@AwalGarg Use lower-case characters because they use up fewer pixels?
 
8:53 PM
@AwalGarg if you can spin up a linux machine and install a single RPM, you can replace the $12/month github 10 repo account with a 4 core/1GB gitlab machine, with 75GB of storage for whatever
that's the break-even point, for simple cost
keeping gitlab running is usually pretty easy, so it doesn't have a ton of operational overhead
 
@ssube have you included the backup plan in this?
 
And 2FA
 
@ssube my company relies quite a lot on externals tools... github, jira, hipchat, etc
 
@copy A smarter copy would have known no because then I would have used ' instead of " xD
 
@FlorianMargaine if you want 250GB of backup, on GCE, using DRA because backups don't need to be super HA, it's another $5/month and gitlab has a built-in cloud backup script
with a 75GB machine, minus some for system, that should let you keep the last 4 backups
 
8:56 PM
Providing, of course, you have a geograpically remote location to keep the second system?
 
@Retsam GCE DRA storage?
 
user1596138
8 mins ago, by ssube
on the other, any idiots relying on github for their daily workflow and not hosting somewhere reliable will learn some things
 
user1596138
This message holds no merit. Don't discuss it and don't pretend it's real.
 
he's not wrong
 
@Retsam not sure what you can do that's much better than S3 or GCE storage
@Jhawins it's strongly worded, but relying on outside tools for daily operation of a company is dangerous.
 
8:57 PM
however, if the price ends up the same, or with little difference, there's no point for a company to invest in this
 
Especially tools without an SLA, like Github.
 
user1596138
Of course it's dangerous. Just like not having backups
 
@FlorianMargaine if you're running a lot of repos, it's a pretty clear win. We have a 4 core/4GB server with 300GB of SAN storage running Gitlab, 220+ repos and 60+ users.
 
user1596138
Doesn't make you an idiot lol. It's not like you can't manage a repo locally in a worst-case scenario
 
Github Enterprise is approximately 1 million dollars for that, and we can't use anything hosted (even if we could, it would be super expensive)
 
8:59 PM
Anyone who reads FCM here?
 
@ssube a little more, backups are usually compressed
 
and somewhat stripped too
 
user1596138
If you're a big corp ofc you should have something else. But if you're very small...
 
@ssube wat
 

« first day (1623 days earlier)      last day (3320 days later) »