greptilian logo

IRC log for #friendlyjava, 2019-07-03

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
03:40 nanoz joined ##friendlyjava
04:14 nanoz joined ##friendlyjava
06:24 mr_lou joined ##friendlyjava
07:42 aditsu_ joined ##friendlyjava
07:43 aditsu_ hey, is there a way to process a Reader to do regex replacement? kinda like sed, I guess
08:56 pdurbin I'm not sure I follow. Maybe post it on Stack Overflow.
09:00 aditsu_ pdurbin: you know String.replaceAll? I want a Reader version of that
09:01 pdurbin ok, that makes more sense
09:01 aditsu_ anyway, it's not critical, I read the whole thing in a String for now
09:08 pdurbin maybe this thing? http://www.unix4j.org/javadoc/latest/org/unix4j/Unix4j.html#sed(org.unix4j.unix.sed.SedOp​tions,%20java.lang.String)
09:15 aditsu_ oh, I don't want to run actual sed
09:17 pdurbin Maybe I linked to the wrong javadoc. Here's an example: Unix4j.cat("test.txt").grep("Tuesda​y").sed("s/kilogram/kg/g").sort();
09:17 pdurbin from https://stackoverflow.com/questions/34018126/apply-sed-replacement-expressions-in-java/34020074#34020074
09:20 aditsu_ oh, they reimplemented it in java?
09:22 pdurbin apparently
09:23 aditsu_ hmm, interesting
09:24 aditsu_ it doesn't seem to use Readers the way I wanted though
09:26 aditsu_ looks like it can read from a Reader and write to a Writer
09:29 pdurbin What if you use Java 8 streams like https://stackoverflow.com/questions/49476371/java-replaceall-with-java-lambda-or-java-stream-from-string/49476391#49476391
09:32 aditsu_ that's an array of strings; I saw something earlier that converts a Reader to a stream of lines and does replace on each line, but I don't think it goes back to a Reader
09:37 aditsu_ I could probably extend FilterReader to implement that.. but I don't need it that much :p
09:50 aditsu_ hmm, it's so annoying that List doesn't have a map method
09:50 aditsu_ List -> stream -> map -> collect, eww
13:34 mbiggerstaff_ joined ##friendlyjava
13:39 mbiggerstaff_ joined ##friendlyjava
14:06 mr_lou So..... javax.media.Playe
14:06 mr_lou +r
14:07 mr_lou You can prefetch a Player.
14:07 mr_lou But are there any "rules" about how many Players can be prefetched at the same time?
15:58 aditsu mr_lou: is that JMF? I don't think I even have that
15:58 mr_lou How can you not have JMR? Isn't it part of standard API?
15:58 mr_lou Eh... JMF even.
15:59 aditsu nope, at least not in recent java versions
16:00 mr_lou I see.
16:00 mr_lou Well.... I'm a JavaME dude....
16:00 aditsu haha, "Stable release2.1.1e / May 23, 2003"
16:00 aditsu that's already 16 years ago :p
16:00 mr_lou What API is used in Desktop Java then to play e.g. an MP3 fle?
16:00 mr_lou *file
16:01 aditsu you can use JMF as a library, I think there was another one but I forgot the name
16:03 aditsu JavaFX can also do it apparently
16:03 aditsu ah, I think the other library was JLayer
16:04 mr_lou mkay
16:04 mr_lou Well....for Blu-ray I only have JMF available. :-)
16:04 aditsu apparently there's a JLayerME for JavaME dudes :p
16:38 mr_lou Interesting. But I doubt it'll work for BD-J. :-)
17:05 nanoz joined ##friendlyjava
18:17 * mr_lou is making progress with his Blu-Play game. :-)

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode