search for: camel_case

Displaying 15 results from an estimated 15 matches for "camel_case".

2020 Sep 06
0
[libnbd PATCH 2/3] golang: Typesafe returns for REnum/RFlags
...function * always nil unless h is closed *) | RUInt -> Some "uint" - | REnum (_) -> Some "uint" (* XXX return typed constant instead? *) - | RFlags (_) -> Some "uint" (* XXX return typed constant instead? *) + | REnum ({ enum_prefix}) -> Some (camel_case enum_prefix) + | RFlags ({ flag_prefix}) -> Some (camel_case flag_prefix) let go_ret_error = function | RErr -> None @@ -393,10 +393,10 @@ let print_binding (name, { args; optargs; ret; shortdesc }) = pr " return &r, nil\n" | RUInt -> pr " r...
2020 Sep 06
8
[libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
Natural fallout after my recent testsuite additions that fixed a couple of ocaml bugs in the setters. However, on at least the OCaml code, I'm not sure what we should do if a newer libnbd ever returns a bit that an older NBD.mli was not expecting at the time the OCaml compiler ran (see below). I'm also not sure if there is a more efficient way to avoid outputting Val_FOO() converters for
2007 Jul 18
3
application naming convention
I''m creating a new rails app. The application is named BigIdea. Should I create this project using: 1. rails bigidea or 2. rails big_idea I know both will work, but just want to get off to the right start using the proper rails naming convention. Thanks! Brian -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2020 Mar 24
1
[PATCH libnbd v3] Add Go language bindings (golang) (RHBZ#1814538).
This feature is roughly finished now, although it needs a few more tests and some examples. It's pretty much up to par with all the other bindings, but it lacks a completely safe AIO buffer. It won't stop you from freeing the buffer too early) because golang's GC inexplicably lacks a way to declare a root from C. I can probably do it with a global variable and ref counting on the
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
...;; List.iter ( diff --git a/generator/GoLang.ml b/generator/GoLang.ml index f07b074..81446a6 100644 --- a/generator/GoLang.ml +++ b/generator/GoLang.ml @@ -83,7 +83,7 @@ let go_arg_type = function let go_name_of_optarg = function | OClosure { cbname } -> sprintf "%sCallback" (camel_case cbname) - | OFlags (n, _) -> String.capitalize_ascii n + | OFlags (n, _, _) -> String.capitalize_ascii n let go_ret_type = function (* RErr returns only the error, with no return value. *) @@ -202,7 +202,7 @@ let print_binding (name, { args; optargs; ret; shortdesc }) = pr &qu...
2020 Sep 11
0
[libnbd PATCH v2 1/5] api: Add xxx_MASK constant for each Flags type
..." goto out;\n"; diff --git a/generator/GoLang.ml b/generator/GoLang.ml index 359c7d0..f07b074 100644 --- a/generator/GoLang.ml +++ b/generator/GoLang.ml @@ -447,12 +447,16 @@ import ( "; List.iter ( fun { flag_prefix; flags } -> - pr "type %s uint32\n" (camel_case flag_prefix); + let flag_type = camel_case flag_prefix in + let mask = ref 0 in + pr "type %s uint32\n" flag_type; pr "const (\n"; List.iter ( fun (flag, v) -> - pr " %s_%s = %s(%d)\n" flag_prefix flag (camel_case fl...
2020 Mar 25
3
[PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
Now runs a complete set of tests, notably including the AIO test. File descriptors are passed in and out as plain ints (instead of *os.File) for a couple of reasons: (1) We have to pass the plain int to syscall.Select. (2) Turning an fd into an os.File causes golang to set the blocking flag which is deeply unhelpful. Rich.
2010 Feb 07
4
Optimizing ActiveSupport with native code
...er, but I don''t see any harm in an add-on library that optimizes it for MRI. Am I missing anything? * How widely applicable is it? The ActiveSupport::Inflector singleton provides some *very* low-hanging fruit - unscientific benchmarking is suggesting 10x speed improvements in #underscore, #camel_case, etc. But native implementations are probably only useful for methods that perform non-trivial work that has no direct relation to the Ruby space - string manipulation and arithmetic being the obvious candidates. Is it worth trying to provide a comprehensive suite of ActiveSupport native implementa...
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
In v2: - now based on my proposal to add LIBNBD_SHUTDOWN_IMMEDIATE - four flags instead of two: STRICT_FLAGS is new (patch 4), and STRICT_BOUNDS is separate from STRICT_ZERO_SIZE (patch 5) - various refactorings for more shared code and less duplication Eric Blake (5): api: Add xxx_MASK constant for each Flags type generator: Refactor filtering of accepted OFlags api: Add
2009 Sep 09
0
ActiveResource - Two simple questions
I''m struggling a bit with implementing ActiveResource on a custom RESTful API. Firstly, I can''t seem to disable the transforms it does when it parses the XML. For example "CamelCase" gets rendered as camel_case, likewise underscores get converted to dashes. The docs page for ActiveResource mentions being able to set ActiveSupport.camelise_xml = false In an initializer to disable this. This throws an error. I think I can get around the naming problems by converting the hash into XML with the correct form...
2005 Apr 11
6
How to change letters after space into capital letters
What is the easiest way to change within vector of strings each letter after a space into a capital letter? E.g.: c( "this is an element of the vector of strings", "second element" ) becomes: c( "This Is An Element Of The Vector Of Strings", "Second Element" ) My reason to try to do this is to get more readable abbreviations. (A suggestion would be to
2007 Feb 25
8
Double-banger function names: preferences and suggestions
What do you prefer/recommend for double-banger function names: 1 scale.colour 2 scale_colour 3 scaleColour 1 is more R-like, but conflicts with S3. 2 is a modern version of number 1, but not many packages use it. Number 3 is more java-like. (I like number 2 best) Any suggestions? Thanks, Hadley
2019 Aug 09
7
Underscores in package names
Won't it be better to have a convention that allows lowercase, dash, underscore and dot as only valid characters for new package names and keep the ancient format validation scheme for older package names? This could be implemented by a single function, taking a strictNaming_b_1 parameter which defaults to true. Easy to use, and compliance results will vary according to the parameter value,
2010 Sep 23
1
[PATCH 1/1] Rename camel case variables in channel.c
From: Haiyang Zhang <haiyangz at microsoft.com> Rename camel case variables in channel.c Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/channel.c | 729 +++++++++++++++++++++--------------------- 1 files changed, 368 insertions(+), 361 deletions(-) diff --git
2010 Sep 23
1
[PATCH 1/1] Rename camel case variables in channel.c
From: Haiyang Zhang <haiyangz at microsoft.com> Rename camel case variables in channel.c Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/channel.c | 729 +++++++++++++++++++++--------------------- 1 files changed, 368 insertions(+), 361 deletions(-) diff --git