« first day (1521 days earlier)      last day (3414 days later) » 
00:00 - 14:0014:00 - 22:00

12:00 AM
ah nvm
 
fge
Ouch, README is seriously outdated
I now have fail fast/keep going deletion and copy
Plus chmod
MoreFiles.chmod(0755, someFile);
It works :p
 
on every OS
?
 
fge
On OSes which support PosixFileAttributeView, yes
I also have a MorePaths.resolve() which is pretty useful
Since it allows recursive copies from one FileSystem to the other even if they have incompatible separators
 
You don't have any examples in the wiki !
 
fge
No, right now I'm focused on implementing and testing
This is a pretty fun project
I'll release a version of it very soon and then on to grappa 1.0.0, and then implement inlining in json-schema-validator, and then working on java7-fs-base, and then... Uh
 
12:06 AM
you are the java nio guru
you have a lot of works to do
this is for personal stuff or professional,
?
 
fge
@ZouZou personal
But I am not a guru, and what I'm interested in is java.nio.file
I don't care much for other nio packages ;) Except maybe channels, and not asynchronous ones at that
@ZouZou if you have time to spare I'd love feedack on this; the problem is that I'm writing it with plenty of experience manipulating that API already
Therefore I fear that I don't get "back to the basics" enough
 
I'm not very experimented with the file API, so my only comments will be from a beginner point of view :D
I'll add to my todo list
 
fge
@ZouZou which is exactly what I'm looking for
 
perfect
 
fge
@ZouZou otherwise you can have a "fun" read in the meanwhile ;)
(that's also mine)
 
12:20 AM
I already since those in the chat earlier !
ah no
you linked it on your answer that I upvoted
I started to read it
 
fge
Yup, that's true (linked to a part of it)
 
it was a great improvment
this file API
 
fge
Yes, and an underestimated one at that
Java 9 will supposedly do the same for processes
 
wait how do you know ? :D
 
Hello everyone!
 
12:24 AM
FileNotFoundException, aka "the most useless exception to ever grace the JDK".
hahahaha
hey @korima
 
Do you know where is the correct chat room to post a questionn about dependency injection?
 
fge
@ZouZou various sources on the Internet, and more than one, including by some OpenJDK guys
 
@fge Arg I forgot that every new operation on Stream returns a new Stream.
 
fge
@ZouZou except for terminal operations
 
Instead of
public ByteStream distinct() {
    wrapper.distinct();
    return this;
}
ah yes
it should be
public ByteStream distinct() {
    return new ByteStream(delegate.distinct());
}
and same for others
but terminal operations does not return a Stream anyway right?
 
fge
12:32 AM
No, they never do
It irks me -- I want to do a java8-stream-base the same way I am doing a java7-fs-base, but that is veeeery far in the future, if ever
 
Why would you do that?
I mean which feature would you implement with this approach?
add new operation on the streams themselves?
 
fge
No
For instance, do you remember what I talked about earlier about block ciphers?
 
yep
 
fge
Let's say you want a stream of, say, 512 bytes arrays
You have to use a Stream.Builder right now
But the stream will not be built, and therefore, no data will be fed, unless you .build() the stream
This is inefficient
Sure, you could use the fork/join framework
But then why have streams?
Unless that fork/join framework has some new functionality which I didn't see (after all, streams do use that framework internally), it looks like a lot of effort to parallelize an operation which should be easily parallelizable
The worst of it is that the JDK does have such stuff: look at Files.lines()
But no Files.blocks(somePath, someByteArraySize)
(which would return a Stream<byte[]>)
When I started working with the innards of java.nio.file I stumbled upon the same problems: no helper classes at all
 
12:47 AM
ah so you idea would be to get the byte[] on the fly
 
fge
Yes
 
to not use too much memory
I see
 
fge
And other stuff which could be fed on the fly to a Stream and that Stream.Builder doesn't allow to
And that's not only a question of memory
That's a question of usefulness
I stumbled upon the same problem with java.nio.file when I started working with the innards
Look at Path and the number of methods it implements; yet you have zero helpers
In my implementation of -base, well, Path is final and all the path resolution work etc is delegated to a factory which takes into account pretty much every situation out there
Including non hierarchical filesystems
 
Well, sur ces mots je vais aller dormir !
already 2a.m
 
fge
Stream is just as "bad", although the problems you have are different
Here too, heh
"Bonne nuitée les petits!"
 
12:52 AM
good night
 
 
1 hour later…
fge
2:20 AM
0
Q: Files.createSymbolicLink() takes an array of FileAttribute<?> as an argument; does it make sense on any OS?

fgeThe prototype of Files.createSymbolicLink() is: static Path createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) Well... Why? A symlink is nothing else than an inode whose content is a string pointing to... Well, whatever. The target can even not be valid at all. Out of ...

(if there were a "procrastinator" badge I'd have the gold)
 
Has anyone here tried to do Java with Xcode?
 
@fge So, you're trying to assign access permissions to a symlink?
@Moshe Not me. Sorry.
 
fge
@Michael the API allows it; therefore it has to make sense somewhere
(I think)
 
Are you saying that there's no reason why anyone would want to assign permissions to a symlink?
 
fge
I don't see any
 
2:35 AM
What about, like, a "read-only" flag on Windows?
 
fge
You cannot even change the "value" of that symlink even if you're the owner
Well, none of the filesystems supported by Windows have symlinks the way Unix has
 
Couldn't you, for example, give a symlink 700 permissions, so only the user can even see it?
 
fge
No, that's useless
 
Why?
 
fge
@Michael look at that:
root@alustriel:/tmp# echo hello > world.txt
root@alustriel:/tmp# ln -s world.txt symlink
root@alustriel:/tmp# chmod 400 symlink
root@alustriel:/tmp# ls -l symlink
lrwxrwxrwx 1 root root 9 Dec 22 03:45 symlink -> world.txt
Permissions did not change
You can chown though
But the net effect is the same
 
2:47 AM
What are the permissions of world.txt?
 
fge
Who cares? That's not the important part here
 
Maybe there's a flag you have to set on the chmod command to have the permissions apply to the symlink itself
 
fge
You cannot alter the permissions by which a symlink target is accessed if this target exists at all
No there isn't
But even if there were that would not help matters
Darn, I knew at some point about the core of this matter, at least under Linux
But anyway -- nothing you do will ever "alter" a symlink
Even if you do ln -sf, what it does is create a NEW symlink and replace the old one
 
A symlink just "points" to another file, right?
 
fge
root@alustriel:/tmp# ls -i symlink
6306846 symlink
root@alustriel:/tmp# ln -sf prout symlink && ls -i symlink
6306855 symlink
(not the same inode number)
A symlink is just some random text
It may, or may not, point to an existing resource
There is no obligation for it to do so
(which is why you can have symlink loops)
 
2:51 AM
So, it can point to a non-existent file?
 
fge
Yes
Just as in my example program
The matter was not that the target did not exist
It is just that I tried and set initial file attributes
You can do ln -s 'Meh. Find me. I challenge you!' mySymlink
Anything goes, the only limit is the length of the "target" (I cannot recall what that length limit is either)
 
It sounds like symlinks are pretty simple constructs.
 
fge
They are, yes
Simple yet useful ;)
Like pretty much everything Unix :p
 
So, why would they need file attributes then?
 
fge
Well, that's the question, right?
 
3:01 AM
What about hard links and soft links?
 
fge
Those terms stem from a misconception to start with
 
Is the symlink file for a hard link different from that of a soft link?
 
fge
Apart from directories, on a same filesystem, an inode has one link per "mention" in a directory; and this mention consists of two things: the name and the inode number
This is how you get "files"
In fact, ANY inode other than a directory linked into a directory has a link
Even a symlink can be linked several times
fge@alustriel:~/tmp/t$ ln -s x l1
fge@alustriel:~/tmp/t$ ls -l l1
lrwxrwxrwx 1 fge fge 1 Dec 22 04:09 l1 -> x
fge@alustriel:~/tmp/t$ ln l1 l2
fge@alustriel:~/tmp/t$ ls -l l1
lrwxrwxrwx 2 fge fge 1 Dec 22 04:09 l1 -> x
Look at the second ls -l output
The syscall is NOT the same
The first, to create the symlink, is symlink(2)
The second, to create another "real" link, is link(2)
Any modification done to one inode is reflected to the other
BUT you cannot change a symlink once it is created, it is impossible
fge@alustriel:~/tmp/t$ ls -i l1; ls -i l2
8128897 l1
8128897 l2
fge@alustriel:~/tmp/t$ ln -sf y l2
fge@alustriel:~/tmp/t$ ls -i l1; ls -i l2
8128897 l1
8128903 l2
 
Not even the symlink's attributes? (if it has any)
 
fge
As you can see, ln -sf created a NEW inode
 
3:12 AM
Maybe Java just added it for interoperability reasons.
 
fge
Yes, these can change, apparently; but they have no effect on the operation of the symlink itself
Maybe so, I don't know
I can chown a symlink, it has no effect
And apparently, on MacOS X you can chmod a symlink too, but to no effect as well
 
Mac OSX is based on BSD.
 
fge
As to why you cannot set initial attributes, I surmise this is because symlink(2) doesn't allow for that
Yes I know
 
What's an "initial" attribute?
 
fge
Well, for instance, when you create a file on a POSIX system you'll use open(), and one version of open() allows you to create modes
With my new package you can do, for instance, MoreFiles.createFile(thepath, 0600)
However I've had to do some workaround for it; it is not atomic
The initial permissions set by open(O_CREAT|O_EXCL) are anded with ~umask
 
3:17 AM
So, you're setting the file permissions when creating the file.
 
fge
My method creates the file then sets the mode
 
Ah.
 
fge
You can do that with Files.createFile(), BUT the umask applies
And the syntax is much more complicated than mine :p
 
Why can't you set the file permissions at the point of creating the file?
 
fge
I also have the version: MoreFiles.createFile(thePath, "rw-r--r--") ;)
 
3:20 AM
That's cool.
 
fge
On Unix it is because of the way open(2) works
You can submit a set of permissions to this syscall, but as I said earlier they are anded with ~umask
 
So why not do that?
 
fge
So, if you try and create a file with permissions 666 but the umask is 027, the actual permissions will be 640
This is atomic, however
What I do is create the file without permissions and then set the permissions
 
That sounds beneficial.
 
fge
Not atomic, but useful
And fast enough :p
Well, define "beneficial"
 
3:23 AM
It's better to create the file and set its permissions in one go, rather than split it up into 2 operations.
 
fge
I know the umask is there for a reason, but when you want "absolute" modes it is a hindrance
Yes but read again
2 mins ago, by fge
So, if you try and create a file with permissions 666 but the umask is 027, the actual permissions will be 640
 
So, what's the umask for then? o_O
 
fge
Eh, it is a metadata for all Unix processes... It is a set of permissions which is undone from all file/directory creations (the undo mask)
ANyway -- this is why I created these commands
There is .createFile, .createDirectory and .createDirectories
All act the same, all three take either a POSIX mode string or integer
Very practical :p
 
That sounds convenient.
 
fge
And with the help of @Mr.777, soon the package will be able to do MoreFiles.changeMode(path, "u+w,go-rwx")
Just like chmod
 
3:27 AM
Nice
 
fge
As you said, "convenient"
You can do this with the API but it requires quite a bit of code
 
Ah
 
fge
I mean, the original API
 
Right.
Well, I'm off to bed.
 
fge
(and it is precisely because I know how to do it and find it too verbose that I said "screw it, let's make it easier")
OK, good night ;)
 
3:28 AM
@fge Good idea. :)
Later.
 
fge
3:55 AM
0
A: This is a function to delete items from a file.The problems are mentioned as comments

fgeFirst things first: opening a file at the same time for reading and writing is a nono. Unless you really know what you are doing, the basic rule is: DON'T. DO. THAT. What you want to do is: opening a temporary file in which you write new contents; ensure that the new contents are safely writt...

Here we go again
Don't people ever learn?
 
 
2 hours later…
fge
5:36 AM
Aiie
Maven downloads the world
 
 
1 hour later…
6:39 AM
Good morning, Java!
 
fge
Morning
5
A: appendCodePoint() and codePointAt()

fgeThe problem is here: static int[] codePoints(String s) { int n = s.length(); int[] temp = new int[n]; for (int i = 0; i < n; i++) temp[i] = s.codePointAt(i); // <-- HERE return temp; } A code point outside the BMP is two chars wide, not one (see Character.toChars()); yo...

Another Unicode issue... But at least the guy seems to know his basics
(unlike a slew of others who still think they can cast a char to a byte)
 
Hey every buddy
 
user4202350
7:17 AM
Hey Aniket
 
Ugh... Firefox...
 
7:35 AM
[Monday rant about "Why the heck do we use real DB instead of mock objects?!"]
 
7:48 AM
How I can iterate to get all hyperlinks by jsoup I can get the first link only by this code
        Elements links = doc.select("a.NewListPrice");


        	 String url = links.attr("abs:href");
             System.out.println("url = " + url);
 
8:01 AM
Greetings
 
8:20 AM
@Mr.777 Heyo!
 
Hey
 
Heya
 
wow @ita boy ;) this hat suits your avatar or gravatar what ever it is, too
 
9:13 AM
So in java 8, interfaces provide with default methods so, we can implement those default methods too. What's the purpose if we can implement them?
 
@Mr.777 tnxx :D
 
user4202350
Hey @ItachiUchiha Shinchan
 
9:34 AM
@ShaU heya
 
user4202350
9:50 AM
LAMBDA EXPRESSIONS
 
user4202350
Hey @Unihedro
 
yeah, there are good ;)
 
user4202350
what are they?
 
@ShaU Did you just ping me in three rooms I'm not in?
 
user4202350
hahahahhahahahha
 
9:52 AM
hahaha
no
1 message moved to Trash
 
user4202350
1 message moved to trash
 
Wikia is my new candidate to pick as "most spammy internet service notification-emails-wise"! cc @Ita @Vog @fge @Mr.777 @Michael
 
:P
You can stop email notifications from wikia
 
lolz
 
They weren't a problem until I subscribed to fge's wikia.
 
9:56 AM
Because he is changing a lot of stuff almost daily
 
user4202350
Dont trash my valuable comments
 
@Unihedro Oh, yes...
 
@ShaU *messages
 
user4202350
messages.equals(comments)
 
@ShaU messages is not a valid identifier
And how valuable messages are are determined by room owners, who are entitled to cleaning the room by removing off-topic or noisy comments that are not well received, and handing timeouts where necessary. chat.stackoverflow.com/faq
 
user4202350
9:59 AM
unihedro.equals(rudeguy)
 
@ShaU unihedro is not a valid identifier
 
user4202350
unihedro.equals(rudegirl)
 
@ShaU unihedron is not a valid identifier
 
rudeguy is a keyword :P
:P
 
@Mr.777 Well, it's not like you could randomly use a variable without declaring it.
The scope is incorrect anyway; the "valid identifier" is for absence of import or class or interface at the start.
 
10:03 AM
hey
 
hey
 
@Unihedro u got nice hat
 
@AniketDeshmukh I have 22 hats, the crab one's my favourite.
 
great i got only one hat
 
user4202350
hat ? what hat?
 
10:05 AM
^ user who has no idea what events go on around here :P
@ShaU Go on the main site and find the flake on the top bar. Select it and click on "I love hats" to enable Winterbash.
 
really i like innovative ideas that implement stak overflow
 
user4202350
i like t-shirt
 
yes
ware it
 
@AniketDeshmukh You might enjoy participating on the Meta, which is a place where users decide what the best behaviours are, and define how the site works with support questions, feature requests and such.
 
yes i like it but how i participate on it
 
10:12 AM
@AniketDeshmukh You just log into the site
 
@ItachiUchiha That's MSE.
 
Ugh...
 
in Tavern on the Meta on Meta Stack Exchange Chat, 15 secs ago, by Unihedro
Halp! [metaso] inline-links as Meta Stack Exchange. URGENT!!! pls fix
 
10:14 AM
ok @ItachiUchiha thanks
 
user4202350
how to increase my repo
 
repo++
 
user4202350
cheat?
 
@ShaU Cheating is strictly forbidden in the land of Java. I'm watching you.
 
user4202350
if cheat then return "Success" else return "Struggle". ):::P
 
10:21 AM
Cheating includes:
- Answering questions that do not deserve an answer and should be closed instead
- Creating new accounts to upvote / bounty / comment to yourself: sockpuppets must have absolutely NO interaction with each other, or the main account.
- Promoting commercial products or poorly linking to other threads without completing your solution as an answer.
 
i will participate on it
 
@Uni When to use parallel stream & when not to? Because parallel stream seems faster than sequential but definitely there will be some reasons when not to use it?
 
@Mr.777 Falls back to general parallel programming.
 
@Unihedro Done!
 
I want to win more hat
 
10:35 AM
Winter is for hats!
 
user4202350
what about summer?
 
Unfortunately for productive things to happen, I'm going to stop collecting hats and construct the JavaRoom Labs, and then finish JCE and the bots.
I already have 22 hats, so I'm still a winner.
Welcome to Java room by the way, @ShaU and @Aniket :P
 
user4202350
i have 3 hats more than uni
 
@ShaU You have only three hats, I have eighteen hats more than yours.
 
user4202350
i dont like hat.... can i get watch?
 
SJD
10:42 AM
hello. Q: can I take the existing TableColumns from a TableView and setting them the setCellValueFactory?
as I've seen this is certainly possible when creating your custom TableColumn and then attach to the TableView
but, haven't see nowhere how can I grab already existing tableView's TableColumns
 
user4202350
yes possible
 
user4202350
uni can do it....
 
@SJD Why would you grab when you can cache?
You're overcomplicating this.
 
SJD
cache what?
 
The references to your custom TableColumns.
 
