Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread Raul Miller
All of those parenthesis are redundant. (+*) 2 :'(u)^:(v)^:_' (%+) (+ *)^:(% +)^:_ (+*) 2 :'(u^:(v))^:_' (%+) (+ *)^:(% +)^:_ (+*) 2 :'u^:v^:_' (%+) (+ *)^:(% +)^:_ Makes sense? -- Raul On Fri, Dec 4, 2015 at 9:04 PM, Alex Shroyer wrote: > Thanks for posting that. I've wondered s

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread Henry Rich
Also see http://code.jsoftware.com/wiki/Vocabulary/hatco#DoWhile Henry Rich On 12/4/2015 9:04 PM, Alex Shroyer wrote: Thanks for posting that. I've wondered several times how to do an "increment argument until condition" using the power conjunction and your example clarified it for me. I thin

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread Alex Shroyer
Thanks for posting that. I've wondered several times how to do an "increment argument until condition" using the power conjunction and your example clarified it for me. I think it's the parentheses making the difference here: *(u^:(v))^:_ y* versus *(u)^:(v)^:_ y* On Fri, Dec 4, 2015 at 12:46

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread bill lam
Thank you for this bug report. The md5 script does not work on J64. Since this script is no longer maintained and also there are alternatives in getting md5 sum in J8. I'll remove the md5 script from the convert/misc addon. On Dec 5, 2015 1:03 AM, "David Lambert" wrote: > Test case in python and

