From david@REDACTED Mon Dec 1 21:41:35 2014 From: david@REDACTED (David Haguenauer) Date: Mon, 1 Dec 2014 15:41:35 -0500 Subject: [erlang-patches] Typo fixes Message-ID: <20141201204135.GS30191@snafu.kurokatta.org> Hi! Here's a small documentation patch that turns occurrences of "Endianess" into "Endianness", which seems to be a much more common spelling: git fetch git://github.com/haguenau/otp.git fix-endianness-speling Changes: https://github.com/haguenau/otp/compare/erlang:maint...fix-endianness-speling https://github.com/haguenau/otp/compare/erlang:maint...fix-endianness-speling.patch I'm fairly confident that this doesn't break anything. Replacing occurrences of "endianess" regardless of case touches many more files, and will require a more thorough review before I push it, assuming the present pull request is accepted. -- David Haguenauer -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 255 bytes Desc: Digital signature URL: From mikpelinux@REDACTED Tue Dec 2 11:29:40 2014 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Tue, 2 Dec 2014 11:29:40 +0100 Subject: [erlang-patches] Typo fixes In-Reply-To: <20141201204135.GS30191@snafu.kurokatta.org> References: <20141201204135.GS30191@snafu.kurokatta.org> Message-ID: <21629.38036.774644.440473@gargle.gargle.HOWL> David Haguenauer writes: > Hi! > > Here's a small documentation patch that turns occurrences of > "Endianess" into "Endianness", which seems to be a much more common > spelling: > > git fetch git://github.com/haguenau/otp.git fix-endianness-speling > > Changes: > > https://github.com/haguenau/otp/compare/erlang:maint...fix-endianness-speling > https://github.com/haguenau/otp/compare/erlang:maint...fix-endianness-speling.patch > > I'm fairly confident that this doesn't break anything. Replacing > occurrences of "endianess" regardless of case touches many more files, > and will require a more thorough review before I push it, assuming the > present pull request is accepted. FWIW I support this patch. /Mikael > > -- > David Haguenauer > xapplication/pgp-signature [Click mouse-2 to save to a file] > > ---------------------------------------------------------------------- > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- From mikpelinux@REDACTED Tue Dec 2 19:41:52 2014 From: mikpelinux@REDACTED (Mikael Pettersson) Date: Tue, 2 Dec 2014 19:41:52 +0100 Subject: [erlang-patches] fix 'eacces' spelling errors Message-ID: <21630.2032.802199.628536@gargle.gargle.HOWL> The return from the file module for EACCES errors is the atom 'eacces'. Unfortunately it's easy to misspell. This patch fixes the places in otp where it's spelled as 'eaccess' or as 'eacess'. Luckily the places are all in comments or in documentation, not in actual code. The lines with the 'eacess' spelling error also misspelled 'delete' so I fixed that too. ets:tab2file/3 synthesizes 'eaccess' which seems wrong, but changing that might break code which expects this particular atom so I'm not changing it. Signed-off-by: Mikael Pettersson Links: git fetch git://github.com/mikpe/otp.git fix-eacces-spelling https://github.com/mikpe/otp/compare/erlang:maint...fix-eacces-spelling https://github.com/mikpe/otp/compare/erlang:maint...fix-eacces-spelling.patch https://github.com/erlang/otp/pull/551 From dmitriy.kargapolov@REDACTED Tue Dec 30 21:56:34 2014 From: dmitriy.kargapolov@REDACTED (Dmitriy Kargapolov) Date: Tue, 30 Dec 2014 15:56:34 -0500 Subject: [erlang-patches] [jinterface] add erlang term parse/match/bind features Message-ID: <54A31182.5070606@gmail.com> This implements functionality similar to following C functions, which are part of erl_interface application: - ETERM *erl_format(FormatStr, ...); - int erl_match(ETERM *Pattern, ETERM *Term); To acheve this new classes introduced: * OtpErlangVar - variable placeholder; * OtpErlangBind - variable values collection; * OtpErlangParser - "erl_format" parser implementation; * OtpErlangPattern - pattern abstraction with match/bind functions; Classes representing composite objects OtpErlangList, OtpErlangTuple, OtpErlangMap and new OtpErlangVar implement interface OtpErlangVarrier defining match and bind functions for these objects. Class OtpErlangMap reworked to be based on HashMap instead of two separate lists keeping keys and values. This is close to native semantics of maps and makes easier implementing basic map manipulations. It addition to OtpErlangBind custom user's class may be used as receiver of matched variables values. Java reflection is used to prepare variable value setters during the parse stage. Java doc has more details and examples. Test cases implemented. git fetch https://github.com/x0id/otp.git jinterface_pattern_matching Thanks. From vladdu55@REDACTED Wed Dec 31 16:27:04 2014 From: vladdu55@REDACTED (Vlad Dumitrescu) Date: Wed, 31 Dec 2014 16:27:04 +0100 Subject: [erlang-patches] [jinterface] add erlang term parse/match/bind features In-Reply-To: <54A31182.5070606@gmail.com> References: <54A31182.5070606@gmail.com> Message-ID: Hi Dmitriy, Nice implementation! I have something similar that I wanted to submit, but I like some of your details better. I have a few comments, after browsing the code just briefly: - I would prefer to have the OEMap changes as a separate PR, as it's a separate issue and there are more things to address there, like for example, OEMap could also implement Map, like OEList implements Iterable (and might implement List). - I don't like the name OEVarrier, it doesn't mean anything. Maybe OEMatcher would be better? - OEBind might be clearer as OEBinding, as it contains a set of bindings? - I think there are still some merge issues, like for example OEList:299 where the comment is from the old equals method best regards, Vlad On Tue, Dec 30, 2014 at 9:56 PM, Dmitriy Kargapolov < dmitriy.kargapolov@REDACTED> wrote: > This implements functionality similar to following C functions, which are > part of erl_interface application: > - ETERM *erl_format(FormatStr, ...); > - int erl_match(ETERM *Pattern, ETERM *Term); > > To acheve this new classes introduced: > * OtpErlangVar - variable placeholder; > * OtpErlangBind - variable values collection; > * OtpErlangParser - "erl_format" parser implementation; > * OtpErlangPattern - pattern abstraction with match/bind functions; > > Classes representing composite objects OtpErlangList, OtpErlangTuple, > OtpErlangMap and new OtpErlangVar implement interface OtpErlangVarrier > defining match and bind functions for these objects. > > Class OtpErlangMap reworked to be based on HashMap instead of two separate > lists keeping keys and values. This is close to native semantics of maps > and makes easier implementing basic map manipulations. > > It addition to OtpErlangBind custom user's class may be used as receiver > of matched variables values. Java reflection is used to prepare variable > value setters during the parse stage. Java doc has more details and > examples. Test cases implemented. > > git fetch https://github.com/x0id/otp.git jinterface_pattern_matching > > Thanks. > > > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmitriy.kargapolov@REDACTED Wed Dec 31 17:31:09 2014 From: dmitriy.kargapolov@REDACTED (Dmitriy Kargapolov) Date: Wed, 31 Dec 2014 11:31:09 -0500 Subject: [erlang-patches] [jinterface] add erlang term parse/match/bind features In-Reply-To: References: <54A31182.5070606@gmail.com> Message-ID: <54A424CD.9010306@gmail.com> Hi Vlad, Thank you much for your notes. I agree some names were not good enough, I changed these per your suggestion. Old comment removed as well. As to OtpErangMap class - I was not going to re-implement it initially. But in order to add match/bind I had to do this. I tried to not add much new methods, keeping implementation rather "just enough" to work with maps. You are very welcome to add/change whatever you see reasonable in separate PR though. Best Regards and Happy New Year! - Dmitriy. git fetch https://github.com/x0id/otp.git jinterface_pattern_matching https://github.com/x0id/otp/compare/erlang:master...jinterface_pattern_matching https://github.com/x0id/otp/compare/erlang:master...jinterface_pattern_matching.patch On 12/31/2014 10:27 AM, Vlad Dumitrescu wrote: > Hi Dmitriy, > > Nice implementation! I have something similar that I wanted to submit, > but I like some of your details better. > > I have a few comments, after browsing the code just briefly: > > - I would prefer to have the OEMap changes as a separate PR, as it's a > separate issue and there are more things to address there, like for > example, OEMap could also implement Map, like OEList implements > Iterable (and might implement List). > - I don't like the name OEVarrier, it doesn't mean anything. Maybe > OEMatcher would be better? > - OEBind might be clearer as OEBinding, as it contains a set of bindings? > - I think there are still some merge issues, like for example > OEList:299 where the comment is from the old equals method > > best regards, > Vlad > > > On Tue, Dec 30, 2014 at 9:56 PM, Dmitriy Kargapolov > > > wrote: > > This implements functionality similar to following C functions, > which are part of erl_interface application: > - ETERM *erl_format(FormatStr, ...); > - int erl_match(ETERM *Pattern, ETERM *Term); > > To acheve this new classes introduced: > * OtpErlangVar - variable placeholder; > * OtpErlangBind - variable values collection; > * OtpErlangParser - "erl_format" parser implementation; > * OtpErlangPattern - pattern abstraction with match/bind functions; > > Classes representing composite objects OtpErlangList, > OtpErlangTuple, OtpErlangMap and new OtpErlangVar implement > interface OtpErlangVarrier defining match and bind functions for > these objects. > > Class OtpErlangMap reworked to be based on HashMap instead of two > separate lists keeping keys and values. This is close to native > semantics of maps and makes easier implementing basic map > manipulations. > > It addition to OtpErlangBind custom user's class may be used as > receiver of matched variables values. Java reflection is used to > prepare variable value setters during the parse stage. Java doc > has more details and examples. Test cases implemented. > > git fetch https://github.com/x0id/otp.git jinterface_pattern_matching > > Thanks. > > > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > > -------------- next part -------------- An HTML attachment was scrubbed... URL: