« first day (1527 days earlier)      last day (3638 days later) » 

00:27
user image
2
00:37
Oh, cool. OCP certification guide shows normal examples of difference between IO and NIO...
fge
fge
00:50
@Gemtastic excellent
;D
Silence brings forth funny pictures
@fge May I ask? Why do you mix different code style in the same project? [yes, I'm again about the braces] :-/
Or is it by another contributor?
Ugh
fge
fge
@OlegKuznetsov it's by another dev, yes, I haven't had the time to go all over the code yet
01:41
What did the object say to the value? "I'd love to pass by!"
badum tss
fge
fge
Hmm, time for the lame jokes, it seems :p
Well then, here's one... How to solve IT problems? Windows: reboot; Unix: be root!
well, it's your fault for being quiet ;P
02:34
hello
i am newish to java and learning about javafx
hello
and i have been wondering what is special about the group
group?
like Group root = new Groop();
you could use stuff like VBox or HBox instead of that
does that make sense?
Well, Group has some different ways of handling its children compared to the other node containers.
02:39
alright
can you elaborate on those different types of containers (just for group)
thank you for your help.
Well it was nothing much
 
2 hours later…
05:10
Hola!
Anyone here?
How's it going?
Well, kinda slow atm :P
And you?
slow.. :( trying to figure something since two days. No luck so far
05:30
What is it?
05:43
trying to get tomcat7 to run on 8080
seems like a small issue but I've tried everything and nothing works :(
Ah
Did you set the catalina_home and all that?
I did!
If so then it's possible that something else is using the port
I checked for all of that :(
disabled all services that maybe running on port 80
Skype too?
05:47
the server starts up, but with exceptions
Then it's not so strange it doesn't run
No Skype. I'm trying to get it to run on a server where there are no such applications
when I change the port to 8080 form 80 - the server starts up well
What does it say when you echo catalina_home, java_home and path?
let me set the echo and check
well, 8080 is what it's supposed to run from
localhost:8080/
05:49
uh oh - I installed it via the MSI - can't edit the catalina.bat and other files now
exactly - but I can't have people typing mydomail.com:8080 to access my webstie
@Saturnian Why not?
they're...just not there :\
The server is live?
it is
Well, then I can't help you; I can only run a local tomcat server :/
05:51
oh no :(
everything was working until a month ago
and then suddenly my server went offline, and today I'm trying to everything back up - it's such a pain :(
@Unihedro added a python solution to your bounty question.
06:08
can anyone please help me with my tomcat7 problem? (can't get it to run on port 80) then please give a shout out!
What's the error message?
thsi is:
0
Q: How to get Tomcat 7 to run on Port 80 on Windows Server 2008?

SaturnianI've spent two days trying to get this to work. When I first started up Tomcat 7, it ran on port 8080 which is the Tomcat default. And so it could be accessed but typing: http://localhost:8080/ or mydomain.com:8080. But I wish to move from port 8080 to port 80 so I can type mydomain.com and be ...

@ChristianHujer what do you suggest I do?
06:27
I'm a UNIX guy. I don't know what could be the issue on Windows Server 2008.
Sorry.
Hi All
that's ok Christian
hey Co Koder
06:54
I want to insert this to sqlite database. INSERT INTO items (product) Values ('It's tape')
Never mind, I got it
 
1 hour later…
08:17
It seems that a new visitor, Andrew, just wrote a book in our transcript.
 
1 hour later…
09:33
pring.io i down
spring.io
10:05
it sprang back up :)
fge
fge
10:23
Moo
returns from a chess tournament; sees fge
Hi!
fge
fge
Hey
I wasted several hours because of that generics story so I drop it for tests
uh oh
I'll help with the tests!
fge
fge
That will mean a lot of copy/pasting...
Wait until I have done at least a couple :p
ok :p
10:46
Hmm... We need a bot to watch a few github repositories as specified and ping the subscribed users about new activity on the repository.
HAppy NeW YeaR everyone.. :)
Happy new year! :) (It's not new year over here yet ;))
I have started earlier.. :p
Hmm, I wonder if we can get hat!
which hat ?
10:48
Mistletoe (chat ±5 min. of 0 UTC 2015)
that is ?
okk/// i see
so, u need a hat ??? :D
Must get them all! :D
I have 26 hats.
every day, new hat... :D
fge
fge
11:00
sees an image of Alice In Wonderland's mad hatter
11:13
In Jsoup library can I ignore id and select elements by their class only?
I imagine yes?
If it supports CPath, that is
what CPath please?
Actually, I meant XPath
I think Xpath for xml docs ?
am true?
class=[containsClass('foo')]
fge
fge
11:29
<--- bloody damn hell f*ing stupid beyond all repair
fge
fge
I was so into my "own" lambdas that I didn't even see something utterly obvious
<-- failure
Oh??
@fge What was that?
fge
fge
11:59
@Unihedro I failed to account for... Well... Lambdas
gist.github.com/fge/358a89b1eed7205cfa93 <-- when using them, meh, it becomes much easier
...
??? Huh? I'm confused.
fge
fge
@Unihedro look at the abstract test class: gist.github.com/c18eba2db55c524f3a35
Hey that's clever!
fge
fge
Well, now I'll do a couple more conversions to ThrowingFunctionalInterface and tests, to see whether that can be improved a little more
And then --> ALL interfaces tested this way and all old tests removed
:O
Atomic (tests) Erasure?!
fge
fge
12:07
That will make for more tests with less code
But my word was I stupid not to see it before
It's never too late to find the shortcut :D
fge
fge
Sure, but failing to see the obvious makes you feel like a dork
Is anyone familiar with linux?
I tried to simulate a keystrike with the AWT robot, but I need a X server.
12:13
@fge I haven't looked at the JDK or your library, but have you considered creating a stream that just catches exceptions in lambdas (probably by implementing stream and using a thin layer over a delegate)?
@Bohemian Um... If you look at the JDK Stream, the layer of complexity makes overriding them for sole features really unviable
OK, but it would be nice
I agree, what would be even better is if we manage for the exceptions to go into a Sink instead of getting rethrown
fge
fge
@Bohemian meh, I don't know whether it would be worth it -- and note that you will be able to do rethrow(something).as(MyException.class) for each and every lambda, therefore you will be able to catch your own exceptions
rethrow(something).into(Sink);
fge
fge
12:17
@Unihedro why not but that won't prevent the stream to stop anyway
And the exceptions gets dumped into the Sink instead of getting rethrown, so you can harvest the sink for exceptions to show to the user at once
@fge Sometimes you don't really want the stream to stop. For example, say you're validating the user input, you would want to show the exception after it's all inputted.
fge
fge
@Unihedro but it has no choice but to stop
Hmpf.
fge
fge
A custom Stream could be doable but it would mean filtering out elements which fail the lambdas
Mockito rocks
fge
fge
12:19
Therefore delving into AbstractPipeline etc -- ouch
Hey, that gives me an idea
Can you override the traditional Stream?
fge
fge
ThrowingFilter!
oops no, it's final
@fge :O
throwing-lambdas-guava-edition?
fge
fge
Well, the way I see it you can make a ThrowingStream extending Stream
Yah, but not the implementation
You would have to wire it over
fge
fge
12:21
Why an implementation? Just use default methods
fge
fge
There could be something like, say, .filterMap(someLambda) which would return a stream of only the transformed elements for which the lambda didn't throw
fge
fge
But I don't see much of an interest in it
Using throws for multiple return values is mathematically sound but conceptually very bad
12:24
@BenjaminGruenbaum Well Exceptions are bad, blame JDK for leaving it in :)
Exceptions aren't bad
fge
fge
@Unihedro but anyway you can already do that
They're super useful given the alternative, having a clear pipeline just for algorithmics and then another one just for odd edge cases you can't say interesting stuff about is actually very useful IMO.
In languages that don't have it I end up simulating it
fge
fge
.map(tryWith(someFunction).orReturn(null)).filter(e -> e != null)
:( Please no
fge
fge
12:26
@BenjaminGruenbaum and why not
Not that I haven't done the exact same thing before in other languages :P
fge
fge
Anyway, with my library, if you want you'll be able to do it
@fge instead of orReturn(null) return an Optional
@BenjaminGruenbaum Nah.
fge
fge
@BenjaminGruenbaum no -- that's a waste
12:26
tryWith(someFunction) where the function returns T should return Optional<T>
fge
fge
You'd need to filter anyway after that
@BenjaminGruenbaum It returns ThrowingFunction, orReturn returns Function
fge
fge
No, worse
You need to both .filter() on .isPresent() and then .map() on .get()
No thanks
Converting T to Maybe T makes sense.
12:27
But this is a FI, converting a FI to Maybe FI makes no sense...
I'm starting to get the sense you guys haven't really studied type theory :D
fge
fge
That's a waste of computing resources if you have a value v for which you know that if v then filter it out
(facepalm)
fge
fge
And v may be null or soemthing else
@Unihedro no, it's converting A -> B or throw C to A -> B?
fge
fge
12:28
I don't care about type theory, I'm a practical kind of guy
nulls are horrible.
Yeah, but there are things that become apparent after you know the theory and one of them is that null is very bad :D
@BenjaminGruenbaum No, it's converting (function) to (function with new behaviour)
@Unihedro yes, it's function composition.
fge
fge
@BenjaminGruenbaum I'm not interested in CS masturbation -- I only want to know more about CS so that I can study better algorithms, but when practical stuff outshines the theory in practice --> I use the practical stuff
@fge How about Optional<T> orReturnEmptyOptional()?
12:30
There are people who nailed these things you're doing YEARS ago, really smart people who talked about it and peer reviewed it.
fge
fge
@BenjaminGruenbaum what I do is not composition, no
fge
fge
@Unihedro ouch...
You might want to consider seeing what other languages do.
@BenjaminGruenbaum You can look at the code if you want: github.com/fge/throwing-lambdas/blob/master/src/main/java/com/…
12:31
Inherently, what you have is a function A -> (B|E) where B is the return type and E is a thrown exception - so far so good?
fge
fge
@Unihedro that would mean turning the whole function or whatever from Function<T, R> into a Function<Optional<T>, R>
eh... no
Yes, this is what Java core itself is doing with the new Java 8 libraries - returning optionals.
fge
fge
@BenjaminGruenbaum where did you see that?
This is not the case at all
Do you understand why optionals have .map on them?
fge
fge
12:33
@BenjaminGruenbaum in Stream, you have a grand total of two methods -- two -- which return an Optional: .findFirst() and .findAny()
Yes, and that makes perfect sense in those two places.
default Function<T, Optional<R>> orReturnEmptyOptional()
{
    return t -> {
        try {
            return Optional.of(doApply(t));
        } catch (Error | RuntimeException e) {
            throw e;
        } catch (Throwable ignored) {
            return Optional.empty();
        }
    };
}
Because you only might get a result, getting a result is optional - just like when throwing an exception.
fge
fge
@Unihedro that would be Optional.empty() for the last line
Which is exactly what you're doing here.
fge
fge
12:34
No I'm not doing any of this
Look again
Do I return an Optional anywhere?
What does tryWith do?
@fge Meh, never used it, it's useless
@fge No, because you do not understand that abstraction yet :D
@BenjaminGruenbaum return a new function with different behaviour
@Unihedro what's different about it?
fge
fge
12:36
@BenjaminGruenbaum how is a Function an Optional?
It isn't
Full stop
@BenjaminGruenbaum Well, they are. As for what the difference is, you have to read the code to find out.
@fge I'm not saying that you should return an Optional<Function< - I'm saying you should take a Function<A, B> that might throw stuff and return a Function<A, Optional<B>>
If the returned function throws it is converted into an unfulfilled optional instead, although maybe either is a better idea here, then again Java doesn't have union types.
@BenjaminGruenbaum #20670970
@Unihedro you are in a cave chained to a wall... watching shadows projected.
@BenjaminGruenbaum Well it became a serious problem in C# because everything could be null.
12:39
@Unihedro That's false - In C# you have value types which cannot be null. However, I don't like nulls in C# and Java and I consider them a mistake. Also not sure how that's relevant.
Try to understand why Optionals have .map this is the key here.
@Unihedro why do you think it is both Optional and Stream have a .map function?
fge
fge
@BenjaminGruenbaum and that's a waste of resources if you can pinpoint a value which tells "meh, failure" -- and that value may be null for all we care
An Optional is NOT cheap
A filter on "not null" IS cheap
Why do you think an optional is not cheap?
Also - the most fundamental thing here is "why do you think you can map both an optional and a stream"?
fge
fge
Again: practical stuff for the win here
It's not about being more or less practical, it's about broken abstractions vs shorter more concise code.
fge
fge
I don't care about abstractions which only CS theory views as broken
If practically it's cheaper --> I use it
That's all
12:45
Lol, that's such a thing Java developers say :D
fge
fge
That said, I can code that Optional sutff
We don't understand abstraction X so our way must be better.
fge
fge
Yeah, and that assumes I don't understand what Optional is about
Sorry but I do
It's not about CS theory, it's about how types work in a programming language and what flow control in programming languages really means.
@fge you have argued differently over the last 30 minutes :D
fge
fge
@BenjaminGruenbaum which is exactly theory
12:46
quietly sneaks away before the two experts starts flaming
fge
fge
Ohwell
@fge it's about how they work in practice.
Quote from Tony Hoare inventor of the null, called null his "billion dollar mistake"
You do realize that you can stream optionals transparently through a stream or create an optional stream that ignores optionals since you can .map them...
fge
fge
YES I DO
But it is NOT CHEAP
12:47
Optionals and Streams are both abstractions over flow control.
fge
fge
Can you are least acknowledge that?
The very basic notion of chaining stuff
The semicolon.
@fge so your argument for your library that wrapes things in try/catch is performance?
fge
fge
Gee
No -- read the README as to why I've started that in the first place
And yes, I plan to do that "optional" stuff because it can be useful
But right now I'm on other stuff I want to do
In particular, tests
Did I hear tests? :D
fge
fge
@Unihedro ewwww
"pass" -- another thing I hate about Python
12:51
I'm not asking you to add it, I'm asking you to understand it. I'm sure you're a competent developer and I'm sure you're reluctant to admit you don't know stuff - I'm also going to guess you you understand DI pretty well now. What flow control really means in programming is super crucial to building the abstractions you're building in my personal opinion and I think it could really help you. So I'm being annoying and trying to get you to read about it :D
sighs for posting image; thinks fge is going to spend another hour complaining about stuff in Python now
Now I'm just going to leave this here and plan none of you kill me :D
fge
fge
@Unihedro yeah, you're right -- back to coding
Sorry all for my outburst(s)
Outbursts are good :D I find them very productive and good learning experiences :D
@BenjaminGruenbaum Is that language agnostic?
12:53
@Unihedro erm... yes :P?
Just try to read it, if you can't no big deal
fge
fge
OK, test for ThrowingComparator done: gist.github.com/fge/115d29ad3f63e2fb05d4
phew
@BenjaminGruenbaum Well, firstly it's really long. And secondly, the color scheme looks terrible.
Get a PhD in computer science.
Throw it away because you don’t need it for this section!
Such dry humor, wow, very impress
fge
fge
pitest really rocks
I wonder whether such equivalents exist for other languages (compiled languages in particular)
@fge you really don't want to hear what I have to say on that :P
fge
fge
I guess not
(do you know what pitest does, at least?)
13:02
(Yes, it's pretty cool)
fge
fge
@Unihedro OK, getting started on rewriting test (branch topic/throwingfunctionalinterface), if you want to chime in, feel free :p
I'm attacking the Consumers right now
will join you in a sec, debugging pham on resharper
(It's also extremely common in C#, in F# even more so, also in JVM land in Scala)
git fetch --all --prune
git pull fge
fge
fge
Hold on a second
There
13:13
@fge lol
brb brew hot chocolate
@BenjaminGruenbaum Let them be practical FFS.
you can only masturbate with type theory, there's nothing practical you can do with it.
fge
fge
@Unihedro pull -- again
user1804599
13:17
@Jefffrey I found turning type intersections into type unions using De Morgan's law and the Curry–Howard isomorphism quite practical in at least one case.
lol
@rightføld I don't know you, but I get this feeling that whatever project it was in, you didn't completed it.
Am I right?
user1804599
Exactly.
See, then it's not practical.
"Ship it even if it's terrible" -- is my motto
user1804599
I wanted to restrict some type parameter to either InputStream or OutputStream.
@rightføld create an enum with two members one is an InputStream and one is an OutputSteam
user1804599
13:20
Could've done it with an ADT with a type member, but meh.
user1804599
@BenjaminGruenbaum Then they both have the same type.
Return null for InputStream and OutputStream for the rest.
user1804599
lol null
Who needs input anyway?
Java, PHP, Ruby, Python
4 of the most used languages out there have null.
It can't be bad, right?
user1804599
null in PHP is a little weird.
user1804599
13:22
If you have function f(T $x) then you cannot pass null (thank god).
That's type hinting.
user1804599
More dynamically typed languages should have it.
That's the whole point about it.
It's a runtime error anyway.
user1804599
Ah, I found the code that did that trick.
It's syntactic sugar for prepending if (!($x instanceof T)) { /* some error */ } for every argument
user1804599
13:26
Which is nice.
Not as nice as what those great people from Facebook did with Hacks (or whatever it was called).
static Analysis ftw;
@Jefffrey Facebook sucks.
user1804599
@Jefffrey No need for those parentheses; PHP got the operator precedence of instanceof WRT ! right. :P
@Unihedro Yeah, that's very relevant. Thanks.
@Jefffrey You're welcome, I love being relevant and helpful! :D
Ugh, Windows's terminal sucks.
fge
fge
13:31
@Unihedro install cygwin
@fge This is possibly one of the last times I'll be using Windows.
13:46
@fge I don't get it, what is SpiedThrowingComparator there for?
Hello all!
Hello @ZouZou!
fge
fge
@Unihedro for spying reasons ;) We need to verify the number of invocations

« first day (1527 days earlier)      last day (3638 days later) »