« first day (1559 days earlier)      last day (3365 days later) » 
00:00 - 23:0023:00 - 00:00

12:57 AM
@Adz: The simple way is to use a finite state machine which terminates as soon as it finds an answer, with a variable assigned with the first value; From there, return the stored value if the next number is your seeking one or any larger. Otherwise, store it. Rinse and repeat.
Though, that's linear. You'll get better code by modifying the binary search algorithm a little, and use that.
 
1:38 AM
You know those diet nutrition drinks you have when you're dieting? I'm thinking about beginning to eat those when I have my coding binges.
 
2:19 AM
:S
 
You don't think it's a good idea?
 
Ramen is better.
 
Ramen has no nutrition, just empty calories, exactly the opposite of what I need. Plus, ramen needs boiling.
 
3:00 AM
Haha.. uni has no answer to that..
Why not juice?
 
Because juice don't have all the nutrition
The diet drinks are designed to be whole meals
 
I used to think diet drinks are for people who are dieting :-P
 
Well, they are originally designed for that
But when you sit 24/7 and code, you don't really need all that much food, just the nutrients.
I don't really feel hunger so an empty belly won't matter to me
 
3:34 AM
A lot of discussion on Java n JS, then into anime :-P
Empty belly can result in gastric issues
 
It depends on how you get an empty belly
 
Drinking water helps
 
I do that all the time. I keep a 1L pitcher at my side instead of a glass :P
Still, consuming only liquids really isn't for everyone
(else we'd have a lot more successful weight-loss stories ;P)
 
3:53 AM
Haha
Ditto that
 
I'm not trying to loose weight though, I'm just conscious about getting nutrition while being lazy :P
 
I have recently gained a lot of weight. So, I am resuming swimming from next week :)
 
I wish I could swim >_>
As in go swimming. I love it and I'm kinda good at it but my skin is allergic to water :/
 
Fev
oi... hi guys...
how are yow..?
and good morning
 
It must be allergic to chlorinated water
 
Fev
4:06 AM
hi @ItachiUchiha
 
Fev
is it ok packaging my javafx app to a jar ?? if not, is there any good alternatif?
 
@ItachiUchiha No it's allergic to water. I know my condition. It's only the skin though, I can drink water just fine
 
Fev
I'm encountering a lot problems in fxml when deploying to jar, but in IDE everything works great
 
4:46 AM
@Gemtastic This is the first time I have heard that someone is allergic to water
 
@ItachiUchiha It's not exactly common no
 
@Fev It is completely alright to put your fxml's inside a jar. If you can show me some code, I might help :)
 
@gem So you don't bath ? :P
 
@ItachiUchiha No, but I shower as often as I can, which is as often as every 3 days, but preferably longer
I use baby-wipes to freshen up daily
 
4:49 AM
baby-wipes.. hihihi
 
Well, they do their job and are designed for sensitive skin
 
but I would be very happy if I was allowed to bath in 3 days :P
 
I absolutely hate it. I'm a clean freak so it's a constant battle :/
I can't bathe at all, only shower
 
Preferences :P
@Gemtastic No soap?
 
Yes soap. But I wanna shower every day
I'm not reacting to the soap, it's the water
 
4:52 AM
Yeah I get it, with bathe, you mean getting yourself immersed in a bath tub
 
Yeah
That's the definition of a bath :P
Verb

bathe (third-person singular simple present bathes, present participle bathing, simple past and past participle bathed)

    (intransitive) To clean oneself by immersion in water or using water; to take a bath, have a bath.
 
> immersion in water or using water
 
Well, immersion is my choice of bathing
 
Both require you to fill up a bowl with water
 
"if you're lucky you might even get wifed up"
 
Heya All
 
I love that pun
"Our grate lord"
 
6:07 AM
@ItachiUchiha LOL funny :P
10 hours ago, by Second Rikudo
Why should I take Java as the next language I learn?
@SecondRikudo: Because Java is the future of software development in non-functional fields.
Bold statement, but it's definitely true, with a mature ecosystem, a well-built documentation generator with plugins concerning (javadocs), and definite support in expanded fields, such as class loaders which lets you bind interfaces onto plugins instead of running new temporary programs, stuff like that.
 
6:27 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 1 min ago, by Unihedro
http://stackoverflow.com/q/28180949/3622940
 
It is already closed
 
'I just don't know what to do' stackoverflow.com/q/28012389/3622940
@ItachiUchiha Yeah, several whiles after I linked it in the tavern.
 
@Unihedro Done
 
@TheLittleNaruto Thanks :)
 
@Uni Always share with me. :)
 
6:31 AM
@TheLittleNaruto or you can just visit tavern on MSE, it is full of s
 
@TheLittleNaruto :D
Are you sure?
 
Pretty much sure ^^
 
I really only link major questions that needs to be closed, but considering that you asked... brace yourself :D
 
@DroidDev Alright
@Unihedro lol
 
http://stackoverflow.com/q/28111236
http://stackoverflow.com/q/28113443
http://stackoverflow.com/q/857037
http://stackoverflow.com/q/15254054
http://stackoverflow.com/q/3582377
http://stackoverflow.com/q/18719161
http://stackoverflow.com/q/4064499
http://stackoverflow.com/q/2351322
http://stackoverflow.com/q/2400997
http://stackoverflow.com/q/5231934
http://stackoverflow.com/q/3075867
http://stackoverflow.com/q/28121939
http://stackoverflow.com/q/9658756
http://stackoverflow.com/q/13390764
http://stackoverflow.com/q/7175021
^ all needs to be closed
 
6:37 AM
Jesus! :O
 
But wait, there's more
 
Most of them are already closed
 
@gdoron oh hi
 
6:45 AM
@BenjaminGruenbaum Oh hi
 
6:56 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 25 secs ago, by bluet
SPAM http://stackoverflow.com/questions/28208642/how-realty-compass-site-can-be-impro‌​ved
 
7:11 AM
@Unihedro Future? I don't think so. I'd place my bet on Rust
 
@OlegKuznetsov Rust is kinda not working well outside functional fields.
 
@Unihedro A) It's not finished yet and B) It's not functional
 
@OlegKuznetsov A -> duh. B -> duh.
 
Lolz
 
 
2 hours later…
fge
9:29 AM
Moo
 
9:44 AM
@fge Moo back
a question
while (atleastOneQueueAlive()) {
	Thread.sleep(1000);
}
^^ I have a code where thread sleeps to perform some work
Now this has to be wrapped around try..catch (InterruptedException e){}
Is it good to consume/just log about an interrupted exception in catch block, and not throw it?
 
fge
10:07 AM
Uhm
Is this run in a separate thread?
(by the way, you could use TimeUnit.SECONDS.sleep(1L) instead)
Note that an InterruptedException received means that the interrupt flag is cleared on the thread in question
 
@fge Yes it is
@fge It means that the current thread is interrupted, can we log in the problem and just let the program continue?
 
fge
I guess so... When you receive it you just exit anyway, right?
Just for the heck of it, I'd log and restore the interrupt flag
 
@fge I log and exit. I do not restore the flag
I thought Java does it for me
 
fge
10:25 AM
If you just exit then no need to restore the flag; it is meant only for the cases when another execution path somewhere needs to know about it
 
Ahh, I see
One more case, I have a byte[] which is needed to be copied to another byte[] using a setMethod(byte[])
I can use this.byteArray = newByteArray;
But storing array should not be stored directly, so I am using a shallow copy
this.byteArray = newByteArray.clone();
Now, I read somewhere that I can read
this.byteArray = Arrays.copyOf(newByteArray, newByteArray.length)
Is there any drawbacks of using clone() over Arrays.copyOf()?
 
@ItachiUchiha one uses the cloneable interface, which is native, the other is a copy running on bytecodes
 
Arrays.copyOf() uses System.arraycopy() (native)
I think arrays are one of the few places where clone() works fine, but I tend to avoid it there too for general dislike of the method
 
10:42 AM
clone() runs fine for array, I have tested it over and again
 
@ItachiUchiha Sure it runs fine, but it's likely the Arrays.copyOf calls can self-optimize across time.
 
but I guess I will just switch to Arrays.copy
 
11:19 AM
what are some examples for multidimensional databases?
 
fge
12:18 PM
stackoverflow.com/q/28213911/1093528 <-- interesting use case for grappa
I should add that to the examples
 
@fge Ugh, four lines for each getter / setter
also, no yoda expressions
 
fge
They have to return true, otherwise they are not valid rules; and if false, parsing fails
That's the cost of using such a powerful tool :p
And what are those "yoda expression" you are taking about?
 
I'm not used to yoda other than for strings. null == foo does not seem to gain anything in java. if (null = foo) is a compile time error anyway
umm, meant to say that if (foo = null) is a compile time error too, so it does not work similarly as a guard as in C (Though wtf would be a valid reason to have warnings off in C anyway? Writing code for the 80's compilers is rather pointless)
 
1:18 PM
you don't compare strings with == anyways...
 
1:37 PM
True, but equals() can be done either way too. For string constants I prefer the yoda version, for the additional benefit of proper null handling
 
fge
2:00 PM
@ItachiUchiha you may be interested in something I just made for grappa-debugger
In fact, any GUI programmer could make use of it
 
Oh?
Did you just make a huge step in GUI programming?
 
fge
Usable with JavaFX, Swing, webapps...
And ThrowingRunnable is an adaptation of what was done for throwing-lambdas, for Runnable
For tests, I just invoke a new BackgroundTaskRunner(MoreExecutors.newDirectExecutorService(), Runnable::run)
Which means I can test invocations with mockito, and no need for a toolkit!
For JavaFX, the second argument would be Platform::runLater, and for Swing, SwingUtilities::invokeLater
And that means that my presenters are totally "GUI independent"
 
2:17 PM
cool, I'm blown away
 
hey uni how's dev going?
 
fge
Ohwell
Anyway, if you want to use it for your GUI code, it's free
 
@fge it's easier to check whether I fixed stuff if you comment on the diff and not the commit ...
 
@fge How to use the ValueBuilder?
 
but yes, it's a very interesting question... why did I put this there... probably to be explicit about it. It wasn't really a conscious decision..
 
fge
2:29 PM
@JavaTechnical have an instance of it in the grammar; when the student if fully built, its .build() will be posted on the event bus and your listener will take care of it
The grammar contains code to use it already, I believe
Sorry but I've lost track a little, we celebrated France's victory quite a lot :p
 
anyway, the NoSuchMethodError is solved.
0
A: NoSuchMethodError: org.objectweb.asm.tree.ClassNode.<init>(I)V while using Parboiled

JavaTechnicalThe error is due to the presence of dcevm.jar present in my jre\lib\ext folder. The jdk which I have used for the project contains the dcevm.jar file and that this jar contains the package org.objectweb.asm.tree which containsClassNodewith no constructor like ClassNode(int). The jvm is using thi...

 
fge
Aaah, good
 
@fge how to write this listener?
I got collectedValues in grammar.
 
fge
You don't write to it explicitly
It's the parser which will, via its <T> post(ValueBuilder<T>) method
 
ok, now how to get the Student object with data filled?
 
fge
2:33 PM
The only condition that your listener must obey is to have a public method annotated with @Subscribe which accepts a Student as an argument
This is the grammar which does that
Paste the code of the grammar, normally the code to do that is already in there
 
where is the listener?
could you give me the snippet?
I am new to this.
 
fge
Didn't I give it to you already?
 
You gave the StudentBuilder
 
@BenjaminGruenbaum, what's up?
 
@fge I want the result to be put in the Student object
Currently, i am using like this..
 
2:35 PM
@gdoron we're hiring C# developers if you're looking for a job.
 
System.out.println("sno-"+parser.collectedValues.get("sno"));
 
fge
Ah, OK, I see
 
in JavaScript, Jan 21 at 8:14, by Benjamin Gruenbaum
We're hiring backend (C#) developers at TipRanks! If you're interested or have any questions send me an email at benji at tipranks.com
 
@BenjaminGruenbaum, thanks, I am starting a new job next week...
 
@BenjaminGruenbaum But... Welcome to Java?
 
2:37 PM
Forter.com
 
@gdoron So it's not too late to come interview :D
 

C#

General discussions about the c# language, Squirrels | gist.gi...
 
@Unihedro do you really want me to kick you from JS whenever you say anything OT :P?
 
Well.. I signed already...
And I'm in the mood for exploring new stuff
I'll develop in java, Python and Nodejs on Mac
Do you have a java book recommendation?
 
@BenjaminGruenbaum Well, I hinted a better alternative since considering how much better C# is, anyone who devotes time into Java well enough to participate in this room probably doesn't do C#.
 
fge
2:39 PM
@JavaTechnical well, the principle is simple, you set your values in the StudentBuilder when the parsing of the value is done (the value is available using match()); then when the value is fully built (ie, you have parsed a whole student) you post() the builder
See the javadoc of EventBusParser
 
Java as a language is poor, as a platform and community it's way better than C#
 
@gdoron Duh.
@BenjaminGruenbaum Though, I welcome demands to kick people from JS for being off topic, considering that I really only join on JS when I have a Javascript question, so you won't get merh :D
 
@gdoron whatever suits you man. Thought it might interest you. Good luck.
Java is horrible :D
 
@BenjaminGruenbaum PHP is rotten.
 
@Unihedro story of my life
 
2:41 PM
And guess what? Here I am trying to fix some ridiculous bits of PHP I just pulled up, and with mediocre web development skills.
FML
(forge modloader)
@BenjaminGruenbaum high five.
 
Yeah, but spreading the risks is a wise thing to do, specially that. Net lose popularity
So any java book recommendation guys?
 
@gdoron depends on your skill and definite effort to invest and how long you'll be doing it - not like you need to master a language you won't bother
 
@fge like this?
    StudentBuilder sb=new StudentBuilder();
    sb.setName(parser.collectedValues.get("sname"));
    sb.setNumber(parser.collectedValues.get("sno"));

    parser.post(sb);

    Student st=sb.build();

    System.out.println("sno: "+st.getSno()+", sname: "+st.getSname());
But what is the point in calling parser.post(sb)?
 
I'm well familiar with C#, and I always strive to be the best in what I do.
So the more knowledge the better
Something like java for dummies is not what I'm looking for.
Professional book like APress usually has
 
fge
@JavaTechnical no, in the grammar
 
2:46 PM
@gdoron Heh, "X for dummies" and "Learn X in 24 hours" are two worst series ever I have to see.
 
fge
@JavaTechnical forget about the collectedValues map here, replace it with a StudentBuilder
 
Yeah, unless it's making an egg, nothing serious can be taught in 24 hours
 
fge
@JavaTechnical for instance, Rule studentName() { return sequence("sno", separator, oneOrMore(alpha()), builder.setName(match())); }
Same for the other fields
 
So no book recommendation... <Sad icon>
 
fge
@JavaTechnical OK, give me a few moments
@gdoron on what domain?
 
2:49 PM
Effective Java, JCIP, or an O'Reilly book of choice
 
fge
If unit testing, "Practical unit testing with TestNG and mockito"
 
But seriously, those wouldn't be relevant without a practical domain in mind
 
fge
If general Java, Effective Java
 
^^^ Effective Java is good book.
 
fge
If multithreading, Java Concurrency In Practice
 
2:49 PM
Then effective java it's.
Is it java 8?
 
fge
No it isn't
 
7?
 
fge
Not yet updated, unfortunately
But the lessons in there are timeless
 
No, it's general Java, not stuck with any version or API implementation.
 
fge
So, don't let it covering up to Java 6 only deter you
 
2:50 PM
It's not updated to include Java 8 stuff, but they're easy to pick up once you handle the rest.
 
Does it require prior java knowledge?
 
fge
YESS, just received a mail for the job I applied for: ACCEPTED
 
Congrats!
 
fge
@gdoron general basic knowledge
 
@fge :O
 
2:52 PM
Which I'm lacking... Basic online tutorial will suffice?
@fge, which company and position?
 
fge
A company called Ignition Factory, as a Java dev
Goal: build a "recognition engine"
 
Java? Yuck! ;)
 
fge
From scratch
Well, Java is my preferred language with C :p
 
Sounds interesting!
 
fge
It certainly is
 
2:55 PM
Hi
 
By accepted you mean the job is yours? Or you're accepted for an interview?
 
fge
The job is mine
I already had two interviews
 
@fge GL HF :)
 
fge
This is my first job as a dev, prior to that I was a systems engineer, but I guess all the Java projects I developed and can testify for helped a lot :p
And those are not simple projects
 
That's very weird, in Israel they call for saying you're accepted, mail is a bit snobby. At least here
 
2:56 PM
@gdoron Over here no one calls with phones.
Except, you know, the elderly.
 
Odd
 
fge
@gdoron all countries have their own way of doing things, and it's largely cultural artifacts
 
Where is "here"?
 
fge
But is there really One Way(tm) of doing this anyway?
 
Man, I love my third new monitor. :D
 
2:58 PM
Of course it's a cultural issue, I just can't imagine someone mailing me you're accepted
 
fge
Three??
 
Yes, it arrived yesterday, just wired it up when I got home today from school.
 
fge
@gdoron cultural barrier ;)
 
The more the merrier
 
fge
<-- works with a laptop
(a solidly performing laptop, but a laptop)
 
2:59 PM
Where do you live?
 
@fge I have a laptop.
 
I'm with Nexus 5... :)
 
fge
Here, France; and following closely the currently ongoing world handball championships, of course
 
fge
Chances are pretty high that France will AGAIN hold all three major titles at once
 
3:00 PM
^ old setup
 
fge
But for this they have to beat Spain
 
@fge gZ!
 
fge
@ItachiUchiha by the way, have a look at this
 
Thanks guys, and good luck @fge!
 
fge
That's a pretty generic way of handling background tasks in GUIs, and it can be used for testing too
 
3:03 PM
@fge me too
@fge Interesting
 
@fge congrats!
 
fge
@ItachiUchiha yep, I believe so too; for instance, for JavaFX the second argument to the constructor will be Platform::runLater
 
@fge Is it just for background tasks?
 
fge
And SwingUtilities::invokeLater for Swing
Well, what else would you wish this to do?
 
@gdoron don't read Java book, read general CS books, those are about Java anyway most of the time
 
3:09 PM
background tasks <---> tasks which do not run on the UI thread
 
fge
@ItachiUchiha and ThrowingRunnable is this: gist.github.com/fge/556451f94d685738e499
(inspired by the work on ThrowingLambdas)
(err, throwing-lambdas)
@ItachiUchiha yes, this class is dedicated to that
 
May be I am missing something here but why does it take Platform::runLater as an argument if we just need to just run background tasks?
 
fge
Because after you have run it you need to update the GUI
This is for this kind of cases
For instance I load trace files which are somtimes several GiB in size
 
Ahh, now I get the point
 
fge
If it were for background tasks only a simple ExecutorService is enough
 
3:20 PM
@fge ParsingResult<String> result = runner.run("sno101 snamegowtham"); seems to be deprecated. Any alternative?
 
fge
@JavaTechnical don't worry about this; in fact I shoud outright delete this method, the thing is that the runner has a method for a CharSequence, and String implements CharSequence
 
fge
@JavaTechnical give me a couple of hours and we'll work on that, OK?
 
@fge I would like to know how could I write a rule considering multiple values for a key?
I mean.
 
fge
Right now I am fully committed to some other work
 
3:23 PM
sno101
no101
num101
number101
 
fge
We'll study that
Just not now :p
 
everything means the same.
ok
tomorrow?
 
fge
Ideally, yes, but I don't know your timezone, so define "tomorrow"
 
Today is 8:54 PM Jan 29, 2015 (IST)
 
fge
OK, you're GMT+5
 
3:24 PM
tomorrow 4:00 P.M. Jan 30 (IST GMT +5:30)
 
fge
I'm GMT+1
 
Could you provide me a link where I could learn all this 'grammar' stuff?
writing parsers and all (for beginners)?
 
fge
Unfortunately not yet, this is in my todo list and right after I take care of what I currently do; in the meanwhile you can go and see some examples
But yeah, documentation is poor, I am (pain)fully aware of it
Sorry :(
 
ok, i'll start with parboiled.
 
fge
What doesn't help is that I have little CS knowledge
Well, grappa and parboiled are the same
But grappa fixes some bugs and is much cleaner ;)
But the documentation for parboiled applies to grappa (at least for 1.0.x)
parboiled is not maintained anymore, grappa is
 
3:28 PM
ok
 
@fge it's never late to learn, I coded 10 years before I learned the theoretical stuff.
 
fge
@BenjaminGruenbaum I have no doubt about this; and I am (pain)fully aware of my poor knowledge. Brian Goetz said something interesting in one of his talks: "once you give something a name it makes them real". I do have intuitive understanding of a lot of things but no way to name them, and probably a misunderstanding of them as well
 
@fge it's also really really fun to learn CS. You might find yourself surprised at how much fun theoretical CS can be.
 
fge
One thing I'd like to do is graph the grammar in my debugger
 
how to combine projects belonging to separate workspaces without making each project jar in eclipse?
 
3:31 PM
It's just really scary at the first few courses, once you get past those theory is almost as fun as practice and it's useful.
For example - grammars are a widely studied topic at linguistics and CS theory
 
fge
Well, I do have a practical grammar project which works very well, but now I need to study the core behind it more: parser theory and bytecode analysis/generation
Fun!
 
@fge if you want a fun short project that'll help you with compilers and with how Java is run you can always do nand2tetris. It's just a fun thing to do.
You start with a nand gate, and hten implement a CPU on top of that, build assembly on top of that, a VM language on top of that and then a mini version of Java. It's all guided. Final project is tetris like.
Not a lot of theory but a lot of fun and insights :D
 
fge
I'm afraid I don't have the time (nor inclination) at the moment to do that; I want to make my current project usable and documented first
 
3:46 PM
My day just got booked!
 
Hi everybody. Anyone uses access log of Apache server?
 
 
2 hours later…
fge
5:51 PM
Yay, I love method references
 
Oh?
 
fge
I have added a new method to BackgroundTaskRunner: public <T> void run(final Supplier<T> supplier, final Consumer<T> consumer) { executor.submit(() -> { final T t = supplier.get(); frontExecutor.execute(() -> consumer.accept(t)); } }
As a result I can now do taskRunner.run(this::getGlobalStatsPresenter, view::loadGlobalStats);
 
http://www.commitstrip.com/en/2015/01/29/too-much-of-a-good-thing-can-make-you-sick/
CommitStrip - Blog relating the daily life of web agencies developers
Too much of a good thing can make you sick
CommitStrip
1422554031
 
fge
And of course, all of this is testable
(some things just won't change)
I really want to make a webapp version of my debugger, I'm sure I can do it and that'll be a fun project!
The BackgroundExecutor was really the only missing piece
I'll have to thank @Michael for his blog post, everything started from there
 
 
2 hours later…
fge
8:27 PM
OK, I need help
 
 
2 hours later…
fge
10:09 PM
How would you bind the third button on scrollbars in Javafx?
 
00:00 - 23:0023:00 - 00:00

« first day (1559 days earlier)      last day (3365 days later) »