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

2:12 PM
@fge Hey, I was answering this: stackoverflow.com/questions/23038673/… But now I realized that there is a problem with the API. For instance you are require to cast the result of parallel()
I.e Map<String, Integer> result = MapStream.of(m1, m2).parallel().mergeKeys(Integer::max).collect();
does not compile
and you have to do Map<String, Integer> mx = ((MapStream<String, Integer>) MapStream.of(m1, m2).parallel()).mergeKeys(Integer::max).collect(); which is ugly (and generate a warning)
I though to do interface MapStream<K, V> extends BaseStream<Entry<K, V>, MapStream<K, V>> that would work but not a good idea at all IMO as I have to redefine all the methods from the Stream class.
 
fge
@ZouZou you can @Override parallel() and make it return a MapStream
 
@fge Actually I just did this
 
fge
When you override you can change the return type as long as it is a subclass of the original
 
`default MapStream<K, V> parallel() {
return parallel();
}`
Yes this is what I did in the DefaultMapStream implementation
but the problem was on the interface itself
even if the "actual type" was an MapStream instance
 
Ugh, seriously, don't SSH through chrome...
It just crashed when I tried to...
 
2:23 PM
@fge I would expect a Stackoverflow error tho?
why does it work
 
Good morning, Java!
 
hey @Michael
 
Hey @ZouZou
 
@fge Now I could get rid of the @Override filter in the DefaultMapStream implementation !
still don't know why it doesn"t produce a StackOverflow
 
OakBot Online.
 
2:27 PM
OakBot crashed, because, apparently, SO Chat went down.
 
Somebody say something witty (that's star-worthy)
2
 
fge
@ZouZou yeah, that's strange
 
@fge There's no more need for the DefaultMap class
 
fge
Sorry, not really paying full attention, onto rewriting tests at the moment :p
Next version: .map(tryWith(f1).orTryWith(f2).or(defaultFunction) will be possible
Yay
 
@Bohemian There are 10 kinds of people in the world: Those that know binary & those that don't
xD
 
fge
2:32 PM
Or .map(rethrow(f).as(MyException.class))
 
@fge you seem to vacillate between API choice of your lib - I suggest to build a suite of realistic use cases and make your API work for those
 
fge
@Bohemian I don't really vacillate; anyway, all of wrap(), rethrow() and tryWith() return exactly the same thing
So do .orThrow() and .as()
 
@Michael Yeah, SO's chat domain isn't as stable as the main site.
 
fge
THerefore I only have to give names to make things more readable depending on what you want to do ;)
rethrow().as() is exactly the same as tryWith().orRethrow(), only the names differ
 
In the words of Josh Bloch: "make your API as simple as you can, but no simpler"
 
fge
2:38 PM
There is a difference between "simple" and "legible"
The API is actually pretty simple
 
Java? Simple API? Have you ever tried to make an HTTP request in Java?
 
@Michael and 87.5% of statistics are made up on the spot.
 
xD
 
Slight "whine and cheese" comment, but chat on mobile is extremely challenging
 
Oh?
 
fge
2:46 PM
@Bohemian at least you don't resort to using aolbonics like so many people do even with full fledged keyboards
 
lol
 
Morning @Michael! Didn't notice you originally, sorry :p
@fge feels proud for always typing in best oriented grammar
 
Morning @Uni! xD
 
most of the time, at least
 
The mobile site lacks features, eg you can't star comments, but the full site on a mobile doesn't zoom properly. You can zoom, but the right nav crap quickly expands to cover the whole screen (its right edge is anchored to the screen edge)
 
2:49 PM
That stinks.
 
@Bohemian You can star through the transcript, or onto messages that already has stars.
For example, I just starred Michael's message, and you can star it now by clicking on the star.
 
@fge I get it. When have a default method like this
@Override
default MapStream<K, V> distinct() {
    return distinct();
}
if there is NO concrete implementation in a class, you'll end up with a stack overflow
otherwise it'll call this implementation
 
fge
@ZouZou makes sense
 
@fge Yes but I was confused at first
because since you have a default method, the class is not required to implement it
so you have to be careful
 
Fear not @Boh! After I finish the chat client I'll port it onto Android ;)
 
fge
2:52 PM
@Unihedro uh, you do it in Java 8, right?
 
@fge java6
 
@Bohemian You don't happen to know where we could find a formal specification of the SO Chat API, do you?
 
@Michael there isn't one. Sam, Fox and I are writing an unofficial one though.
 
fge
@Unihedro phew OK, then it shouldn't be a problem
 
@fge Even if it was Java 8 there exists a library that translates the java 8 bytecode into java 6
 
2:53 PM
@Unihedro Can I help? :D
 
If you zoom big enough to read text, you can't read anything. Even to send these msgs I have to zoom in to type+see what I'm typing, but then the send button is off screen and can't be scrolled into view; I have to zoom out until I see the button then very precisely touch it with hips
 
fge
@ZouZou doesn't matter; Android's VM doesn't use Java bytecode for starters
 
@Bohemian YEs, use mobile site - zoom really really out, then reach for the small options under the SO logo to the bottom right
@Michael sure :D I'll set you up when I can :)
 
kk
 
From the authors of ChatExchange, ChatExchange.Net and JChatExchange... :|
 
2:55 PM
@Bohemian Sounds difficult to use, to say the least. :(
 
@fge It translates it into dalvik bytecode
 
fge
@ZouZou ah, so such a thing exists? Even though, can it really handle lambdas?
 
@fge But I think you can only use the new language syntax (I have never tried it)
yep
 
fge
Dalvik does not have invokedynamic AFAIK
 
@ZouZou :O
 
fge
2:57 PM
Huh
 
3:22 PM
=javadoc TimeUnit#sleep
 
@Michael void sleep(long timeout): Performs a int) Thread.sleep using this time unit. This is a convenience method that converts time arguments into the form required by the Thread.sleep method.
 
Very nice. :)
 
@Michael When I build your bot, where should I add the binary zip files for javadocs of libraries?
Must I assemble w/ maven?
 
@Unihedro A directory called "javadocs".
I really should make that configurable.
 
@Michael during source compilation, or runtime?
 
3:29 PM
Runtime.
Here's a bunch of javadoc ZIPs if you want to use them: dropbox.com/sh/xkf7kua3hzd8xvo/AAC1sOkVTNUE2MKPAXTm28bna?dl=0
 
Ok! I haven't done it yet, so I just wanted to make sure. Thanks!
 
No problem.
 
fge
3:41 PM
Aah, tests
@Unihedro I just recalled why I created the Spied* class
 
Oh?
 
fge
It is because mockito does not support default methods in interfaces
 
Oh I see!
 
4:06 PM
@Unihedro Since all of the ZIP files now use the same format, it simply ingests all the ZIP files in the "javadocs" folder it can find.
So you can put whatever you want in there now.
 
Yay!
 
I'd also like to watch the folder, to respond to the adding, removal, and modification of ZIP files.
Currently, you have to restart the bot in order to pick up any changes.
 
Why not =reload command?
 
fge
=javadoc WatchService
 
@fge java.nio.file.WatchService: A watch service that watches registered objects for changes and events. For example a file manager may use a watch service to monitor a directory for changes so that it can update its display of the list of files when files are created or deleted. (1/9)
 
4:10 PM
I'd rather not have intensive file-io though, I'm not going to change anything digital-environment-wise after uploading the bot ;) But I can change that within the source code and recompile, so it doesn't really matter
 
fge
=javadoc FileSysetm#newWatchService()
 
