greptilian logo

IRC log for #friendlyjava, 2014-08-26

##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
07:19 neversleepz joined ##friendlyjava
09:16 alephnull_ joined ##friendlyjava
14:02 kon joined ##friendlyjava
16:57 alephnull_ joined ##friendlyjava
17:20 firebird1 joined ##friendlyjava
17:23 mr_lou joined ##friendlyjava
17:35 root66 joined ##friendlyjava
17:35 mr_lou Ohoy root66  :)
17:35 root66 Hi, is it possible to pack an exe in an applet which gets extracted and executed? I swear it's not for something malicious.
17:37 * mr_lou doesn't know
17:37 mr_lou Never done any applets saly.
17:37 mr_lou *sadly.
17:37 mr_lou Always wanted to, but never got that far.
17:48 mr_lou root66, There's also a #java channel on EsperNet.
17:48 mr_lou I see nothing there about not being allowed to talk about applets in the topic.
17:50 firebird1 applet soooo 20's
17:51 mr_lou Applets are still used a lot.
17:51 mr_lou The only annoying part about them nowadays is that you have to sign them with an expensive certificate, just like you need to do with MIDlets (if you want to get rid of the security popups).
17:52 firebird1 i never used them
17:53 root66 ok thanks
17:54 mr_lou I use an applet every time I need to log on to my netbank.
17:54 mr_lou Or other government services.
17:55 mr_lou It will (of course) be replaced with Javascript in the future, but most things will.
17:56 mr_lou root66, And now you know why someone felt we needed a ##friendlyjava channel. ;-)
17:56 mr_lou root66, You lasted longer than most before they kicked you.
17:56 root66 that's why I like efnet
17:56 root66 I an an oper and I can abuse my powers
17:57 root66 but I enver need to because they see my custom host and kiss my ass
17:57 root66 but unfortunately I couldn't get an answer there
17:57 mr_lou There's a #java channel on efnet too?
17:57 root66 yeah
17:57 mr_lou Indeed.
17:58 mr_lou More friendly than the one here on freenode?
17:58 root66 everything about efnet = more friendly but less knowledgable
17:58 root66 freenode channels are all founded by people who were such assholes that no one wanted them around
17:58 root66 which isn't to say that they aren't some of the smartest people
17:58 root66 they are just assholes
17:58 mr_lou I'm not sure they know a whole lot in #java here on freenode either.
17:59 root66 like, in the beginning, every freenode coding channel was founded after a schism in an efnet channel, pretty much
17:59 root66 ops fight, someone gets mad and goes to freenode
17:59 mr_lou Well, we can certainly agree that there's a general arrogant attitude in channel ##java. Always has been.
17:59 mr_lou lol
18:02 mr_lou But I've been looking for a friendly java channel for a long time.
18:03 mr_lou Always liked Java a lot, but it hasn't been easy maintaining that interest when all you get is a bunch of arrogant replies.
18:04 mr_lou Of course, it doesn't make it any easier that my interest is often very niche.
18:04 mr_lou For example, at the moment I'm experienting with Blu-ray Disc Java. :->
18:04 mr_lou *experimenting
18:04 mr_lou Just a hobby.
18:05 firebird1 pdurbin, hey
18:06 firebird1 mr_lou, its nice you could talk alone
18:13 mr_lou root66, Quiet in efnet #java though.
18:22 alephnull_ joined ##friendlyjava
18:35 mr_lou Hello alephnull_
18:36 alephnull_ Hey, Lou.
18:36 alephnull_ Has Adrian been around today?
18:36 firebird1 i cudnt find single decentirc
18:37 mr_lou I only joined an hour ago, but the logs should help you. :-)
18:43 aditsu joined ##friendlyjava
18:46 alephnull_ Hey, Adrian!
18:47 alephnull_ CJam is pretty great, man.
18:47 mr_lou Hey aditsu
18:48 aditsu alephnull_: thanks :)
18:48 aditsu mr_lou: hi
19:19 alephnull_ aditsu: How do you feel about `b` having a (String, Number) signature?
19:19 alephnull_ I quite like the look of "ff"16b, for instance.
19:26 mr_lou Movie time. See ya.
19:27 aditsu alephnull_: that would break compatibility; for now you can do "FF":~Gb
19:27 aditsu I plan to add a hex conversion op later
19:28 alephnull_ aditsu: All right, then.
19:29 alephnull_ At present, it's not possible to place a block in a variable and later retrieve it onto the stack. Is that intentional?
19:29 alephnull_ That is, {+}:D;D doesn't work.
19:30 aditsu it works, but it executes it :p
19:30 alephnull_ Ah, that's unexpected.
19:30 aditsu golfscript does that too
19:31 alephnull_ Should it?
19:31 aditsu I could add an option to just get the block, but I'm not sure how useful it is
19:32 * aditsu wonders if he should make a cjam channel
19:33 alephnull_ Well, it would allow for the storage of "functions" for one, which is sure to come in handy.
19:34 * alephnull_ is working on a Ruby interpreter for CJam. :P
19:35 aditsu also you can do {D} to achieve something like that
19:35 alephnull_ Ah, that works.
19:36 aditsu the CJam doc is quite sparse, currently you need to go through all the source code to make a compatible interpreter
19:37 aditsu I'll try to improve that.... when I have time
19:38 alephnull_ Yes, I'm well aware. :)
19:38 alephnull_ https://gist.github.com/threeifbywhiskey/9d47b4b16ee220334660
19:38 alephnull_ I've been going through and figuring out just how each operator works for the various stack signatures.
19:39 aditsu maybe you can start with golfscript.rb and make changes
19:39 alephnull_ golfscript.rb is a disgusting pile of spaghetti.
19:39 aditsu oh ok, nevermind then :)
19:39 alephnull_ CJam is sufficiently different that it makes more sense to just start from scratch.
19:40 aditsu so why do you want a ruby interpreter anyway?
19:41 alephnull_ For shits and giggles, really.
19:41 aditsu alright :)
19:41 alephnull_ I like implementing esolangs, and CJam is pretty fun.
19:43 aditsu I just improved the j operator 1 or 2 days ago, it's pretty powerful now
19:43 aditsu I should post something that uses it somewhere :p
19:46 aditsu e.g. this is a recursive memoized fibonacci function: 2,{(_j\(j+}j (already working in 0.6.2)
19:52 alephnull_ Is the GWT version 0.6.2? That program doesn't work in the Web interpreter.
19:52 aditsu it works, but you need to give it a number first
19:53 alephnull_ I'm derping all over the place today.
19:53 alephnull_ That's pretty impressive.
19:53 aditsu I wasn't very clear :p
20:03 alephnull_ Do you suppose you could make the Web interface accept a program through a query parameter?
20:06 aditsu it's on my todo list
22:26 alephnull_ joined ##friendlyjava
22:26 alephnull_ aditsu: Any plans to add dictionaries to CJam?
22:28 aditsu alephnull_: I thought about it, but haven't made any decision... one way would be to use simple arrays of arrays (pairs) and special operators
22:29 alephnull_ Yes, they can be implemented in CJam as is.
22:29 alephnull_ It's just that it'd be a bit more performant to have them supported natively.
22:29 aditsu and shorter :p
22:29 alephnull_ Always nice. :)
22:30 alephnull_ I'm working on a brainfuck interpreter at the moment, and [0] 30000 * just isn't going to fly.
22:30 alephnull_ I'm going to use a pseudo-hash for the tape, of the form ["t0" val "t1" val].
22:30 aditsu why not?
22:31 aditsu I'd just use a flat array
22:31 aditsu in fact I wrote an interpreter, but it's quite ugly because I don't have a "while" yet
22:32 alephnull_ [0] 30000 * brings the Web interpreter to a crawl.
22:32 aditsu and I got a bit stuck because brainfuck is not well defined, there are several incompatible variants
22:33 alephnull_ Well, there's no sense in forgoing CJam's bignum support, so non-wrapping cells seems the way to go there.
22:33 alephnull_ And "no change on EOF" is the most versatile answer to that question.
22:46 aditsu alephnull_: here's one version of my interpreter: 0a3e4*:A;q:I;_"><+-.,[]"--'>/"AT):T=:U;​"*'</"AT(:T=:U;"*'+/"ATU):Ut:A;"*'-/"AT​U(:Ut:A;"*'./"Uco"*',/"I{I(i\:I;}W?:UAT@t:A;"*'[/"Ug{{"*']/"U}g}*"*~
22:46 aditsu you need to put the brainfuck program as a string before it
22:46 aditsu works with the hello world example from wikipedia
22:47 alephnull_ Is it supposed to take quite a while to run?
22:48 alephnull_ I tried it with ",." prepended.
22:48 aditsu takes about 1-2 sec for hello world here
22:48 aditsu ",." took about the same time
22:49 aditsu but outputted a square :p I should probably give it some input
22:49 aditsu ah better, it outputs the first character
22:51 alephnull_ I can't get it to do anything for some reason. :/
22:52 aditsu the full code I'm using: ",."0a3e4*:A;q:I;_"><+-.,[]"--'>/"AT):T=:​U;"*'</"AT(:T=:U;"*'+/"ATU):Ut:A;"*'-/"AT​U(:Ut:A;"*'./"Uco"*',/"I{I(i\:I;}W?:UAT@t:A;"*'[/"Ug{{"*']/"U}g}*"*~
22:52 aditsu input foo, output f
22:54 alephnull_ Very strange.
22:54 alephnull_ Aside from that, do you not suppose that blocks should operate on their own private copies of the stack at their call sites?
22:56 aditsu no, that would be quite inefficient
23:02 aditsu alephnull_: what cpu and browser are you using?
23:03 alephnull_ I ran it using the Java interpreter.
23:03 aditsu oh, maybe it's still waiting for input then :p you need a ctrl+d (or ctrl+z in windoze) at the end
23:04 aditsu I was testing online
23:05 alephnull_ Ah, yep, it was my not sending EOF...
23:05 aditsu if I add "read single character" to CJam, it will help with bf input
23:05 alephnull_ {s'=+"{0="\+'}+~=1=}:H;
23:06 alephnull_ I think this is a pretty solid definition for pseudo-Hash lookups on nested arrays, but I can't  figure out how to handle the case of a nonexistent key.
23:08 aditsu how do you use it?
23:09 alephnull_ [[1 2] [3 4] [5 6]] 5 H will leave a six on the stack.
23:11 aditsu interesting.. but it feels like there should be a better way
23:12 aditsu maybe I'm missing + on blocks
23:12 alephnull_ Block composition would certainly be very useful.
23:13 aditsu this works: {\{0=1$=},0=1=\;}:H;
23:14 aditsu oh better: {\{0=1$=}=1=\;}:H;
23:15 alephnull_ Nice.
23:16 alephnull_ Could List Block = return a failure value?
23:17 aditsu check the discussion at http://sourceforge.net/p/cjam/tickets/4/
23:18 aditsu with # you can get the index, which is -1 if not found
23:19 alephnull_ Yeah, I suppose that works.
23:19 aditsu needs a copy of the array and indexed access, but you can handle a missing key
23:19 alephnull_ More stack juggling involved, though.
23:20 aditsu there's also the question of what H should return
23:20 alephnull_ The value paired with the key is the only logical response, I would think.
23:20 aditsu and if the key is missing?
23:20 alephnull_ dict[key] returns the value in every language I've used, anyhow.
23:20 alephnull_ Ah, true, that is a problem.
23:21 alephnull_ CJam doesn't have anything akin to null or undefined, as far as I'm aware.
23:21 aditsu right
23:59 alephnull_ aditsu: Quickmap and quickfold ought to be able to take a block, don't you think?

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

##friendlyjava on freenode