« first day (1493 days earlier)      last day (3447 days later) » 
00:00 - 15:0015:00 - 23:00

Ago
12:06 AM
morning. I have a JavaFX application written for java 8 on my 64-bit i7. now another guy tries this application on 32-bit i3 and it is about 100-200 times slower. does that make sense?
most of the time should go for non-javafx related stuff (some game algorithm which is basically minimax)
 
Why is he re-doing it?
 
" tries this application on 32-bit i3" // Does he use appropriate JRE? The same vendor, the same version?
 
Ago
yes, but oracle, may-be a small difference in minor version
-but
could you recommend a tool to profile the app somehow?
 
jconsole?
Maybe i3 CPU loaded by noisy background task such as virus or hanged application? Did you checked the task load of cpu by cores? Also it can be the influence of video card and it's driver.
 
Ago
12:23 AM
haven't used it, will check it out
the bad thing is, I don't have direct access to this 32-bit machine. I guess it woulnd't make sense to install 32-bit java to my 64-bit machine
so, I guess I will try to get a machine with 32-bit processor, then can run some tests on it. but this time difference was something I didn't expect
 
I played with JavaFX several years ago. As I remember, it benefits significantly from hardware video acceleration.
 
Ago
it's a board game which just draws circles on the board. the main time should go for "thinking"
it should be relatively simple GUI
it just uses some bindings and events. if it's a bug, then makes sense. otherwise I don't see why it should perform like this. but I think I need to see it myself running and testing
 
12:41 AM
@Ago Maybe it's a memory issue?
Or maybe the 32-bit machine has a slower video card?
 
Ago
1:00 AM
@Michael might as well be. I think I will check the concrete computer, might get some answers.
thanks for the tips
 
@Michael After three months, I MIGHT FINALLY get my motherboard repaired/replaced from Asus!
 
@Joe'sMorgue \o/
Took long enough. xD
 
They had to F' me one last time, instead of overnighting it friday, with a Saturday delivery, they want to do some testing on my old motherboard, that they are keeping, before sending out mine!
 
That stinks. :(
 
From what I hear, Asus has been VERY good to me! ...When compared to everybody else
Spent time on their Facebook page, people are waiting 5 months for stuff...
 
1:21 AM
Don't they make, like, cheap computers?
 
I've been told they make the best, but if you get a flawed one, you might as well just buy another as getting service is almost impossible
 
Ah.
 
Well, more importantly, NEVER buy Asus to begin with. I have friends that have pushed their unit's WAY past expectations without issues, the ones that have issues are stuck with them!
 
So, their customer support isn't very good.
 
The first time they "fixed" my board, it was returned with the same problem as when I sent it in [Memory slot not working,] the second time, little over 11 weeks later, came back with all four slots not working.
They wanted me to do an advanced replacement, and jerked me around for weeks on end, because it's faster!
 
1:37 AM
Doesn't sound faster to me. xD
 
Then, I just started complaining, they decided a repair would be faster, so I sent it in for the second repair attempt.
15 HOURS of phone time, if not more to get the second repair
 
15 hours? In one session?
 
Total phone time
 
Incredible.
 
I have a friend who is a upper manager handling all the written interactions with Asus, as he is an upper manager, therefore knows how to write that crap to make it look good...
They have flat out lied to me
They mislead me.
Return phone calls are non-existent.
 
1:53 AM
Inexcusable.
 
2:16 AM
That's why I enter most rooms with "NEVER buy Asus"
I made about 15 comments today on their FB page, they finally commented, saying they want to help, I replied with:
There have been 6 RMA's. I've been mislead, lied to, when I told one guy your directions are misleading to autistic people, and formatting does not work on the most popular device used for reading mail, I was told I was simply wrong! Being told they never received E-mails. Advanced replacement getting kicked back for tiny reasons, then after all were fixed, they kicked it back for another "reason" that was there all along so they didn't have to do the replacement at that time. Once they FINALLY accepted it I was told they did not have the reserved board, and have no idea when they will get
 
Geez
 
None of that was included in any of the previous comments
Too much?
Maybe I should add how I'm not afraid to comment on my issues on the developer forums I am in...
 
2:36 AM
I don't think it's worth the time.
I think you've made your point clear, just drop it
Anyway, gtg to bed. See you later.
 
Have a good one
 
 
3 hours later…
5:22 AM
Morning!
 
Morning!
 
lolz, he seems to really a MS guy
 
5:58 AM
people are really crazy
 
6:35 AM
i guess its a bad idea to do some occasional dumbell lifts along with programming..
well, makes me much more awake
hello! :D
 
why is that a bad idea?
@gem is internet connectivity troubling you again?
 
it's been troubeling me since tuesday. And the neighbours wi-fi is unreliable :/
I hope they'll send a technician today, but you never know
 
Do the neighbors switch off their Router to trouble ya ? :P
 
6:53 AM
Does that make a breakfast with wine a regular meal?
 
lol, yeah
 
 
2 hours later…
8:27 AM
@ItachiUchiha yo man !
 
@miniHessel heya
 
How you doing?
 
good
hbu?
 
I'm trying to figure out something in JavaFX...
uncertain how to approach it
 
May be I can help
 
8:36 AM
That would be awesome.
as you have seen earlier I add rows and columns dynamically, as I can't know that up front.
But now I need the possibility of showing an popup box when double clicking on a row in one of the tableviews.
I'm trying to find out how I can approach this. I have my own custom object column and another one called Table.. When I do loadData(); I go in to a for loop adding all the column objects(with their data) from the table in to a tableview.
@ItachiUchiha is it even possible?
1
Q: How to fill up a TableView with database data

OReyI've been trying to load a TableView with data querried from a database, but can't seem to get it to work. This is my first attempt at trying to fill up a database with database querry items, in case my code seems mungled and far from good. The FXML was done via JavaFx SceneBuilder. This is th...

the code in the answer here is a really simplified version of what I do. I put the data in to custom objects called Columns and they belong in the custom object Table. To load that in to tableview I use this code.
 
I am confused about what really is your question
But now I need the possibility of showing an popup box when double clicking on a row in one of the tableviews.
or
Something related to custom Columns and Tables
 
the question is basically how to show a popup box with a dependent message when double clicking a row in tableview.
 
Dependent message?
 
ye, dependent on which row the user clicked.
So each row should have a custom text
 
I guess I can help you with a popup on double clicking a row
 
8:51 AM
Great, only big issue is to fit it in to the code I sent you above.
 
Guess you could do something like this:cell.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
if (event.getClickCount() > 1) {
System.out.println("double click on "+cell.getItem());
}
}
});
 
Anyone knows how to setup gitserver on osx?
 
@RakeshJuyal Why OS X among many options?
 
9:00 AM
@miniHessel no that din't worked.
@Unihedron I have OSX on my macbook. I want to try it on this.
 
Oh, hosting server on a home machine?
 
@Unihedron testing git. I am trying to learn it. I find it really confusing.
 
ye, he's just brb
 
yeah
 
9:11 AM
\o/
 
coz you are missing a ")"
 
where ? :P
 
at the end
 
}; -> });
Otherwise ; after } is an empty statement, ) is still needed
 
it is at the end, just my copy paste that was sucky at the previous post
 
9:16 AM
ahh
 
could it perhaps be that the ObservableList isn't valid?
 
since James_D uses a model class instead.
 
final TableCell<ObservableList, String> cell = TableCell<ObservableList, String>()
is this a correct statement?
 
Probably not, but what should it be when you don't use a model?
 
9:18 AM
Yep, as long as the class itself isn't final. The reference is though. That's an inner class constructor.
 
I don't find a new
 
but james doesn't have a new either ita?
haha, but that fixed it :P
 
@miniHessel he missed it somehow
just a typo
 
thanks ita, you are clever!
Now I just need a way to store those popup messages and know which one to show..
Any tips @ita ?
Perhaps having a hidden column in the tableview that stores the messages?
 
9:35 AM
You can use setUserData
 
I can't, because the code only loop through my fields in the Column object and add them to the tableview.
 
What does your Column Object has?
 
What I want it to :P
 
It must have TableCell?
 
But right now it has a Name,which table it belongs to, if its a integer or not.
No, that gets created when I loop through the columns later on.

for (Column kol : listofColumns) {
TableColumn kol = new TableColumn(kol.name)
 
9:49 AM
How are you constructing a TableView out of it?
 
I loop trough all the columns and use this code: stackoverflow.com/questions/18941093/…
 
10:00 AM
@miniHessel you are confusing me
this code is used to extract data from the DB
 
you want to see the github instead ? :P
 
and the code creates and builds a TableView
my bad
 
:-)
 
So now the question is hot do you feed the data into each row
 
I first add all the data in to an observable list, then I transpose it and set the tableview data to the observable list
1007.9998732 would you consider this number an float or double?
 