@fge Sorry, I never heard of that class. :(
 
fge
=javacod FileSystem#newWatchService()
 
@fge I don't know that command. o_O
 
fge
Aargh
 
4:10 PM
javacod
Java Call of Duty - coding game coming soon to a room near you
Oh god I can't stop laughing.
 
fge
Anyway
On a Path, do .getFileSystem().newWatchService() and then register it on the Path instance
 
=javadoc FileSystem#newWatchService()
 
@Unihedro WatchService newWatchService(): Constructs a new WatchService (optional operation). (1/2)
 
fge
@Michael I do hope you use the zip filesystem by the way :p
 
=javadoc FileSystem#newWatchService() 2
 
4:12 PM
@Unihedro This method constructs a new watch service that may be used to watch registered objects for changes and events. (2/2)
 
@fge Sure do! :P
@Unihedro That would probably equally, if not more, complicated.
 
@Michael um... compare all files with existing cached files, and unload from memory what's gone, and load what's new?
 
Because it's a "meta" command--it deals with how the bot runs.
 
... Oh.
 
@Unihedro Because it stores Javadoc information in a cache, it would have to keep track of which class is from which ZIP file, then clear the cache if the ZIP file is removed or has changed.
 
4:16 PM
k, new idea: on reload, dump new stuff in the cache if any, and have the rest remain the same
 
That's pretty much what it'd have to do.
 
ahh
 
It shouldn't modify the javadoc information of ZIP files that haven't changed.
 
Well in that case... Forget it :p
 
fge
Well, just use my java7-fs-base to program a java7-fs-stack :p
 
4:19 PM
I don't think it would be too difficult, actually.
 
fge
@Michael you may want to have a look at that project, it's pretty nice: github.com/jhalterman/expiringmap
 
> At this moment, this package depends on a package in... sun.nio.fs
:(
@fge Aahh, that might come in handy.
 
fge
Yeah, I know
I want to salvage the code by OpenJDK but it's GPL
So I cannot
I have to build a GlobPathMatcher by myself
And that's really not the priority
First priority is make all *FileAttributeView loading on demand
<--- has waaay too many projects
 
^ true that
 
fge
(and if I get the job I want I'll have even less time to work on them -- darn)
 
4:33 PM
Morning
 
Morning
 
@Gemtastic Morning!
 
What's up?
 
fge
Coding
(when I'm not entangled with heated debates)
 
As it should be then ^^
 
4:37 PM
@Gemtastic Not much. Did you ever get java to work on your laptop?
 
Eh? Java's been working on my laptop all along O.o
 
You were having trouble setting the PATH, remember?
 
That was resolved loong ago ^^
 
Ah ok. :D
 
Turns out I didn't actually have a problem with it >_>
I was just dumb XD
Classic case of PEBKU
 
4:40 PM
They say that, often times, the problem exists between the keyboard and chair... xD
PEBKU?
 
atlantic VPS seems cheap.
Meh, not going to use it though.
 
4:59 PM
@Unihedro Pssst. Use AWS. It's free.
 
fge
Consumers conversion to TFI --> done
Now (ouch) Functions
 
hii i m searching for a mentor
someone who may help me and gives me advice to learn from his experience
 
@Michael I'm using DigitalOcean VPS because I have a 2 months free promo code (:D) and it seems to be great for my needs so far; AWD is free and great for most projects, and I recommend it to my friends a lot, but I'm looking for something more robust, but thanks for the suggestion :)
FYI, I might actually keep this and run our web server for javaroom.website on it
 
fge
@MohammedHousseynTaleb oh, so you're looking for work? I have plenty :p
 
@Michael Problem exists between keyboard and user
 
5:09 PM
^^^^
 
@MohammedHousseynTaleb Are you looking to hire someone, or you're looking to work with people in here? :)
 
@fge yes if you wanna help me to learn more and more about java
 
fge
Well, currently unfortunately I don't really have the time; between my own code and tutoring @Mr.777 I have my hands pretty full
 
@MohammedHousseynTaleb how much Java do you know?
 
5:13 PM
@fge i m looking to learn i want to discover all i can @Unihedro for hiring i would but i can because i dont have how to pay i leave in algeria and may you haven't heard about it , there is no e-commerce no paypall school is too much ancient(they learn pascal) so i want too become a great one
 
Oh god, one of the survivors of sanity from the realms which are still teaching pascal!
in Room for Uni and Sam on Meta Stack Exchange Chat, Nov 21 at 13:25, by Unihedron
That's the nickname I call my other people in the programming class, 'cuz they can do PASCAL
 
@Gemtastic swing threading basic on jsp hibernate , rmi , jdbc and xmlencoder
 
Please have a seat and calm down and start using your full keyboard, which would help communicating with us.
 
fge
Well, apart from multithreading I can't really help on those
 
@fge that's what he knows, he wants to learn new stuff
He, like myself, wants to be the very best, that noone ever was!
 
fge
5:18 PM
You're ambitious :p
 
@fge all i ask you is if you would like to help give me a hard topic about threading to do on java exemple ask me to try doing someting that you know is pretty hard and give me a small hint
 
fge
I just want to be able to do some stuff
 
@MohammedHousseynTaleb So you want us to push you to do something, and guide you instead of holding your hand through something like tutorials do, except they always fail to convey their ways clearly?
 
@fge Something wrong with that? Aim for the star and maybe you'll reach the sky
 
@Gemtastic keyword: maybe
 
5:19 PM
@un
 
@Unihedro Well, I'm already on my Java rocket
 
fge
@MohammedHousseynTaleb hard stuff? What about implementing .toString() threshold on this? :p
 
(facepalm)
 
@Unihedro yeees
 
@Unihedro Are you implying I suck? :(
 
5:21 PM
@fge ? you want me to try to create a methode like to string ? is that ? sorry english is my third langage
 
fge
@Unihedro by the way, I could do with some help on throwing-lambdas :p
 
@Gemtastic no, I was surprised by fge's definition of "hard" - that's almost impossible!
 
fge
@MohammedHousseynTaleb no; read the README of the project
 
@MohammedHousseynTaleb Good luck, you're talking "hard tasks" with some of the best Java developers in here
1 message moved to Java Sucks
 
@Unihedro Then I'll keep on firing into space then ;P
 
5:22 PM
@fge Coming :)
 
Just wanted to say that for the record.
 
@fge ok i will start right know thank you so much
 
@Jefffrey You know it won't stay ;)
 
For the record, WDGAF
;P
 
@Unihedro No, I don't. I don't see why a comment about Java is not a good fit in a Java room.
 
5:23 PM
No H8 during the season of hardcoding while you have time off of work/school
 
git fetch --all
git pull fge/topic/throwingfunctionalinterface
 
fge
There is one thing that I really hate, and that is more and more common
 
Google
 
fge
Web sites on which the layout is messed up when you don't activate JS, provided there is content at all
 
Hehe! IKR
And, you know, inline styling
 
5:28 PM
What about the inline? That you can't scale it?
 
no, that they completely ignore what CSS is for (having classes in stylesheets)
 
Ah, wow... People do that?
 
<h1 id="header" style="color: green;">
use stylesheet dammit
 
@Gemtastic I don't hate Java.
 
Are they self-taught or is it some kind of crazy (stupid) fad?
@Jefffrey Well, that's good
 
5:30 PM
I'm just saying that it's terrible.
 
@Jefffrey And that's good!
I love Java as it's terrible because the people who build classroom software uses Java. Terminal, fifteen seconds and it's dead.
 
The whole null thingy for example is beyond insanity.
 
@Jefffrey Everything in C# is nullable.
 
I have no idea what they were thinking when they added that.
@Unihedro Ok. So?
 
fge
What, you're at it again?
 
5:31 PM
Again?
 
fge
Can't you give it a rest and do, I don't know, useful stuff?
 
@Jefffrey Quit it, you're expecting us to give in and agree that Java is terrible, while you're not conveying anything convincing.
Life can be a whole lot more productive.
The pull finished btw.
 
I'm trying to start a conversation about Java. I don't really see a problem here.
 
fge
You know, Andrew Tannenbaum said that Linux was obsolete back in 1995
And look at where we are today
 
I <3 *nix
 
5:33 PM
If you want to talk about how much Java sucks you should go to a C chatroom
 
fge
It's the same story with "Java is terrible because it doesn't have this and that"; people also said that in 199x
And look at where we are today
 
Do you guys think that null is a good thing?
 
@Jefffrey You're going to enjoy your conversation more in this room:

Java Sucks!

JavaScript Sucks!
 
It's kinda like me saying "SO chat sucks because I can't like or upvote what uni just said".
Starring just isn't the same...
 
@Unihedro No, because I know the owners there and I know exactly their opinions about this. So that would be kinda boring.
Also it's empty right now, so...
 
fge
5:35 PM
Hmm, what's the meme already?
Ah, yes
 
@Jefffrey Any "Java sucks because X" conversation is boring because cause(X) is stupid.
 
fge
"Don't feed the troll"
 
@Gemtastic Guess what?
 
@Unihedro They're working on the feature? :D
 
@Unihedro So, what's stupid about "the existence of null makes type safety a joke in Java"?
Where am I wrong?
 
5:35 PM
@Unihedro Hmm. That room looks pretty empty to me. Guess Java doesn't suck after all. xD
 
@Gemtastic No, not really, I am, you'll see it when Senior is in beta, it's going to wire to a small API which allows you to like and give karma to messages, as well as favourite some
it's going to use the StackApps API
 
@Jefffrey Null is great (when used properly).
 
If we go by the scientific definition of intelligence in mammals, the concept of null is a factor of intelligence.
 
@Michael It implicitly exists everywhere, though. Is it still great?
 
@Unihedro Oooh so Junior is gonna learn how to do that. Neat!
 
5:37 PM
@Jefffrey s,everywhere,object types
 
@Jefffrey Null it's a value. Its the absence of a value.
 
primitives cannot be null, only objects can - period
There's even Optional, which works with Null well
 
@Michael I know, but that doesn't answer the question.
 
@Gemtastic Senior is the name of the upcoming chat client.
 
@Jefffrey Which is?
 
5:38 PM
@Unihedro Oh, right.
1 min ago, by Jefffrey
@Michael It implicitly exists everywhere, though. Is it still great?
 
@Jefffrey In C# - everything can be null - can't beat that
 
@Unihedro Oh, I see. I thought it was what you decided to call Junior when he's done XD
 
@Gemtastic :D
 
Where can I read more about Senior?
 
@Jefffrey How can it "exist". It's not a thing. It's not a value.
 
5:39 PM
@Michael You seriously don't understand what I mean, or are you being intentionally dense?
 
@Jefffrey lol No, I really don't understand.
 
That any class type T (is that what's called?) object can accept, not only T objects, but also null.
 
@Gemtastic Currently it's in WIP: JCE -> improve and air Junior (chat bot of this room) -> Senior (chat client) + other bots
 
So, T x; can accept new T(..) but also null.
 
@Jefffrey Correct.
 
5:41 PM
So the question is: do you consider this great?
 
@Jefffrey yes
 
@Unihedro Is that a chatroom on SO?
 
@Unihedro Why?
 
@Jefffrey without null, you'd be like in pascal: when you write var mystring:string;, you get mystring as an empty string value
 
@Jefffrey When used properly, yes.
 
5:42 PM
And when you declare an object, it's enforced to be constructed on initialization, and no way to override
Even though it's not initialized, only declared, you still have to do this again:
mystring = '';
 
@Jefffrey Though, admittedly, NullPointerExceptions are the bane of every Java programmer's existance. xD
 
@Michael The question is not "Do you consider null great?", to which "When used properly, yes." makes sense. The question is: "do you consider this great?".
 
fge
Meh, I have solved this problem
 
@Jefffrey Yes.
 
@Michael Why?
 
5:44 PM
@Gemtastic no, those are separate programs - JChatExchange is a library to programmatically talk to SE Chat (among other features), Junior is the chat bot, Senior is a chat client (in Java, with SE chat, among other features)
 
fge
"Unless otherwise noted, all methods in this class do not accept null arguments; if a null argument is passed, those methods will throw a NullPointerException"
There, documented
 
I expect things to be null all the time when I'm programming in Java.
 
@Unihedro I don't get your argument tbh.
 
As for what "bots" are:
in Teenage Programmers Chatroom, Dec 22 at 15:31, by Unihedro
@Pro @Sam I'm thinking of making a network of bots to go with Junior, for example, to have per-room features that the room users can benefit from them and we can have automated cross-room activities ( :O ), thoughts?
 
@Unihedro That wasn't my question. I wan't to find where I can read more about the client.
 
5:45 PM
Are you saying that null is great so that a default value of uninitialized objects exists?
 
For example, there's a method in OakBot that sends an HTTP request, and retries the request if an error occurs.
 
@Gemtastic Oh - You can't, it's not done yet. :p
 
Aww
 
I'm working on it! It's only going to be open sourced after it's all done.
 
@Michael And that's good?
 
5:45 PM
Well, it doen't have to be done, I just wanna read what's been said about it and stuff
 
I hate to screw up something in the middle and have the history burned it eternally, so..
 
but meh
 
One of the parameters to the method is an expected HTTP status code, because, in some cases, I want it to resend the request if a non-200 response is returned.
 
The Complete Specifications of What Unihedro Mentioned which would be in Senior
 
However, in some cases, I don't want to check the HTTP status code. So I set that parameter to null in those cases.
 
5:46 PM
@Jefffrey That, and you can have an absence of value when you need it. Without null, you must have dummy values.
 
It makes checking for optional parameters/settings/etc easy.
 
User user = NONE;
instead of null - boring
 
@Unihedro Optional<User> maybeUser = Optional.empty(); (or whatever is the value for an empty optional.
 
Also, if you complain about libraries throwing null - just read their man pages
Null is always documented by convention
 
And how would you do that with an integer? I can't always say "if it's less than 0, then ignore it". What if all integer values are valid?
 
5:48 PM
That's ridiculous because now you're enforcing the use of Optional where you could have lived without it.
 
@Unihedro It documents intent.
 
@Jefffrey Documenting is to be done through commenting, not bloating.
 
The intent of a user that could exist or can not exist.
 
If you now state that "This method may or may not return a may or may not existing value", are you going to make an Optional<Optional<User>> now?
That's type pollution!
Optional<Optional<Optional<User>>>...
 
@Unihedro If you remove null and have an implicit Optional type, then the static analysis of the program is easier.
 
5:50 PM
@Jefffrey static analysis sucks
 
@Unihedro Can you make an example?
 
@Jefffrey Stream.findAny()
 
I don't see why you can't just keep Optional<User>?
Optional<Optional<User>> seems dumb
 
@Jefffrey Because of your premise: documenting intent
@Jefffrey it is, the entire "let's return an Optional<User> instead of putting in a dummy value" is as well
 
@Unihedro You can do that just fine with Optional<User>
 
5:51 PM
@Jefffrey no you can't
the intent is lost
 
@Unihedro how so?
 
@Jefffrey It is. It is. It is. CODE DEMO. See, it is. Bye.
 
lol
good job
 
@fge is there a "git console" over terminal in intellij?
I can't type anything in the "Version Control Console", there are only logs
 
fge
@Unihedro there's a terminal window available
There's a shortcut for it, I pressed it by accident once or twice but I don't remember it
 
5:54 PM
@fge Eh... It's...
Borked (windows sucks)
Forget it, I'm going back on a proper machine tomorrow anyways
 
fge
Ohwell, how do you want me to tell you, it's been more than 10 years since I've been using Windows :p
 
Found and opened git bash and am using it now, no worries :)
 
@Jefffrey null is horrible.
 
eh
 
@fge I'm going to work on Suppliers :)
 
fge
5:59 PM
null is something you have to deal with; if you can't deal with it and only keep complaining about its presence in this or that language then you lack discipline as a programmer in general and shouldn't do development
2
Full stop
 

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