SJD
10:44 AM
but I'm not creating them. they already exists:D
they were added from designer so.. I need to handle them
as I guess I don't have any model to map the existing TableColumns.
damn. problem solved. sorry!
 
You can do it, but not like how we do it in a concrete- look up the m
never mind then :P
 
user4202350
hey uni ... do we have to check in .class files too?
 
@ShaU What about class files?
 
user4202350
yes
 
Yay the joys of flagging "why the downvote" comments. Next week we get to flag "you're welcome".
 
user4202350
10:50 AM
in my workspace i have .class file with java source.... so while check in java source do i have to check .class file too....
 
user4202350
@Unihedro im waiting
 
@ShaU "Check" by selecting with a checkmark or "check" as in reading? I have no idea what you're asking either way.
 
user4202350
SVN check in code......tortoisesvn.net/downloads.html
 
11:07 AM
@ShaU No. Do not commit any binaries into your repository
 
user4202350
ok
 
I mean, if you can (sorely looks into company's repo...)
 
user4202350
Actually previously devlop have checked in .class with there .java source code...so whenver i chnage that java file ...a new class file would genrate ...so after movement if i check in java code..that .class file is showing red
 
@ShaU Ideally, repo should only contains code and a IDE-independent method to build it (ant/maven/gradle script), so anyone who wants your binaries can build it themselves
 
user4202350
true
 
11:12 AM
@OlegKuznetsov I'm so sorry.
 
@Unihedro Well, at least, the good news that we don't use Git, Mercurial or any other DVCS, which can be damaged by the huge blobs in the repo
 
hi
am stuck up with serialization issues in my java code
can somebody help me?
0
Q: Query on Java Serialization

overexchangeI am facing below issue, after adding new member methods in the class class Response implements Serializable{}. There is no explicit serial version id declared. Error communicating with the webserver: com.abc.xyz.app.util.common.Response; local class incompatible: stream classdesc serialversionU...

 
user4202350
11:32 AM
i like crab
 
Hiya
@overexchange It's answered now...
 
@Vogel612 Heyo! Nice modification of your avatar, lol
 
You're shooting too fast.. answers can take time
@OlegKuznetsov I like how the green eyes come through that mask ;)
@Unihedro you around and have time to review PR?
 
12:16 PM
user image
2
for @uni :P
2 days ago, by Unihedro
@ItachiUchiha debugging at production because real coders test in production.
 
user4202350
12:53 PM
if debugging in prod ..... that would halt prod environment...
 
user4202350
@ItachiUchiha sorry.... i cant read blank
 
@ShaU well it is not blank. I guess its blocked by your firewall
 
user4202350
r u trying to hack my pc?
 
Hey, is there a way to inject reflection code through MethodHandle? I'm currently working with Proxy and it works great, now just interested if MethodHandles can delegate work of an existing method with a Proxy, instead of a Method.
Hmm, I guess I could build a method that simply calls the MethodHandle.
Meh, that will do for now. Best code hijack ever.
 
fge
1:10 PM
@Unihedro by curiosity, are you trying to achieve something in particular or are you just playing around?
(oh, and hello by the way)
 
@fge Every Monday I mess with a new approach of doing things stupidly. It won't get me very far, but I learn more of what I can do with the language.
 
user4202350
Keep it up....One day u will be succeeded like me...
 
fge
Well, the saying goes that you learn more from one mistake than a hundred lessons
(at least, making mistakes means you actually tried something)
 
user4202350
yes that y i make only mistakes...
 
fge
1:23 PM
@Unihedro if you want an objective I have one for you --> reimplement Jackson's StdDeserializer using MethodHandles instead of reflection, and compare the performance of both ;)
 
@fge :O Good idea! Except... I've no experience with Jackson
 
fge
Well, choose an easier one then
json-simple for instance
(true, Jackson is a beast)
 
agrees
 
1:41 PM
Does anyone know which Swing component is being used in this application to make the blocks "Search", "Overview" and "Book"? dl-web.dropbox.com/get/Public/…
 
fge
@Unihedro what is that? :p
 
#idleRPG on freenode... I was bored
 
fge
@Unihedro have you tried Goat Simulator?
 
@fge That's a game right?
 
fge
1:50 PM
Yes
 
:O
 
fge
Complete with stupid sentences and all -- like "Press the any key" to start a game :p
 
@StéphaneBruckert you do know that this is 404 for us??
@Unihedro review pls
 
@Vogel612 on it, it's a huge branch though
 
1:57 PM
Why are you deprecating stuff instead of just getting rid of it? @Vog
 
00:00 - 14:0014:00 - 22:00

« first day (1521 days earlier)      last day (3414 days later) »