Re: [Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread chris burke
> http://jsoftware.com/robots.txt currently disallows search engines from scanning the site. Thanks for the reminder. This was done for the old website + wiki, which was overloaded. I think it can be relaxed for the new wiki, as this has much better performance. On 4 December 2015 at 12:41, Raul

Re: [Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread Alex Shroyer
Raul, I hope the search boxes on jsoftware.com and its wiki aren't also prevented from searching it! Pascal, that's an interesting point. If I hadn't kept searching I probably would have only ever used the version you wrote up in the wiki. Joe, I agree that the quality of the documentation is ex

Re: [Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread Joe Bogner
In general, I'd say that J has excellent documentation. It's well above average for non-main stream languages. That being said, there's certainly always room for improvement in documentation - especially when things are continuing to improve and change. I had the same experience as Alex but eventu

Re: [Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread 'Pascal Jasmin' via Programming
the md5 addon may be 20x-100x slower than gethash or my direct openssl link. The challenge might have taken over 5 minutes to run with it. Your point about searchability is important. - Original Message - From: Alex Shroyer To: programm...@jsoftware.com Sent: Friday, December 4, 201

Re: [Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread Raul Miller
On Fri, Dec 4, 2015 at 3:20 PM, Alex Shroyer wrote: > This is an accessibility problem. In my ideal world, the top result for > googling the phrase "J md5" would be a page from jsoftware.com containing > documentation for the above addon, with pretty formatting, syntax > highlighting, example use

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread Henry Rich
It's in note 11 at http://code.jsoftware.com/wiki/Vocabulary/com#Details We stuck it in a note because modern code shouldn't be written that way, and we didn't think there was enough old code around to warrant more discussion. Henry rich On 12/4/2015 11:52 AM, David Lambert wrote: Is there

[Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread Alex Shroyer
As Steve Yegge has pointed out , accessibility and marketing are what separate ideas that survive from ones that pass into obscurity. One thing I think J could be doing better is m

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread 'Pascal Jasmin' via Programming
better than mine... the break trick is not needed. - Original Message - From: Joe Bogner To: programm...@jsoftware.com Sent: Friday, December 4, 2015 12:46 PM Subject: Re: [Jprogramming] adventofcode day 4 here was mine: (>:^:(0='0' -: 5&{.@([: gethash_jqtide_ 'md5' ; 'bgvyzdsv'

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread Joe Bogner
here was mine: (>:^:(0='0' -: 5&{.@([: gethash_jqtide_ 'md5' ; 'bgvyzdsv' , ":&])))^:_ (0) On Fri, Dec 4, 2015 at 12:42 PM, 'Pascal Jasmin' via Programming wrote: > in j803+ gethash is dyadic > > 'MD5'&gethash 'asdf' > > > > > A neat trick for simulating "break." tacitly with power is to m

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread 'Pascal Jasmin' via Programming
in j803+ gethash is dyadic 'MD5'&gethash 'asdf' A neat trick for simulating "break." tacitly with power is to modify the shape of input on success/break condition. I.@(boolexp) returns 0 if true, or null if not, and appending the result of I@:f, to next y can signal break with a cheap test

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread Joe Bogner
md5 addon doesn't work correctly on j64 gethash_jqtide_ 'md5';'abcdef609043' 01dbbfa3a5c83a2d506429c7b00e On Fri, Dec 4, 2015 at 12:03 PM, David Lambert wrote: > Test case in python and in j, am I misusing the j md5? > >load'/usr/share/j/8.0.4/addons/convert/misc/md5.ijs' >md5'abcde

[Jprogramming] adventofcode day 4

2015-12-04 Thread David Lambert
Test case in python and in j, am I misusing the j md5? load'/usr/share/j/8.0.4/addons/convert/misc/md5.ijs' md5'abcdef609043' a26563da313447e282c8212455525f33 >>> import hashlib >>> hashlib.md5(b'abcdef609043') >>> hashlib.md5(b'abcdef609043').hexdigest() '01dbbfa3a5c83a2d506429c7b00

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread David Lambert
Is there current documentation for this vestigial quirk? Seeing x & y without u or v in conjunctions has confused me muchly. The only documentation I recall has been this sort of anecdotal story---this being the first explanation making sense to me. On 12/4/2015 7:11 AM, bill lam wrote: > It i

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread 'Pascal Jasmin' via Programming
2 main advantages, 1. if the conjunction refers to names in its locale, then those names "stay referenced" when it returns a verb. a_t_ =: 3 fxgy_t_ =: 2 : 'a + u&v' + fxgy_t_ *: 3 + +&*: bad_t_ =: 2 : 'a + x u&v y' + bad_t_ *: + (2 : 'a + x u&v y') *: if the caller of the conjunct

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread R.E. Boss
> boun...@forums.jsoftware.com] On Behalf Of Henry Rich > Sent: vrijdag 4 december 2015 11:11 > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] My first J conjuction > > Kip's version doesn't refer to x or y directly. This is an important > improvement. Why? R.E. Boss > The bod

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread Linda A Alvord
g looks more like forks than f: f=: 13 :'x(*:@[ + *:@])y' g=: 13 :'(*:x)+*:y' (4 f 5)-:4 g 5 1 5!:4 <'f' -- *: -- @ -+- [ +- + --+ -- *: L- @ -+- ] 5!:4 <'g' -- [: +- *: │ L- [ --+- + │ -- [: L---+- *: L- ]

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread Henry Rich
I would rather say that the implementation has a quirk: it treats the names 'x' and 'y' in some cases to refer to u and v. This is a regrettable artifact from early J, required to keep old code working, and not to be relied on in new code. Henry Rich On 12/4/2015 7:11 AM, bill lam wrote: It

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread bill lam
It is more accurate to say u v and x y since x y can be used in as u v in the absence of any u v. of1=: 2 : 'y@[ x y@]' + of1 *: *:@[ + *:@] On Dec 4, 2015 6:11 PM, "Henry Rich" wrote: > Kip's version doesn't refer to x or y directly. This is an important > improvement. The body of Kip's

Re: [Jprogramming] My first J conjuction

2015-12-04 Thread Henry Rich
Kip's version doesn't refer to x or y directly. This is an important improvement. The body of Kip's conjunction is executed BEFORE the x and y arguments are seen: of =: 2 : 'v@[ u v@]' + of *: *:@[ + *:@] This is not true of the original form: fxgfy=: 2 : 0 : (v x) u v y ) +