10:17 AM
this can be both float and double
Under normal scenario, java will consider it as a double
 
Good, thats what I thought
 
I am still trying to think of a way of putting messages into the row data :P
If you could have used an ObservableList to populate the table
we could have achieved it
 
I do use observablelist
I just suck at explaining, I beleive
 
Inside the bean we an add an extra field for message, but we wont use the field for any Column in the TableView
but on selecting any row, when we fetch the bean, we can use it to show the message
 
10:32 AM
Only problem is that I actually fill the column object with data, then loop trough the column object and add it to the observablelist
 
Just change it
and do it this way
 
I need it that way, because I need the possibility of the user combining columns
it's a request
 
lolz
 
can't be easy, then everyone would do it, hah a:D
 
I have one more trick
this may be an overkill
but might work
after the ObservableList<PojoClass> is created
add the message's to each by iterating
then table.setItems(new ObservableList)
 
10:38 AM
I actually found a pretty great way ! :D
 
share
 
Then I can just change the graphic of each button to a question mark, and the user can click the question mark if he wonders
 
not required
just give me the image link
 
you want to make the Action Button to ?
 
10:46 AM
nvm it won't work as good as I thought.. damn!
 
11:04 AM
3 messages moved to Trash

Sandbox

Where you can play with regular chat features (except flagging...
 
11:22 AM
@ita Im making a MVCE for oyu
 
alright
 
Great hack for getting blueprints is to trade with nagas with ivory.
 
Hi Everyone!!
 
Hi!
 
How do I know when all my threads (SwingWorkers) are properly started?
Currently I have to sleep for few seconds before proceeding to make sure all threads are initialized
I am using Executor ThreadPool to start a number of SwingWorkers
 
11:40 AM
That sounds like problematic design in other parts of the code. If the code using data from the workers uses proper locking, it should not matter if the threads have started
SwingWorker, btw, uses thread pooling by itself so that you should not need to explicitly manage the pool
 
@kiheru Without using ThreadPool I can not have more than 10 workers
I should be able to enable a button after all workers are started. Those workers are actually components of a workflow.
 
I think you can have as many workers as you like, but the threads are limited to 10.
There's CountDownLatch, but I still suspect a design problem elsewhere
 
Each worker is continuously checking the worker it is connected with, to check if it has generated new output. If it has then this worker starts its executions, other wise it sleeps
I ran into strange issue with sleep when workers were increased to 10
 
For such a producer-consumer tasks, you can use blocking queues
If you really need > 10 threads, SwingWorker probably is not the right tool (exactly due to the builtin 10 threads limit)
 
No parent component knows how many childs it have, like a workflow, a workers output can be used by a number of workers.
SwingWorker was able to tell me the progress with process() while it executes with doInBackground()
 
11:50 AM
hello everybody
 
hello
 
Yeah, it's really convenient. And the helper class it uses for collecting and coalescing intermediate results is package private :-(
 
I am just curious about this, why every programming language book uses foo, boo as identifier names somewhere.
 
@kiheru SwingWorker was the most convenient choice I had to build WorkFlow. It is running all fine, I am strarting all Workers when application starts, but that is not a good approach. There might be a way to check the status of workers from thread pool??
 
11:52 AM
The terms foobar (/ˈfuːbɑr/), fubar, or foo, bar, baz and qux (alternatively, quux) and sometimes norf are sometimes used as placeholder names (also referred to as metasyntactic variables) in computer programming or computer-related documentation. They have been used to name entities such as variables, functions, and commands whose purpose is unimportant and serve only to demonstrate a concept. The words themselves have no meaning in this usage. Foobar is sometimes used alone; foo, bar, and baz are sometimes used, when multiple entities are needed. The usage in computer programming examples and...
 
In a movie Fubar was explained as F**d Up Beyond Any Recognition
 
pastie.org/9740110 @ItachiUchiha
Better formated
 
@LifeH2O that smells ...
 
@Aamir may be they are de facto standards like Hello World in every language
 
You shouldn't have to sleep in a worker thread.
 
11:55 AM
@LifeH2O I'd avoid the need to check thread status entirely, and use queues for moving the data. A blocking queue has exactly the kind of "sleep until there's available data" behaviour
 
@kiheru,thanks
 
The producer should know about his workers, and enqueue produced stuff to a blocking queue.
the workers can then use a blocking wait and the thread hibernates.
 
@Vogel612 In a workflow system usually all components are producers and consumers.
 
You should still uphold this rule..
alternatively make a worker know about his producer and fetch tasks in a blocking wait
 
Blocking queue can be used effectively by one producer and one consumer. What if there are multiple consumers against one producer?
 
11:59 AM
this breaks m:n relations of producer:worker agiain..
@LifeH2O then every consumer maintains their own backlog and the producer enqueues to every consumer ..
alternatively if you have multiple consumers doing the same thing you might consider organizing the Consumers in a wrapper-class with a ThreadPool
and have the threadPool do the balancing between the consumers
you need to see the Producer:Consumer relationship as a single-sided relation only.
It's irrelevant that the producer may be a consumer to someone else.
Your requirements are not clear enough that I could provide valuable insight beyond this btw..
 
@miniHessel Inside the transpose you can play with the data and add messages
 
How do arrays work in Java on compiler level?
 
In current system I can plug in any number of consumers to a producer without telling anything to producer.
 
@Unihedron why do you ask?
@LifeH2O how so?
 
@Vogel612 I'm curious what difference it is from any other object, how it is dynamically typed as a castable object in runtime, and why generic arrays can't be created without using reflection, etc.
 
12:03 PM
@ita I wrote this, hope it's a bit more clear: stackoverflow.com/questions/27104315/…
 
data is nothing but ObservableList<List<String>>
 
And guess what, I googled only to find several pages of "java arrays for absolute beginners" guides.
 
So inside you can add another Item into the List<String>
It won't make a difference
 
Brackets are allowed in declarators as a nod to the tradition of C and C++. The general > rules for variable declaration, however, permit brackets to appear on both the type and in declarators, so that the local variable declaration:

float[][] f[][], g[][][], h[]; // Yechh!
 
arrays carry type, generics don't. That comes with some side effects
 
12:04 PM
^ valid java..... holy
 
f is float[][][][], g is float[][][][][], and h is float[][][]
 
yep.
it looks horrible though..
 
@Vogel612 here is the little code snippet of how I am connecting components pastie.org/9740129
 
Yuck. I wish the language designers didn't try to follow C and C++ when there was no valid reason
 
What does the compiler (source code -> byte code) do when it sees new int[3]? AFAIK int[] is its own object, but the class is only present dynamically in runtime, how does that work? Is creation of int[][][][] about as same as int[], and what gives?
 
12:07 PM
@LifeH2O who is the producer? comp3?
ohhhh waitt...
you have a 1 consumer : n producer relationship?
 
@Vogel612 for comp3, yes
 
You should be able to have the Consumer maintain a collection of Producers then
these producers need to expose what they produce in a specific way
You could specify that via an Interface..
It seems like you're using duck-typing .. a lot.
 
You shouldn't abuse arbitrary Strings as "typesafe" identifiers for InputPort
 
each component has some inputPorts and outputPorts
 
12:11 PM
It also seems that one producer can be an input to more than one consumer
 
@kiheru yes
 
Just curious, how do you decide when the produced data has been read enough times?
 
A producer's output can be read any number of times.
 
@ita does it make sense?
 
comp.getOutput(portname) is used to get output from a component
a consumer only checks if producer has finished its execution
 
12:15 PM
So what happens when it produces new data? Or does that ever happen (if it does not, I don't know what the threads are for)
 
That I am tracking with comp.execCount() which is increased with every new execution
 
Is it just me or does this lack abstraction?
 
I still would use queues for data flow. That would simplify a lot of the book keeping you seem to do
 
All you guys are suggesting is that this design is ugly (i know it is because i have to sleep in a loop to wait for producer's output) what is a better approach?
@kiheru I tried to make a system like above image. And this is where I ended up
 
A blocking queue does the sleeping for you, until there's data to read. Multiple sources and destinations complicates matters somewhat, but I guess a component can keep incoming and outgoing queues in collections
 
12:26 PM
@miniHessel try this
Lemme know if it works
 
@Vogel612 @kiheru So now I am looking for a way to use blocking queues within current system.
 
@LifeH2O Use a ThreadPoolExecutor
 
@ItachiUchiha I am using that already
 
It already has a blocking queue functionality
 
you could maintain the Queues and have the producer send a PoisonPill when no more output is expected
 
12:31 PM
@Unihedron Enlighten me about the arrays once you have a grasp of it :)
@miniHessel you can use this as well, its more cleaner
    @Override
     public void onChanged(Change<? extends Integer> change)
     {
            final Stage dialog = new Stage();
            dialog.initModality(Modality.APPLICATION_MODAL);
            dialog.initOwner(stage);
            VBox dialogVbox = new VBox(20);
                   if(change.next()) {
                      	List list = (List)tableview.getSelectionModel().getSelectedItem();
                       	dialogVbox.getChildren().add(
                       			new Text(list.get(list.size()-1).toString()));
 
@Vogel612 Going to do that. But back to the first question, isn't there a way to check if all threads are initialized? :)
And thanks to all @kiheru @Vogel612 @ItachiUchiha
 
@ItachiUchiha the problem is, that the message needs to be added when the fields are added.
 
@LifeH2O you could intitialize the stuff you need outside of the thread, make the reference final and pass it to the thread-start.
 
because customColumn.addField("asd");
customColumn.addField("qq");


Here is where I get the data from the database
 
in short: you should take the heavy lifting to the main-thread and just start the thread when you can't help it anymore
 
12:41 PM
@Vogel612 right now I am doing exactly that.
In general, in a producer consumer approach, does producer always have to know its consumers?
 
@miniHessel what is setUserData doing in your code?
 
nothing, actually
 
@LifeH2O one has to know the other.. which one you chose is up to you
You can reduce the coupling by means of interfaces....
 
fge
Uh, why would they need to know one another?
 
fge
12:49 PM
They only need to know where to push the data (producers) and where to retrieve it from (consumers)
 
@fge alternatively you hide them behind semaphores...
 
@Vogel612 ?
 
but then they both need to know the semaphore and you have made the semaphore the consumer...
@Unihedron the ChatWorker interface..
just for reference.
 
fge
@Vogel612 not my take on it
 
Huh, it's not a functional interface.
-1 No lambda abuse potential
 
12:51 PM
@Unihedron well you need two methods.. soooo..
no SAM no Lambda
 
How do I amend a PR on a branch I don't have write access? Do I have to PR on your branch and have it merged for that to happen?
 
@Unihedron you want to amend to my PR??
 
@miniHessel try this pastie.org/9740202
 
@Unihedron you should have write access now..
@fge how is a Semaphore different from your standard consumer, when seen from the Producer's side?
 
fge
@Vogel612 simple: the producer knows only of the semaphore, not what is going to manipulate it on the other end
 
12:57 PM
@fge how is that different from a properly decoupled Consumer?
 
fge
It is only a means of communication between two parties
^^^ in this respect
 
true, but what changes for the Producer?
 
fge
Well, the producer does not know the consumer
 
the producer still just pushes something out.
that's it.
@fge you're complicating stuff here..
 
fge
No I'm not
 
12:58 PM
what is a consumer?
 
fge
The opposite, in fact
OK, drop it, we'll never agree
 
I hope to sharpen my rhethorics ;)
What makes a Consumer?
okay then not...
 
@ita it gets a null pointer in the start, but besides that it works
but, now it's unique for columns, not for fields?
 
@Vogel612 I have chosen the consumer to know the producer.
 
It's your choice anyways ;)
 
1:08 PM
@miniHessel what?
 
The message is now unique for each column, but it should be unique for each row instead.
customColumn2.setMessage("Unique Message 2");
but we are getting closer :P
 
Well that is the unique message for row 2
I need to store it in a variable inside MyColumn
as you store all data from DB into it
 
but each column will have several messages ?
as each column has several fields, each field belonging to a row
 
you can apply your logic
on how to convert messages fr rows
 
1:47 PM
Hmm..
 
1:58 PM
@ita any way to make this algorithm accept both string, integer and double?
or do I need to make three situations ?
@uni also :P
 
what?
 
@miniHessel well... primitives aside... you could always accept Object if you're insane
 
Overload it, duh.
 
@Vogel612 so its better to type the same code three times?
 
That would be retarded..
but sometimes... you don't have another choice
It depends on what you wanna do..
 
2:02 PM
isn't it better to just add a listener like you did @ita?
 
2:51 PM
@Vogel612 Basically, I got both double, string and integer.. writing the code for each of them would be ugly :P
 
poor you... it's not like you have a choice, when handling primitives though..
 
its ugly :(
 
well... there's always some ugly somewhere..
 
James_D to the rescue!
shortened down to 9 nine lines, reusable for everything :P
 
00:00 - 15:0015:00 - 23:00

« first day (1493 days earlier)      last day (3447 days later) »