The first Corinna commits
Recently, some of the first commits of the new Corinna object system for Perl have been merged into the Perl core. If you’re not familiar with it, I wrote a brief tutorial .
Around the same time as those commits were merged, I was rummaging around on an old computer and discovered, to my shock, that I had an old implementation of what I was trying to do, before that fateful day at a conference when Sawyer X, the man driving Perl development, saw my work, liked it, but urged me to to stop the implementation and just design something great. (As an aside, it also doesn’t quite appear to match my previous descriptions of it. Oops).
With my initial commit of that code on September 2, 2018, the Corinna project has been roughly four and a half years from conception to the initial core implementation. Since that time, I worked on design, made an initial announcement, and led a design team of some of the top experts in Perl, with much feedback coming from others who’ve designed object systems such as Moose or Moo, and from that effort, Corinna was accepted and the Perl core will have clean, mature OOP system for the first time (and one whose prototype, Object::Pad has been running in production at more than one company).
Keep in mind that bless
and @ISA
will still be there. We’re not taking
anything away because the Perl 5 Porters (a.k.a., P5P) strive hard to not break
backwards-compatibility.
If you’re curious, here’s what a simple 2D point class looked like;
class Point {
has [qw/x y/] => ( default => sub { 0 } );
sub clear ($self) {
$self->@{ 'x', 'y' } = ( 0, 0 );
}
}
That’s not good at all, but I was trying to work within Perl’s limitations. It was also largely a response to improve upon Moxie :
package Point {
use Moxie;
extends 'Moxie::Object';
has x => ( default => sub { 0 } );
has y => ( default => sub { 0 } );
sub x : ro;
sub y : ro;
sub clear ($self) {
$self->@{ 'x', 'y' } = (0, 0);
}
}
I quite liked the intent of some of the ideas in Moxie, but that syntax is what pushed me to finally build Corinna. By contrast, here’s the same code in Corinna:
class Point {
field ( $x, $y ) :param = 0;
method clear () {
( $x, $y ) = ( 0, 0 );
}
}
There will be an adjustment period while people learn a new way to program in Corinna, the same way that learning a new programming requires learning to think a different way, but overall, the Perl community is very happy about the project. Some are not, but that’s OK. Having a perfectly homogeneous community, marching in lockstep, no questions asked, would be a creepy thing. It would also be a useless thing. Diversity of opinion is not only healthy, but needed.
What’s Next?
That’s a great question. I’ve co-written one book on Perl and written another (linked in the images at the top of the page), I served two decades at The Perl Foundation, the last several years as a member of the board, I have a bunch of modules on the CPAN , and our company, All Around the World , is still doing well, with multiple contracts. I’m currently having fun building an OpenAPI system using Dancer2 (something I’ve not had much chance to play with before), and another company inquired about help from us to go in and fix their object-oriented mess, including cleaning up a bunch of old code to use Moose .
So we’re doing fine, but whither Perl? Or to abuse Shakespeare:
To Perl or not to Perl, that is the question:
Whether 'tis nobler in the code to suffer
The slings and arrows of outrageous criticism,
Or to add commits against a sea of troubles,
And by rebasing, end them? To die(), to sleep(),
No more; and by a sleep() to say we end
The heartache and the thousand natural shocks
That Perl is heir to. 'Tis a consummation
Devoutly to be wished. To die(), to sleep();
To sleep–perchance to dream–ay, there's the 'no strict.'
Sue me. I like poetry. Why do you think my nickname is “Ovid”?
Let’s be honest, Perl isn’t as popular as it used to be. There’s a lot of angst in the Perl community expressed over this. There’s also a lot of finger-pointing. There are many reasons that Perl is not as popular as it once was, but rather than ruminate on history and stir up debates over things we cannot change, I want to look to the future.
Fix the problem, not the blame.
So what’s the problem?
Sure, we can talk about fewer Perl developers or fewer companies starting new projects in Perl, but those are symptoms. Instead, I want to focus on one problem that Perl has and I think it’s both important and solvable.
Perl 5 was released in October of 1994 and there’s a misconception that Perl hasn’t changed much since then. I still remember a Linux conference in Prague where a programmer was telling me that Perl hasn’t been updated in decades and this is a widespread misconception that hurts Perl (we suck at marketing).
Just looking at the stable releases in the last decades:
| Pumpking | Version | Release Date |
|---|---|---|
| Ricardo | 5.16.0 | 2012-May-20 |
| Ricardo | 5.18.0 | 2013-May-18 |
| Ricardo | 5.20.0 | 2014-May-27 |
| Ricardo | 5.22.0 | 2015-Jun-01 |
| Ricardo | 5.24.0 | 2016-May-09 |
| Sawyer X | 5.26.0 | 2017-May-30 |
| Sawyer X | 5.28.0 | 2018-Jun-22 |
| Sawyer X | 5.30.0 | 2019-May-22 |
| Sawyer X | 5.32.0 | 2020-Jun-20 |
| Sawyer X | 5.34.0 | 2021-May-20 |
| Ricardo | 5.36.0 | 2022-May-27 |
As you can see, Perl gets a regular, major release every year. Some of the new
features introduced into Perl include native try/catch
blocks. Function
signatures are now on by default. Unicode 14.0 is supported. True booleans are
supported.  There are some amazing improvements to the regular
expression engine, widely considered the best in the programming
world .
There’s much more, but many issues are very Perl-specific and even many Perl
programmers are not aware of the work done by the porters. The Perl 5.36.0
release alone represents approximately a year of development since Perl 5.34.0
and contains approximately 250,000 lines of changes across 2,000 files from 82
authors (taken from the perldelta
file for 5.36.0).
Note that 82 developers might seem like a lot, but it’s also incomplete. Many people who’ve contributed haven’t done so by committing directly to the Perl repository.
So Perl is still under heavy development, but it’s hard to argue that we’ve done a great job communicating that, so how can we communicate that?
Perl 7
The excellent Raku Programming Language was known as “Perl 6” for many years, but it diverged far enough from its Perl roots to merit a separate name. So when there was much excitement about a new release of Perl called Perl 7, there was great news coverage of it .
In short, even with a fresh Perl install, to use Perl effectively today, you often get the behavior of an older version of Perl and you have to ask for the modern features. If you’re new to Perl, there’s good chance you wouldn’t know that.
Unfortunately, that work was halted amidst disagreements over direction and the Perl Steering Council (PSC) later released a discussion of about what it would take to get to Perl 7 . Is Corinna going to be part of Perl 7? The PSC recently announced that it might . I think it should, but asking my opinion is like asking a parent if their newborn is cute, so you can ignore me.
But on the off chance you don’t want to ignore me (you’re reading this, right?), Perl 7 will likely be a newsworthy release, showing the world that Perl is still in active development, but the features in the language are rather marginal in value, in the eyes of many. Corinna is the single-largest change to the Perl language in three decades, and that might make a splash, but again, I’m biased. Nonetheless, releasing Perl 7 is not trivial and Corinna might not be the top priority of the developers who will actually get the work done. I can live with that.
At the risk of offending a few people, barring Corinna, any release of Perl 7 is likely to be much of what we have in Perl right now, but with easier defaults. It will simply make it easier to write Perl, but not offer much “new” to current developers, beyond a message to the programming world.
For technical and political reasons, Perl 7 without Corinna might be exactly what Perl needs. But even then, Perl 7 will be a far cry from the Perl released back in 1994. Perl’s been evolving rapidly over the years, but without people hearing about it.
But how can we push this further? That’s what I’ve been thinking about.
Perl 8
Perl’s regular expression engine is world-class, but it’s hardly the reason to choose a language. Or to keep it. What else does Perl offer? With Corinna, Perl will have one of the nicest OOP systems of popular dynamic languages (er, I may be biased, but when I look at other “popular” dynamic languages, I wince). So that can be two killer features. But we need more, but to get to “more,” we need to address the fact that the Perl core is missing a few features that other languages provide. We need to fix that.
Installation Manager
Recently, I hit an issue with a client. My code was correct, but failed in the test environment due to a “Can’t locate object method” error. As it turns out, the actively maintained CPAN module I was using was last updated in 2022, but the version the client had was released over two decades ago! Worse, my attempt to locally debug this was frustrated by some particulars in the client setup which caused me to find a current local version of the module and not the archaic version the client had. Fortunately, it was a trivial fix, but spending time debugging this issue cost our client money they should not have had to spend.
Per the nodejs blog :
CPAN and RubyGems have blurred the lines between development tools and system package managers. With
npm
we wish to draw a clear line: it is not a system package manager. It is not for installing firefox or ffmpeg or OpenSSL; it is for rapidly downloading, building, and setting up Node packages.npm
is a development tool. When a program written in Node becomes sufficiently mature it should be distributed as a tarball,.deb
,.rpm
, or other package system. It should not be distributed to end users withnpm
.
Out of the box, Perl has a cpan
client which lets you install Perl modules.
It’s great for developing libraries, but we don’t offer great support for
developing applications. When I cd
into a client directory, I want to run
something like perl-local .
and have it pick up the version of Perl for this
project and use this project’s CPAN modules. Having this completely isolated
from other Perl projects which might have different needs. We have many Perl
tools designed to solve various parts of the problem, but it’s time to put them
into the core. There’s now a discussion on the P5P mailing list about
addressing
this .
To put this as a simplistic user story:
- As a developer
- I want to easily set up multiple isolated Perl environments
- So I can support multiple isolated clients/projects
- Because my work shouldn’t have the fragility of picking up the wrong dependencies
There’s a lot of work there, but a developer installing Perl for the first time should be able to solve this, just as developers downloading other languages for the first time can.
Concurrency
<snark>Promises, promises.</snark>
Much of the programming world today is dealing with concurrency in some form. There are serious problems this solves, including:
- CPU-intensive work can be split across multiple CPUs (or GPUs!).
- Don’t wait on code that might block due to external resource constraints.
P5P has long preferred that new ideas for Perl be tested on the CPAN before incorporating these ideas into the core. This allows us to see what is and isn’t working (or in some cases, just to better understand the syntax people prefer). There are multiple attempts to solve the concurrency issue on the CPAN and given that this feature is being used more and more, and becoming a default feature in many languages, I think the core needs to support his.
Data Constraints
As with an installation manager and concurrency, the CPAN offers many solutions for constraining your data. You might notice I avoided the word “type.” Computer scientists have reasonable disagreements about types and type systems. Computer programmers have shouting matches.
I know what I want from types. Others strongly disagree. However, a very
workable compromise has emerged in Perl. This is largely based on
Type::Tiny
and similar modules. For
Moose, for example, I can define an attribute like this:
has expires_at => (
is => 'rw',
isa => InstanceOf ['DateTime' ],
);
With that, I can read and write the expires_at
value and know that the value
must be a DateTime
instance or a subclass (er, or anything that overloaded
the isa
method to lie and say it’s a DateTime
class, but we’ll ignore that
because it opens up a fascinating discussion well beyond the scope of this
post).
For a subroutine, I might do this:
sub reset_totals ($count, $totals) {
state $check = compile(Int, HashRef[Int]);
($count, $totals) = $check->($count, $totals);
$count = constrain($count);
foreach my $key (keys $totals->%*) {
$totals->{$key} = $count;
}
}
Unlike the attribute approach, the sub
solution only guarantees the kind of
data you have in variables at the time of the $check->()
. In the above
subroutine, if constrain
returned an array reference instead of an integer,
the above code would not only continue to run, but it would do so without
warning, to the point of corrupting the data in the code calling this function!
Note that the above is not a hypothetical problem. It happens, but we kid ourselves that our test suite will protect us. In reality, attaching a data constraint to variables instead of statements would fix the above. TypeScript isn’t perfect, but I’ve enjoyed the fact that many of these errors simply don’t occur (though TypeScript handles this differently).
We are not, however, there yet. Type::Tiny
and related tools are great ways of
minimizing the issue, but their syntax is clumsy and their features are limited,
largely because they’re working within the limitations of Perl. This is not a
criticism of these modules, though. We have to start somewhere. However, our
company is finding more and more clients relying
on Type::Tiny
due to the safety it provides. More work is needed here.
Miscellaneous
I think Perl needs native exceptions. It needs native stack traces. Native constants, including deep structures. Copy-on-write would be useful, but it’s not clear how feasible this is. There’s a lot more, but what I’ve written might already be controversial enough that stopping is probably good.
Conclusion
We need a vision of Perl’s future. Many of the things we need in the Perl core are things we’ve re-implemented many times on the CPAN. Not having them in core means developers have to learn their current environment’s way of handling this, and makes it easier to choose a module that might be inappropriate, or worse, unmaintained. This increases the cognitive burden on all developers who, I’m sure, are more interested in building solutions than arguing over them.
Perl 7 is going to be wonderful, but it’s time to start thinking about Perl 8.
If you have ideas about what Perl needs for the future, please leave a comment below.


Autodesk Remake is the predecessor to RECAP but the technique for taking pictures is the same.
Index:
Moving camera.
Flying Camera:
Turntable:
Moving the object:
Open Autodesk ReCap -> New Project.
Select Photo to 3D
Select Object.
Select the folder you saved your images in
Click Create.
Select Auto crop and name your file.
Files will now be uploaded and the mesh generation begins. This will take a while, depending on the que but expect half a day.
Let the waiting game begin!
Click on the arrow to download all file created for the scan (mesh files + textures)
A link to your downloaded file will now be added. Double click it to open it in the editor
Open your downloaded .rcm file.
(or dobble click your file in the dashboard)
Edit your file to your hearts content and then export.
Here is a video explaining the editing capabilities of RECAP:
As this is a normal Mesh file it is ready for 3D Print or you can modify it with all the normal mesh editng software You can also edit your mesh in like:
If you want to turn it to a solid model for edit it in a CAD software like Solidworks or Fusion 360 Check out the vidoe below:
Here is my super simple setup with a paper back drop, front facing soft light.
This is the result:
Camera: iPhone 6,
Images: 90,
Manually rotaing the object


Unsharing variables
[Using finite domain integers]
Detailed Description
Unsharing replaces multiple occurences of the same variable by fresh yet equal (enforced through propagators for equality) variables: after unsharing a variable appears at most once. Note that this is only done for not yet assigned variables (as all propagators can handle multiple occurences of the same variable provided it is already assigned).Unsharing is useful for constraints that only accept variable arrays without multiple occurences of the same variable, for example extensional.
Functions | |
| void | Gecode::unshare (Space *home, IntVarArgs &x, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
| Replace multiple variable occurences in x by fresh variables. |
Function Documentation
| void Gecode::unshare | ( | Space * | home, | |
| IntVarArgs & | x, | |||
| IntConLevel | icl = ICL_DEF , |
|||
| PropKind | pk = PK_DEF | |||
| ) |
Replace multiple variable occurences in x by fresh variables.
Supports domain consistency (icl = ICL_DOM, default) and bounds consistency (icl = ICL_BND).
Definition at line 135 of file unshare.cc.


Class: Aws::MediaTailor::Types::SegmentationDescriptor
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb |
Overview
The segmentation_descriptor
message can contain advanced metadata
fields, like content identifiers, to convey a wide range of
information about the ad break. ::Aws::MediaTailor
writes the ad metadata in
the egress manifest as part of the EXT-X-DATERANGE
or EventStream
ad marker's SCTE-35 data.
segmentation_descriptor
messages must be sent with the time_signal
message type.
See the segmentation_descriptor()
table of the 2022 SCTE-35
specification for more information.
Constant Summary
Instance Attribute Summary
-
#segment_num ⇒ Integer
rw
The segment number to assign to the
segmentation_descriptor.segment_num
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification Values must be between 0 and 256, inclusive. -
#segmentation_event_id ⇒ Integer
rw
The Event Identifier to assign to the
segmentation_descriptor.segmentation_event_id
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification. -
#segmentation_type_id ⇒ Integer
rw
The Type Identifier to assign to the
segmentation_descriptor.segmentation_type_id
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification. -
#segmentation_upid ⇒ String
rw
The Upid to assign to the
segmentation_descriptor.segmentation_upid
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification. -
#segmentation_upid_type ⇒ Integer
rw
The Upid Type to assign to the
segmentation_descriptor.segmentation_upid_type
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification. -
#segments_expected ⇒ Integer
rw
The number of segments expected, which is assigned to the
segmentation_descriptor.segments_expectedS
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification Values must be between 0 and 256, inclusive. -
#sub_segment_num ⇒ Integer
rw
The sub-segment number to assign to the
segmentation_descriptor.sub_segment_num
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification. -
#sub_segments_expected ⇒ Integer
rw
The number of sub-segments expected, which is assigned to the
segmentation_descriptor.sub_segments_expected
message, as defined in section <IP_ADDRESS> of the 2022 SCTE-35 specification.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#segment_num ⇒ Integer
(rw)
The segment number to assign to the
segmentation_descriptor.segment_num
message, as defined in section
<IP_ADDRESS> of the 2022 SCTE-35 specification Values must be between 0
and 256, inclusive. The default value is 0.
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end
#segmentation_event_id ⇒ Integer
(rw)
The Event Identifier to assign to the
segmentation_descriptor.segmentation_event_id
message, as defined
in section <IP_ADDRESS> of the 2022 SCTE-35 specification. The default
value is 1.
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end
#segmentation_type_id ⇒ Integer
(rw)
The Type Identifier to assign to the
segmentation_descriptor.segmentation_type_id
message, as defined
in section <IP_ADDRESS> of the 2022 SCTE-35 specification. Values must
be between 0 and 256, inclusive. The default value is 48.
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end
#segmentation_upid ⇒ String
(rw)
The Upid to assign to the
segmentation_descriptor.segmentation_upid
message, as defined in
section <IP_ADDRESS> of the 2022 SCTE-35 specification. The value must
be a hexadecimal string containing only the characters 0 though 9
and A through F. The default value is "" (an empty string).
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end
#segmentation_upid_type ⇒ Integer
(rw)
The Upid Type to assign to the
segmentation_descriptor.segmentation_upid_type
message, as defined
in section <IP_ADDRESS> of the 2022 SCTE-35 specification. Values must
be between 0 and 256, inclusive. The default value is 14.
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end
#segments_expected ⇒ Integer
(rw)
The number of segments expected, which is assigned to the
segmentation_descriptor.segments_expectedS
message, as defined in
section <IP_ADDRESS> of the 2022 SCTE-35 specification Values must be
between 0 and 256, inclusive. The default value is 0.
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end
#sub_segment_num ⇒ Integer
(rw)
The sub-segment number to assign to the
segmentation_descriptor.sub_segment_num
message, as defined in
section <IP_ADDRESS> of the 2022 SCTE-35 specification. Values must be
between 0 and 256, inclusive. The defualt value is null.
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end
#sub_segments_expected ⇒ Integer
(rw)
The number of sub-segments expected, which is assigned to the
segmentation_descriptor.sub_segments_expected
message, as defined
in section <IP_ADDRESS> of the 2022 SCTE-35 specification. Values must
be between 0 and 256, inclusive. The default value is null.
# File 'gems/aws-sdk-mediatailor/lib/aws-sdk-mediatailor/types.rb', line 3614
class SegmentationDescriptor < Struct.new( :segment_num, :segmentation_event_id, :segmentation_type_id, :segmentation_upid, :segmentation_upid_type, :segments_expected, :sub_segment_num, :sub_segments_expected) SENSITIVE = [] include Aws::Structure end


If you have Maya for Windows version 6.5, 7.0, 8.0, or 8.5, the above is all you need to worry about since you can use the pre-compiled version. But if you have a different version, or you want to use the latest unreleased code from SVN, you're going to have to compile the MLL plug-in file from the source code.
To to compile the most current code, you will need to check out both Niflib and the Maya plug-in source code from SVN, as described above. You should then first compile Niflib as a dynamic library. On Windows, using MSVC, you can open the Niflib solution and choose the Release - DLL configuration from the drop-down on the tool bar, and then select Build > Build Solution from the menu. This will create the niflib.dll file in the bin folder within the folder where you downloaded the Niflib code.
If you haven't already, you should also add the location of the include and lib folders within this same folder to your compiler's search paths so that your other projects which use Niflib will be able to include the code. This is done in MSVC by selecting Tools > Options... from the menu, and then expanding "Projects and Solutions" and selecting "VC++ Directories" in the left pane. Then in the right pane, you should select Include Files from the Show directories for drop down box, and then add the location of the Niflib include folder. Next, do the same thing for Library Files and add the Niflib lib folder.
Finally, you will compile the Maya Plug-in code. This process requires that your compiler be aware of the location of both Niflib and the Maya SDK include and lib files. On Windows, using MSVC, you can open the Maya Plug-in solution and select the version of Maya you have from the configuration drop down. If your version is not listed or if you installed Maya in a non-standard location, however, you will need to add the correct paths similar to the way the Niflib paths were added above. Alternatively, if you know what you're doing, you can create a new configuration with the proper path or edit an existing configuration to correct the path. Once you have the path configured correctly, you can select Build > Build Solution and the result will be the nifTranslator.mll file created in the bin folder within the folder where the Plug-in code was downloaded. It should be located in a sub-folder that indicates the version of Maya that selected in the configuration drop-down when the solution was built.
If you have any problems at this phase, such as code errors involving functions not being found or having the wrong number of parameters, Niflib may been changed in ways that break the Maya plug-in. The version of Niflib that was current when the plug-in worked on last was 0.7.2, so using that version may fix the problems.
Once you have everything compiled, you will have to move the resulting files to their proper locations. On Windows, the niflib.dll file can be moved to the Maya folder, while the nifTranslator.mll file can be moved to the plug-ins folder within the Maya folder. The nifTranslatorOpts.mel options script should also be placed in a location where Maya can find it, such as the scripts/others folder within the Maya folder. You should now be able to activate the plug-in from within Maya as described at the beginning of this page.
This code should be compatible with multiple versions of Maya on multiple operating systems, but only the above-mentioned versions for Windows have been tested. If you successfully compile this code for another version of Maya, please post a link to your build on the niftools forum so others can use it!
If you can program in C++, have Maya, and want to help make this plug-in better, we can always use more people working on the project. Just let us know you're interested on the NifTools forum.


Last name
First name
Address
City
State
Zip/Postal Code
Country
Bulgaria
Other European country
Non-European country
Phone(country code, area code, number)
(+
)
E-mail
Birth date
Gender
Male
Female
Other
Starting date
Spring 2015
Summer 2015
Comments/Questions


Montana Bicycle Racing Association
2004 Annual Meeting
Minutes
Club/Rep
Attending:
Flathead/ Steve Muller
NRO/ Michael Longmire
Stampede-5VV/ John Weyhrich,
Great Divide/ Byron Deford
MSU/
John Lackey
UM/
none
Hammer Gel/ none
GVCC
/ none
YVCC/
none
Others: Steve Dolberg, Tim Bechtold, Kathleen Jones, Margie
Miller, Phil Hess, Marcel Van Garderen, Tejay Van Garderen, Ernst Visscher,
Alex Gallego
1.
1.
President John Weyhrich called meeting to order at
2.
2.
Weyhrich presented awards for the 2004 road and cross seasons.
3.
3.
Election of officers. The following officers were nominated and elected
by acclamation:
President John
Weyhrich
VP
Byron Deford
CFO
Steve Dolberg
Sec
Scott Herzig
Asst Sec
Tim Bechtold
4.
4.
Financial Report
Current balance is $4374.00
Income for the year was $8298:
$2552 from Subaru
$2076 from racer-days
$481 from raffle tickets
$1523 from MBRA membership numbers
$128 from number rentals
$1390 from USAC license kickbacks
$150 form E-caps
Expenses were $4918:
$2090 prize money
$741 other prizes, jerseys, plaques
$2070 admin, numbers
$315 officials’ manuals
$130 office supplies
5.
5.
Non-profit status. Tim Bechtold will apply for 501(c)(3) status with IRS
in January.
6.
6.
Discussion of road schedule: whether better to have compact season
ending in June or to spread season out to August. Whether to compete directly
with regional stage races. No resolution.
7.
7.
Junior development: Resolved: For all races in
8.
8.
Officiating: Resolved: MBRA will pay for one official’s license for each
member club and for training seminars for one official from each member club.
Each club must provide an official for one road and one cross race.
9.
9.
Purchase of an officials’ kit. Resolved: Don Russell shall prepare an
itemized list of equipment to be purchased for an MBRA officials’ kit, expense
not to exceed $500. Don shall make this list available via the montanacycling
listserv for comments, and then MBRA board will approve expenditure prior to
10.
10.
Upgrades: The crux of the discussion involved the upgrade from cat 4 to
cat 3, because it is difficult to accumulate enough points in
11.
11.
MBRA racer-day fee. MBRA will continue to assess $1 per racer per day in
2005.
12.
12.
Master’s classes. Ecology Center Classic will allow Master A and Master
B to be self-selecting with no age or cat restrictions in 2005. MBRA will also
have self-selecting Master A and Master B and Master C classes in 2005 with no
age or cat restrictions. MBRA will provide helpful suggestions to help racers
select their class: In general, if you are under 40, you should race A. If you
are under 50, you should race B, but if you’re good, race A anyway. If you are
over 50, you can race C, but race B or A if you’re competitive with the young
ones in those classes.
13.
13.
Women’s classes. Resolved: MBRA recommends that all women in a race
start together. Race promoters have the flexibility to make adjustments as
circumstances may dictate. In 2005, MBRA classes for women will be W1,2,3 and
W3,4 and Women Masters (for 35+).
14.
14.
Should all bike racing in
15.
15.
Subaru sponsorship of road series. Club reps wanted more timely updates
of the series standings. Everyone very happy with Subaru. John Weyhrich will
contact Subaru with thanks and testimonials and seek to extend sponsorship.
16.
16.
2005 Road schedule. Club reps converged on calendar seeking to pre-empt
dates for club races in 2005. John Weyhrich will post a tentative 2005 road
schedule to the montanacycling listserv by Dec 15 for comments. MBRA board will
adopt 2005 road schedule by Feb.1. 2005.
17.
17.
Adjourned 3:50 pm.
Respectfully submitted,
Timothy Bechtold
Rossbach Hart Bechtold, PC
401 N.
406-543-5156
406-728-8878 fax


Singapore Biennale opens today, here are our picks for what to see
by Coconuts SingaporeThe Singapore Biennale arts festival opens this weekend with more than 150 works to check out including films, installations, and performances.
For its sixth outing, this year’s festival features 70 artists and art collectives hailing from 36 countries and territories, including Indonesia, Thailand, and the Philippines — a full list of which you can find here.
The festival, which runs today through March 22, is organized by the Singapore Art Museum and commissioned by the National Arts Council. Events take place at 11 venues and tickets for all are on sale at SISTIC ticketing service counters.
Here are some of the coolest things to check out, including collateral projects held in conjunction with the Singapore Biennale.
The Lesson: A Workshop
Singaporean theatre company Drama Box wants to teach you how to be a politically engaged citizen through its participatory theatre performance in which audience members explore Singapore’s land issues and democratic processes. This work aims to provoke a deeper understanding of the city-state’s culture, history, and identity.
Nov. 29, Dec. 6, Mar. 13, Mar. 20
7pm-9:15pm
National Gallery Singapore
Lorongs of Wisdom
Tour Singapore’s Geylang red-light district on a walking tour with organizer Geylang Adventures, presenting an alternative interpretation of the neighborhood as well as the changes the area has experienced over the years.
Nov. 16 to Mar 21.
7pm-10pm
HealthServe
1 Lorong 23 Geylang
Takashi Makino
Experimental filmmaker Takashi Makino is said to be one of Japan’s most influential moving-image artists. Get a glimpse of his work at the screening of his one-hour film Memento Stella at The Projector movie theatre.
Takashi will also be in town for a separate sound and art installation called Inconsolable Ghost, complete with a live performance by Dutch artist Gideon Kiers (computer, electronics) and Berlin-based British artist Hilary Jeffery (trombone, electronics).
Dec. 12 (Inconsolable Ghost); Dec. 13 (Memento Stella)
The Projector
Suddenly Turning Visible: Art and Architecture in Southeast Asia (1969–1989)
Explore abstract works taken from Southeast Asian art institutions including Bangkok’s Bhirasri Institute of Modern Art and Singapore’s Alpha Gallery that touch on the theme of rapid urban development.
Nov. 19 – Mar. 15
National Gallery Singapore
Stealing Public Space
Explore the many ways public spaces can be used to engage and empower people on collective, social issues through historical and newly-commissioned works, several of which invites audience participation. Curated by Singapore art historian Lola Lenzi, the exhibition features works from regional artists including Indonesia Restu Ratnaningtyas and Thailand’s Sutee Kunavichayanont.
Jan 11 – Feb 23
Mon to Fri; 9am – 6pm
The Substation
Beuys
Joseph Beuys was a German multidisciplinary artist. He was performer, painter, sculptor, medallist, installation artist, graphic artist, and art theorist. Thirty years after his death, Beuys continues to inspire and influence many.
Get a close view of, and personal insights into, Beuys himself through archival footage of the artist’s most intimate and personal ramblings on art, activism and the mysticism of the creative world, post-World War II.
Jan. 11 and Jan. 19.
The Projector.
Assemblage Workshop by Biennale Artist, Khairullah Rahim
Get creative in a hands-on assemblage workshop led by Singaporean artist Khairullah Rahim. Enjoy the interactive session while learning more about his approach to working with objects as material and about the ideas behind them.
Jan 18.
4pm-6pm.
Gillman Barracks.
From the Coromandel Coast to the Straits: Revisiting Our Tamil Heritage – Indian Heritage Centre
This exhibition highlights the history, culture, and contributions of 19th century Tamils in Singapore. Works responding to topics by three contemporary artists – Lavanya Mani, Kumari Nahappan and Anurendra Jegadeva – will be showcased, in the form of textiles, paintings, sculptures, and more.
Nov. 23 – June 30
Indian Heritage Center
More on Singapore’s art scene at Coconuts.co/Singapore/lifestyle .


The ui features category defines the UI configuration used by the environment application (e.g. Welcome) and all applications on the execOnStartup list in the ui category. On systems with no environment application, this category defines the UI configuration for all applications.
Related categories, uiFeatures - intro , uiFeatures - beginner , and uiFeatures - advanced , support the same keys. Each of these categories defines the configuration for a specific "room" of the Welcome application. Other environment applications will also use these keys for different "rooms."
backupDir = <relative path>
This key defines the directory in which the document control object will place quick-backup copies of document files. The default is PRIVDATA\BACKUP.
backupDir = DOCUMENT\BACKUP
defaultLauncher = <relative path>
This key defines the directory and application that acts as the default application launcher. This key should always have some application specified; otherwise, no application will start when GEOS loads. The path specified should be relative to the WORLD directory.
defaultLauncher = Utilities\GeoManager
docControlFSLevel = <number>
This key specifies the document control's file selector user level. The file selector box has three different configurations; set the appropriate number (below) to determine which configuration is used.
0 No directories 1 Directories shown, simple UI configuration 2,3 Directories shown, complete UI configuration
An example of setting the file selector level is shown below.
docControlFSLevel = 2
docControlOptions = <number>
This key turns on or off a number of other features in the document control object. The features are controlled by the bits set or clear in the number given. The five most significant bits of a 16-bit integer are used and have the following meanings, listed from most significant bit:
expressOptions = <number>
This key defines the configuration of the express menu. It sets and clears features based on the least significant 11 bits of a 16-bit number. Each bit, from the most significant used (bit 10) down to the least significant, is detailed below.
0 No express menu 1 In the top of the Primary window 2 In the lower left (just below the bottom of the screen)
Some examples of this key are shown below.
expressOptions = 617 ; Introductory ; 617 = 0x0269 = 0000 0010 0110 1001 ; The bits turned on are listed below: ; UIEO_DESK_ACCESSORY_LIST ; UIEO_CONTROL_PANEL ; UIEO_DOS_TASKS_LIST ; UIEO_EXIT_TO_DOS ; UIEO_POSITION = 1, upper left of window expressOptions = 889 ; Beginner ; 889 = 0x0379 = 0000 0011 0111 1001 expressOptions = 2041 ; Advanced ; 2041 = 0x07F9 = 0000 0111 1111 1001
helpOptions = <number>
This key defines the configuration used by the help controller object. Specifically, it determines whether the help controller will automatically provide help triggers in the GenPrimary and in dialog boxes. The default is to allow help triggers to be created and displayed. Only the least significant bit of a 16-bit number is used, and that bit's significance is shown below.
helpOptions = 1 ; hide help triggers helpOptions = 0 ; display help triggers
interfaceLevel = <number>
This key determines the interface level of applications that use the ui features category for their configurations. The four values allowed are shown in the examples below.
interfaceLevel = 0 ; Introductory interfaceLevel = 1 ; Beginner interfaceLevel = 2 ; Intermediate interfaceLevel = 3 ; Advanced
interfaceOptions = <number>
This key determines two different features of the UI in general. It uses the two most significant bits of a 16-bit integer; the two bits have the following meanings.
interfaceOptions = 16384 ; No Options menu interfactOptions = 32768 ; Popouts not allowed
launchLevel = <number>
This key controls the interface level of the applications allowed to be launched under the particular field ("room" of the environment application). It allows four values as shown in the examples below.
launchLevel = 0 ; Introductory launchLevel = 1 ; Beginner launchLevel = 2 ; Intermediate launchLevel = 3 ; Advanced
launchModel = <number>
This key controls how applications are started and exited. It allows four values, each of which defines a different level of user.
launchModel = 0 ; Transparent (user does not ; realize he is starting an ; application launchModel = 1 ; Single instance only launchModel = 2 ; Multiple instances allowed launchModel = 3 ; Advanced features allowed
launchOptions = <number>
This key controls how applications are started and exited; specifically, it has a single flag which determines whether any applications are allowed to be in desk accessory mode. This defaults to true to allow desk accessories. The single flag is the most significant bit of a 16-bit integer.
launchOptions = 32768 ; allow desk accessories launchOptions = 0 ; do not allow them
quitOnClose = <Boolean>
If true, this key forces the closure of all applications in a room before that room may be exited. This will cause state saving to be turned off. The default for this flag is false. One note: setting quitOnClose = true and launchModel = 0 can result in undesirable behavior.
quitOnClose = true quitOnClose = false
windowOptions = <number>
This key controls different window system options. The precise interpretation of each flag is up to the specific UI. The high 8 bits form a mask of the bits to affect. The low 8 bits indicated whether the masked bits should be turned on or off. Of the eight bits, the high one is meaningless; the seven flags are listed below. You should not set these, however, unless you are familiar with the workings of the UI and the specific UI.


Want to make better, informed decisions for your management?Analyze the value of a product? Predict future revenues? Conduct analysis on what customer segments convert the best? You know who to call.
If you want to get really advanced, and want to implement natural language processing or computer vision or any form of machine learning to your business processes, I can make a difference.
Need a better system for your CRM or your company data? I know a thing or two about query languages and database implementation.
Financial and accounting information can be overwhelming. Save yourself the many headaches and hand the tough stuff over to me.
Design must be functional and functionality must be translated into visual aesthetics
Read MoreDesign must be functional and functionality must be translated into visual aesthetics
Read MoreDesign must be functional and functionality must be translated into visual aesthetics
Read MoreDesign must be functional and functionality must be translated into visual aesthetics
Read MoreAny concerns?
Any doubts?
Any questions?
None of the above?


TC/2012/00001 Terry Example vs HMRC
Pay via cheque
Send your cheque clearly marked with your reference number TC/2012/00001 on the back to:
Tax Tribunal Fees1 Test Road
Testerham
TE37 1NG
Send your cheque clearly marked with your reference number TC/2012/00001 on the back to:
Tax Tribunal Fees


I am a Juniur developer who enjoys working in front-end development. I’m naturally inquisitive and enjoy figuring out how things work, and ready to create beautiful web pages!
- Responsive Websites
- Front-end Development
- HTML
- CSS
- JavaScript
- jQuery
Front End Development is building out the visual components of a website. Using HTML, CSS , and Javascript, I build fast, interactive websites.
Responsive landing page for a crowd-sourcing website. Beautiful, professional, animated web page that draws users' eyes to important information and creates an engaging user experience.(Bootstrap Javascript)
Working website Close ProjectThis is my own project to my friend's father, Brand New website to his company. (Bootstrap Javascript)
This is my Javascript Pratice the Piggame, learning how to use the Math.floor/random basic eventlistener,functions and some game logic..(Javascript)
Colmar Academy, Designing and creating the landing page for a new school. Making informed design decisions about color and typography (HTML And CSS)
This is a music search app using the MusicGraph API. Part of the Codeacademy "Build Websites from Scratch" course build a section of HTML and CSS using Bootstrap to efficiently structure the layout. Then, use JavaScript and jQuery to add functionality to that section.(Javascript)
Card-matching game using Bootstrap, JavaScript, and jQuery.


A sample single page application developed with Angular 2 and Bootstrap 4.
Code snippets/files are at https://gist.github.com/SirajGadhia
Resent update: Angular 2, Type Script, SASS, .Net 5, MVC 6 and VS 2015.
A sample single page application (SPA) developed with AngularJS 1.4.5 and Bootstrap 3.3.5.
Download of full application is available at GIT hub at ... Github.com/SirajGadhia/FD360-V2-AngularJS.


1 airlifted to hospital after Florida alligator attack
WEST PALM BEACH, Fla. (AP) - A person was airlifted to a hospital after an alligator attack near a wildlife reserve in Florida.
According to 12 News , Martin County Fire Rescue said they found the person in DuPuis Management Area on Saturday morning, a reserve bridging southwestern Martin County and northwestern Palm Beach County.
At first, rescuers weren’t been able to locate the victim after the initial call of an alligator attack came in. The person was taken to a hospital for treatment.
The condition of the person was not immediately known.
It is unclear why the person was in the reserve, but the area is known for recreational activities like hunting, camping, hiking and fishing.
Information from: WPEC-TV, http://www.wpecnews12.com/
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


This is a portfolio composed of all of the projects I have either completed or am working to complete.


The defining feature of the Sazerac is its method of preparation, which commonly involves two chilled old-fashioned glasses. The first glass is swirled with a wash of absinthe for its flavor and strong scent.The second glass is used to combine the remaining ingredients, which are stirred with ice, then strained into the first glass.
The Latin name artemisia comes from Artemis, the ancient Greek goddess of the hunt. Absinthe is derived from the Latin absinthium, which in turn comes from the ancient Greek ἀψίνθιον apsínthion, "wormwood".The use of Artemisia absinthium in a drink is attested in Lucretius' De Rerum Natura (I 936–950), where Lucretius indicates that a drink containing wormwood is given as medicine to children in a cup with honey on the brim to make it drinkable.
New Orleans has a profound cultural association with absinthe, and is credited as the birthplace of the Sazerac, perhaps the earliest absinthe cocktail. The Old Absinthe House bar, located on Bourbon Street, sold absinthe since the first half of the 19th century. Its Catalan lease-holder, Cayetano Ferrer, named it the Absinthe Room in 1874 because of the popularity of the drink, which was served in the Parisian style.The building was frequented by many famous people, including Mark Twain, Oscar Wilde, Franklin Roosevelt, Aleister Crowley and Frank Sinatra.


--- title: forecasting_practices keywords: fastai sidebar: home_sidebar summary: "API details." description: "API details." nb_path: "00_core.ipynb" ---
We can say hello to anyone at all but lets start with Sundaresan!
say_hello("Sundar")
test_eq(say_hello("Jeremy"),"Hello Jeremy!")
ls docs


Radio button
another radio button but checked
disabled radio button
A checkbox
Another checkbox but checked
Disabled checkbox
option one
option two
option three
option four
option one
option two
option three
option four


Library Hours
IAR Library
The following are the operational hours for the IAR Library and Bookstore.
| Day | Time |
| Monday | Open between Maghrib and Isha prayers Open for half an hour after Isha prayers |
| Tuesday | Open between Maghrib and Isha prayers Open for half an hour after Isha prayers |
| Wednesday | Open between Maghrib and Isha prayers Open for half an hour after Isha prayers |
| Thursday | Open between Maghrib and Isha prayers Open for half an hour after Isha prayers |
| Friday | 11:30 am - 4:30 pm Reserved for Sisters only between Maghrib and Isha prayers Open for half an hour after Isha prayers |
| Saturday | Open for half an hour after Isha prayers |
| Monday | 10:00 am - 2:30 pm Open for half an hour after Isha prayers |
The daily Maghrib and Isha prayer times are listed on our website.


The CSS Padding properties are used to generate space around content. The padding clears an area around the content (inside the border) of an element. With CSS, you have full control over the padding. There are CSS properties for setting the padding for each side of an element. (top, right, bottom and left).


--- layout: post title: '30 Days in April: Day 2' date: 2009-04-02 19:33:11.000000000 -07:00 type: post published: true status: publish categories: - 30 Days in April tags: - 30 days - flash fiction - flickr - photo - stories meta: _publicize_pending: '1' _edit_last: '6192' aktt_tweeted: '1' original_post_id: '87' _wp_old_slug: '87' author: login: falsefridays email<EMAIL_ADDRESS>display_name: Jim Withington first_name: '' last_name: '' ---
The fountain cascaded with promise. She focused her attention on the water, only glancing at him long enough to say, "It's all too much."
And then she was gone.


What’s coming up?
| When | What | Who |
|---|---|---|
| 2017/06/29 – | Pro LaTeX tips – | Marco |
| 2017/07/13 – | Inkscape – | Richard |
| 2017/07/27 – | – | We need a volunteer! |
Who did what and when?
| When | What | Who |
|---|---|---|
| 2017/06/15 – | Data Wrangling in R – | Jack Hatfield |
| 2017/06/01 – | R notebooks – | Natalie Cooper seminar speaker |
| 2017/05/18 – | Markdown – | Thomas Guillerme |
| 2017/05/04 – | Grace – | Alberto Pascual Garcia |
| 2017/04/20 – | GIS pipelines – | Jack Hatfield |
| 2017/03/30 – | Open Tree of Life – | Dimitris Kontopoulos |
| 2017/03/16 – | Jupyter Notebooks – | Samraat Pawar |


---
layout: post
title: ''
date: '2008-12-05T00:19:34-08:00'
tags:
tumblr_url: http://alexhwilliams.tumblr.com/post/63159430/portland-code-trips-episode-11-the-magic-blogger
---
Portland Code Trips
Episode 11
The magic blogger bus rolls again! Come see the magic blogger bus at Cyborg Camp.
Art trip on the bus, following the conference.


First post topic (Posted by SC)
1. Create a functional (working) interface. 2. Implement all agreed upon use cases. 3. Create one or multiple HTML pages. 4. Add styling with CSS. 5. Add interactivity with JavaScript. 6. Simulate interaction with the server (hard code JSON responses). 7. The interface should be minimal because you only have a week.
Posted by: Adam
Once you are done, submit the following: 1. A link to a live version of the project for the this module. 2. A link to the GitHub repository of the project for the this module. 3. Any concerns you have about the project at this
Posted by: darnita
Original Posted by - Pete: Once you are done, submit the following: 1. A link to a live version of the project for the this module. 2. A link to the GitHub repository of the project for the this module. 3. Any concerns you have about the project at this
4. Note that you should include a brief summary of your contributions under Communication and Research. Make sure none of the parts of your submission change and keep working. For example, you may want to create a separate branch in GitHub and have a different URL in your jail for each module


wx_tests v0.1.0 ElixirToHtml
Link to this section Summary
Functions
Vgiven a token and a colour, return the necessary HTML
Iterate over the list of tokens returned by lex, turning them into HTML
Encode the HTML entities so that the dont screw up the HTML representation
Colourise the contents of the input file, checking that the input file is OK
Given the input file from the command line, normalize it, and generate an html file name for the output
Interface to leex
Colourize the given file, returning an HTML string
Link to this section Functions
Vgiven a token and a colour, return the necessary HTML
Iterate over the list of tokens returned by lex, turning them into HTML
Encode the HTML entities so that the dont screw up the HTML representation.
Colourise the contents of the input file, checking that the input file is OK.
Given the input file from the command line, normalize it, and generate an html file name for the output.
Interface to leex
Colourize the given file, returning an HTML string


|
iota.lib.cpp
IOTA C++ Library
|
#include <core.hpp>
Public Member Functions | |
| Core (const std::string &host, const uint16_t &port, bool localPow=true, int timeout=60) | |
| virtual | ~Core ()=default |
| Responses::GetNodeInfo | getNodeInfo () const |
| Responses::GetNeighbors | getNeighbors () const |
| Responses::AddNeighbors | addNeighbors (const std::vector< std::string > &uris) const |
| Responses::RemoveNeighbors | removeNeighbors (const std::vector< std::string > &uris) const |
| Responses::GetTips | getTips () const |
| Responses::FindTransactions | findTransactions (const std::vector< Models::Address > &addresses, const std::vector< Models::Tag > &tags, const std::vector< Types::Trytes > &approvees, const std::vector< Types::Trytes > &bundles) const |
| Responses::GetTrytes | getTrytes (const std::vector< Types::Trytes > &hashes) const |
| Responses::GetInclusionStates | getInclusionStates (const std::vector< Types::Trytes > &transactions, const std::vector< Types::Trytes > &tips) const |
| Responses::GetBalances | getBalances (const std::vector< Models::Address > &addresses, const int &threshold=100, const std::vector< Types::Trytes > &tips={}) const |
| Responses::GetTransactionsToApprove | getTransactionsToApprove (const int &depth, const Types::Trytes &reference="") const |
| Responses::AttachToTangle | attachToTangle (const Types::Trytes &trunkTransaction, const Types::Trytes &branchTransaction, const int &minWeightMagnitude, const std::vector< Types::Trytes > &trytes) const |
| Responses::Base | interruptAttachingToTangle () const |
| Responses::Base | broadcastTransactions (const std::vector< Types::Trytes > &trytes) const |
| Responses::Base | storeTransactions (const std::vector< Types::Trytes > &trytes) const |
| Responses::WereAddressesSpentFrom | wereAddressesSpentFrom (const std::vector< Models::Address > &addresses) const |
| Responses::CheckConsistency | checkConsistency (const std::vector< Types::Trytes > &tails) const |
Strict implementation of IOTA core API commands.
|
explicit |
Full init ctor.
| host | The host of the node to connect to. |
| port | The port of the node to connect to. |
| localPow | Whether to do local or remote proof of work. |
| timeout | Timeout for the requests. |
|
virtualdefault |
Default dtor.
| Responses::AddNeighbors IOTA::API::Core::addNeighbors | ( | const std::vector< std::string > & | uris | ) | const |
Add a list of neighbors to your node. It should be noted that this is only temporary, and the added neighbors will be removed from your set of neighbors after you relaunch IRI.
https://iota.readme.io/reference#addneighors
| uris | List of URI elements. |
| Responses::AttachToTangle IOTA::API::Core::attachToTangle | ( | const Types::Trytes & | trunkTransaction, |
| const Types::Trytes & | branchTransaction, | ||
| const int & | minWeightMagnitude, | ||
| const std::vector< Types::Trytes > & | trytes | ||
| ) | const |
Attaches the specified transactions (trytes) to the Tangle by doing Proof of Work. You need to supply branchTransaction as well as trunkTransaction (basically the tips which you're going to validate and reference with this transaction) - both of which you'll get through the getTransactionsToApprove API call. The returned value is a different set of tryte values which you can input into broadcastTransactions and storeTransactions. The returned tryte value, the last 243 trytes basically consist of the: trunkTransaction + branchTransaction + nonce. These are valid trytes which are then accepted by the network.
https://iota.readme.io/reference#attachtotangle
| trunkTransaction | Trunk transaction to approve. |
| branchTransaction | Branch transaction to approve. |
| minWeightMagnitude | Proof of Work intensity. Minimum value is 18. |
| trytes | List of trytes (raw transaction data) to attach to the tangle. |
| Responses::Base IOTA::API::Core::broadcastTransactions | ( | const std::vector< Types::Trytes > & | trytes | ) | const |
Broadcast a list of transactions to all neighbors. The input trytes for this call are provided by attachToTangle.
https://iota.readme.io/reference#broadcasttransactions
| trytes | List of raw data of transactions to be rebroadcast. |
| Responses::FindTransactions IOTA::API::Core::findTransactions | ( | const std::vector< Models::Address > & | addresses, |
| const std::vector< Models::Tag > & | tags, | ||
| const std::vector< Types::Trytes > & | approvees, | ||
| const std::vector< Types::Trytes > & | bundles | ||
| ) | const |
Find the transactions which match the specified input and return. All input values are lists, for which a list of return values (transaction hashes), in the same order, is returned for all individual elements. The input fields can either be bundles, addresses, tags or approvees. Using multiple of these input fields returns the intersection of the values.
https://iota.readme.io/reference#findtransactions
| addresses | List of addresses. |
| tags | List of transaction tags. |
| approvees | List of approvees of a transaction. |
| bundles | List of bundle hashes. The hashes need to be extended to 81chars by padding the hash with 9's. |
| Responses::GetBalances IOTA::API::Core::getBalances | ( | const std::vector< Models::Address > & | addresses, |
| const int & | threshold = 100 , |
||
| const std::vector< Types::Trytes > & | tips = {} |
||
| ) | const |
Similar to getInclusionStates. It returns the confirmed balance which a list of addresses have at the latest confirmed milestone. In addition to the balances, it also returns the milestone as well as the index with which the confirmed balance was determined. The balances is returned as a list in the same order as the addresses were provided as input.
https://iota.readme.io/reference#getbalances
| addresses | List of addresses you want to get the confirmed balance from. |
| threshold | Confirmation threshold, should be set to 100. |
| tips | List of hashes, if present calculate the balance of addresses from the PoV of these transactions, can be used to chain bundles. |
| Responses::GetInclusionStates IOTA::API::Core::getInclusionStates | ( | const std::vector< Types::Trytes > & | transactions, |
| const std::vector< Types::Trytes > & | tips | ||
| ) | const |
Get the inclusion states of a set of transactions. This is for determining if a transaction was accepted and confirmed by the network or not. You can search for multiple tips (and thus, milestones) to get past inclusion states of transactions. This API call simply returns a list of boolean values in the same order as the transaction list you submitted, thus you get a true/false whether a transaction is confirmed or not.
https://iota.readme.io/reference#getinclusionstates
| transactions | List of transactions you want to get the inclusion state for. |
| tips | List of tips (including milestones) you want to search for the inclusion state. |
| Responses::GetNeighbors IOTA::API::Core::getNeighbors | ( | ) | const |
Returns the set of neighbors you are connected with, as well as their activity count. The activity counter is reset after restarting IRI.
https://iota.readme.io/reference#getneighborsactivity
| Responses::GetNodeInfo IOTA::API::Core::getNodeInfo | ( | ) | const |
Returns information about your node.
https://iota.readme.io/reference#getnodeinfo
| Responses::GetTips IOTA::API::Core::getTips | ( | ) | const |
| Responses::GetTransactionsToApprove IOTA::API::Core::getTransactionsToApprove | ( | const int & | depth, |
| const Types::Trytes & | reference = "" |
||
| ) | const |
Tip selection which returns trunkTransaction and branchTransaction. The input value is depth, which basically determines how many bundles to go back to for finding the transactions to approve. The higher your depth value, the more "babysitting" you do for the network (as you have to confirm more transactions).
https://iota.readme.io/reference#getbalances
| depth | Number of bundles to go back to determine the transactions for approval. |
| reference | Hash of transaction to start random-walk from, used to make sure the tips returned reference a given transaction in their past. |
| Responses::GetTrytes IOTA::API::Core::getTrytes | ( | const std::vector< Types::Trytes > & | hashes | ) | const |
Returns the raw transaction data (trytes) of a specific transaction. These trytes can then be easily converted into the actual transaction object. See utility functions for more details.
https://iota.readme.io/reference#gettrytes
| hashes | List of transaction hashes of which you want to get trytes from. |
| Responses::Base IOTA::API::Core::interruptAttachingToTangle | ( | ) | const |
Interrupts and completely aborts the attachToTangle process.
https://iota.readme.io/reference#interruptattachingtotangle
| Responses::RemoveNeighbors IOTA::API::Core::removeNeighbors | ( | const std::vector< std::string > & | uris | ) | const |
Removes a list of neighbors to your node. This is only temporary, and if you have your neighbors added via the command line, they will be retained after you restart your node.
https://iota.readme.io/reference#removeneighors
| uris | List of URI elements. |
| Responses::Base IOTA::API::Core::storeTransactions | ( | const std::vector< Types::Trytes > & | trytes | ) | const |
Store transactions into the local storage. The trytes to be used for this call are returned by attachToTangle.
https://iota.readme.io/reference#storetransactions
| trytes | List of raw data of transactions to be rebroadcast. |
| Responses::WereAddressesSpentFrom IOTA::API::Core::wereAddressesSpentFrom | ( | const std::vector< Models::Address > & | addresses | ) | const |
Check if a list of addresses was ever spent from, in the current epoch, or in previous epochs.
https://iota.readme.io/reference#wereaddressesspentfrom
| addresses | List of addresses you want to check if they were spent from. |


Introduction
GVedit is a Graphviz tool for creating, viewing, editing and processing DOT files. It allows users to set attributes of graphs with dialogue boxes and save them for future use. GVedit users can also take advantage of the simple instant previewing feature of the program.
Menu system
GVedit's main menu bar provides basic file options such as Open, Save, Save As and simple editing operations such as Cut, Copy and Paste. Most of the common commands also have standard keyboard shortcuts. Below you will find a list of the menu items and brief information on each of them.
File:
New: Creates a blank text window. You can use it to write a description of a graph in the DOT language. New graphs are not saved to disk until you save them manually.
Open: Opens a file dialogue box to select and load a DOT file into the editor. Each file is opened in a new window and does not affect other open graphs.
Save: Saves the active graph to disk. If the active graph is new and does not have a name, it opens a Save As dialogue to allow you to specify the file's name before saving.
Save as: Opens a Save As dialogue to save the active graph. You can save a graph under different names but you will always be working with the most recently saved graph.
Close: Closes the active graph window. If there are any unsaved changes, you get a dialogue box asking if you want to save the changes before closing the graph.
Edit:
Undo : This command rolls back the last thing that you have done within the active graph.
Cut : Removes selected text and keeps it in the clipboard.
Copy: Copies selected text to the clipboard.
Paste: Inserts the text from the clipboard into the cursor position on the active graph.
Find: Opens the find dialogue box to allow you to locate desired text in a graph.
Graphviz
Run: Processes the active graph with the last attributes that were used for it. If the active graph has never been processed before, it opens the settings window.
Settings: Opens the settings window. Details of this window are given below.
View
Cascade: Sets the style for handling multiple windows to cascade, in which each new window overlaps the previous one.
Tile: Sets the style for handling multiple windows to tiling, in which the open graph windows partition the root window.
Help
Help: Opens a manual page describing how to use this program.
Graphviz on net: Opens a browser window on the Graphviz home page.
About GVedit: Provides version information about the program.
Tool bar
Under the menu bar, there is a toolbar with five buttons on it.  Each button has a tool tip attached to it to indicate its purpose.
Working with multiple graphs; the active graph.
GVedit allows you to have multiple graphs open at the same time. At any time, there is a single active graph. Anything you do using either the GVedit menus or the settings window affects the active graph. When you go to the settings window, you always see the settings of active graph. The settings of each graph are maintained separately.
To make a graph active, click on its window. The background of the active graph window is white while all others are gray.
Settings window
With the settings window, you can select the layout engine, set the output type and file, and set any attributes that are available with the Graphviz release installed on your computer.
Layout engine: Graphviz provides five different graph layouts. You can select the one which best fits your needs. More information about these layouts can be found at the Graphviz home page
Output file name: This field allows you to specify the output file name. You can either type in the name, or use the small button by the text box to open a file dialogue box. This field corresponds to the –o option of Graphviz.
Output file type: This drop down list allows you to select the output file type. The output file name's extension is changed accordingly. This field corresponds to the –T option of Graphviz.
Graphviz bin folder:You usually do not need to enter anything here. During the Graphviz installation, locations of the Graphviz files are stored in the registry and GVedit retrieves it from there. If, for some reason, Graphviz files are not where they are supposed to be and GVedit can not find them, you can edit this information manually.
Preview Output file: If this box is checked, GVedit creates a low-quality preview of the output and shows it in a separate window. It is a convenient way to preview the results without executing another viewing program.
Apply cairo filter: If this output format is supported by the cairo library, this box becomes active. If checked, output will be generated using the cairo library rather than the default renderer.
Attributes: On the lower half of the settings window, you will see two dropdown lists, one small text box, and a larger text editing area. GVedit processes the contents of the large box as additional, generic graph, node or edge attributes. (These correspond to the –G, –N, and –E command-line options of Graphviz.) You can either type directly in the large text box, or use the drop down lists to pick an allowed scope and one of the common attribute names. For details of these attributes, refer to the page of Graphviz attributes.
If you specify an attribute using the drop down lists, you need to click on the Add button to register the attribute. If you do not click on Add button, the attribute that you entered will not be added to the large box, hence will not be processed.
As an example, assume that we would like to have a graph drawn with a green background. First, click on the scope list and select graph; then click on the name list and select bgcolor; and then type green to the value box. Finally, click on the Add button to send the attribute to large box.
Belowe the Add button is a Help button. Clicking on this will open a browser window on the Graphviz page describing the supported attributes.
Under the large box, there are 3 small buttons, plus Cancel and OK buttons. The first button is used to clear the attributes box; the second one is used to load an existing text file into the attributes box; and the last one is used to save the attributes to a text file for later use. The Cancel button closes the window without processing anything; the OK button processes the active document file with the settings on the screen and closes the settings window. If you check the preview check box, you will see the preview of the graph layout on the screen.
Console window
At the bottom of the main window, there is a console window where you can see the results of your actions. This provides a trace of your layout actions, showing the Graphviz command corresponding to the active graph's settings. It also displays warnings from GVedit, as well as the output of the executed Graphviz programs. By right clicking on the console window, you will get a menu providing some additional functions, such as clearing or saving the console logs.


Change the subject of default Mobirise contact/subscribe forms. You can change this under "Menu > Site > Site Settings".


background-image: url(Frankenthaler_Helen_Mountains_and_Sea_1952_Mod2.jpg) class: center, middle .big.darkblue.whiteBack[Abstractions] --- #Definition — I .right[source
∗
: [merriam-webster](http://www.merriam-webster.com/dictionary/abstraction)] 1. a. the act or process of abstracting : the state of being abstracted b. an abstract idea or term 2. abstract quality or character 3. absence of mind or preoccupation 4. an abstract composition or creation in art
∗
reordered the points --- #Definition — I .right[source
∗
: [merriam-webster](http://www.merriam-webster.com/dictionary/abstraction)] 1. a. the act or process of abstracting : the state of being abstracted b. an abstract idea or term 2. abstract quality or character
3. absence of mind or preoccupation
4. an abstract composition or creation in art
∗
reordered the points --- # Abstraction in Computer Science Trying to put across what abstraction is leads to -- 1. A lot of hand-waving -- 2. Someone mentioning — Leaky-abstractions -- 3. Someone mentioning — Indirection -- 4. Generalization, Simplification, Not-Concrete -- 5. Confusion with Encapsulation, Abstract Classes, Inheritance -- 6. Ambiguity --- # Precise, Lawful or Sound Abstractions -- Who doesn't want to be precise? -- # Restrict ourselves to Algebraic Abstractions --- # Sum of a List of Integers -- ```scala scala> val s = List(1,2,3).sum ``` -- Spoilsport! -- ```scala scala> def sum(l : List[Int]) = l.reduce(_ + _) sum :: List[Int] => Int //oh really? Yes, this isn't scala. ``` -- Here, ```scala _ + _ ``` is just some syntactic sugar and is the same as -- ```scala (a,b) => a + b ``` which in turn is the same as -- ```scala (a:Int, b: Int) => a + b ``` --- # Only Ints? -- ```scala scala> sum(List(1,2,3)) res0: Int = 6 ``` -- ```scala scala> sum(List(1.0, 2.0, 3.0))
:9: error: type mismatch; found : Double(1.0) required: Int ``` -- This should be possible. -- In scala we could use a **Type class** .code[Numeric] to extend our reach -- ```scala scala> def sum[A: Numeric](l : List[A]) = l.reduce((a:A, b:A) => implicitly[Numeric[A]].plus(a,b)) ``` And that is what .code[List(1.0, 2.0, 3.0).sum] from the standard library does to cover numeric types. --- #Are we there yet? ```scala scala> sum(List(1.0, 2.0, 3.0)) res1: Double = 6.0 ``` -- Nice! So what about -- ```scala scala> sum(List("1", "2", "3")) ``` -- ```scala
:35: error: could not find implicit value for evidence parameter of type Numeric[String] sum(List("1", "2", "3")) ^ ``` **Type-error!** -- Wat? .code["1" + "2"] and even .code["1" + 2] is allowed! --- # Step Back -- ### Values ```scala 1, "1", 1.0, Cat("Siamese"), List(1), (x:Int) => x * 2, Map("€" -> 100) ``` -- ### Types ```scala Int, String, Double, Cat, List[Int], Function1[Int, Int], Map[String, Int] ``` -- ### Kinds ```sh *, *, *, *, * → *, * → * → *, * → * → * proper types (*) unary-type-constructor (* → *) binary-type-constructor (* → * → *) ``` For now shelve them. --- #Polymorphism -- ### Subtype Polymorphism (Subclasses) .small[![Subtype Polymorphism](525px-Inheritance.svg.png)] -- ### Parametric Polymorphism ```scala // head :: {∀ a in A} List[A] => A //neither scala nor haskell def head[A](xs: List[A]) : A = xs(0) ``` -- ### Ad-hoc Polymorphism (Type classes – Unlike classes you know off ) *Ad-hoc here is not a pejorative*. It is monkey-patching (what?) for the sane. -- Examples: .code[Numeric], .code[Ordering], .code[Equal], .code[Show], .code[Read] etc. --- # You lost us there — Mate! --- # Errr… where were we? -- ```scala scala> def sum[A: Numeric](l : List[A]) = l.reduce((a:A, b:A) => implicitly[Numeric[A]].plus(a,b)) scala> sum(List("1", "2", "3")) ``` -- ```scala
:35: error: could not find implicit value for evidence parameter of type Numeric[String] sum(List("1", "2", "3")) ^ ``` -- .code[Numeric] didn't bring us very far. We want to .big-code[abstract] over the .big-code[+], a binary operator/method/function for .underline[many types] not just types that are .code[Numeric] in nature. --- # Semigroup
*
– Algebra .lineheightBig[A Semigroup is an .underline[algebraic structure] consisting of a .big-code[set] together with an .big-code[associative binary operation].] -- In mathematics… and almost very precise. -- Because we are brave we jump ahead and *abstract* over many binary operators for many types (sets). -- #### Can we do better? --
*
We skipped .code[Magma] --- # Semigroup – Properties There exists some type .code[A] such that it has a binary operation .code[op] such that -- #### Totality (Closure) ```hs 1. op :: A → A → A ``` -- #### Associativity ```hs 2. op(op(a,b), c) ≡ op(a, op(b,c)) ``` -- Two and only two. -- .code[Magma] needs just one - Totality. -- Hence .code[Magma] is more abstract and more general i.e. it can be applied more universally than a .code[Semigroup]. -- The more specific an abstraction is, the more you can derive from it i.e. more can be done with that abstraction, but it becomes less universally applicable — win some; loose some. --- # Semigroup – Type class How do we capture this in Scala? -- ```scala trait Semigroup[A] { //semigroup for a type A * def op : A => A => A //requires a binary operation that's total } ``` Semigroup is an abstraction that we capture as a Type class. [.step[Step 1]] -- ### How do we put it to use? ```scala *scala> def sum[A: Semigroup](l : List[A]) = l.reduce((a:A, b:A) => * implicitly[Semigroup[A]].op(a)(b)) //note op(a)(b) (curry) instead of op(a,b) (tupled) ``` That is an example of a _Bounded Parametric Polymorphism_. We bind the type .code[A] to a certain bound - in this case the .code[Semigroup] [.step[Step 2]] --- # Making a Type a Semigroup -- ```scala implicit object StringSG extends Semigroup[String] { //only ever require this one def op = a => b => a + b //look! the promise of inference :) } ``` Henceforth, .code[String] has a .code[Semigroup]. That .big-code[implicit] keyword is very important. [.step[Step 3]] -- ```scala scala> sum(List("1","2","3")) res3: String = 123 ``` --- # Yes! -- ```scala scala> sum(List(1,2,3))
:11: error: could not find implicit value for evidence parameter ⤾ ⤿ of type Semigroup[Int] sum(List(1,2,3)) ^ ``` ### Oh S*☠⚒! -- ```scala implicit object IntSG extends Semigroup[Int] { def op = a => b => a + b } ``` -- ```scala scala> sum(List(1,2,3)) res6: Int = 6 ``` -- ### Phew! --- # Totality (Closure) -- ### That's a compiler's job: day in and day out -- ### It is better than any amount of tests we'd ever write. -- ### Meh! what if the compiler is wrong? Do we test our tests? -- ### Types are propositions!
1
and that also applies to partial languages
2
-- ### Parametricity or Reynold's abstraction theorem
3
--
1
[Propositions as Types](http://homepages.inf.ed.ac.uk/wadler/papers/propositions-as-types/propositions-as-types.pdf)
2
[Fast and Loose Reasoning is Morally Correct](http://www.cse.chalmers.se/~nad/publications/danielsson-et-al-popl2006.pdf)
3
[Theorems for free](http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf) --- # Associativity (x ⊹ y) ⊹ z ≡ x ⊹ (y ⊹ z) -- How do we prove this? First let us capture it. ```scala object SemigroupLaws { def associativity[A: Semigroup : Equal](a: A, b: A, c: A): Boolean = { val sg = implicitly[Semigroup[A]] val eq = implicitly[Equal[A]] * eq.eq(sg.op(sg.op(a)(b))(c), sg.op(a)(sg.op(b)(c))) } } ``` This is too much code. We can make it more compact but then we'll be lost in syntax. -- ```scala object SemigroupLaws { def associativity[A: Semigroup : Equal](a: A, b: A, c: A): Boolean = { * ((a |+| b) |+| c) === (a |+| (b |+| c)) } } ``` Yes, it is possible. Pretend you didn't see that. --- # Property Based Testing We use .code[scalacheck] to do the needful. -- ```scala import org.scalacheck._, Prop.forAll object SemigroupProps { def laws[A: Semigroup: Equal: Arbitrary] = new Properties("semigroup") { * property("associativity") = forAll(SemigroupLaws.associativity[A] _) } } ``` .big-code[A] needs to have .code[Semigroup], .code[Equal] and .code[Arbitrary] type classes defined. -- ```scala *scala> semigroup.laws[Int].check //runs 100 + semigroup.associativity: OK, passed 100 tests. scala> semigroup.laws[Int].check(_.withMinSuccessfulTests(1000000)) + semigroup.associativity: OK, passed 1000000 tests. ``` --- # Recap 1. A .code[type] can have a .code[Semigroup] defining an associative binary operation. 2. We can define a .code[sum] that can reduce a .sum[list] of values of that .code[type] to a single value. 3. We can very .underline[easily test] if a type posing as a .code[Semigroup] is a _lawful_ .code[Semigroup]. 4. .underline[Many many types] have a semigroup: .code[List] also has a .code[Semigroup] such that .code[sum( List( List(1,2,3), List(4,5,6) ) ) ≡ List(1,2,3,4,5,6)] --- # Revelation -- ```scala scala> sum( List(1,2,3,4,5) )( lift[Int](_ ∗ _) ) res2: Int = 120 ``` Cool! -- .code[Int] has two Semigroups. One under .code[+] and one under .code[∗]. *Consequence*: You need to specify which one you want. In _Scala_ this is easier than in _Haskell_. --- # Done? -- ```scala scala> sum(List()) java.lang.UnsupportedOperationException: empty.reduceLeft ``` -- # Piyush, you should have done TDD! Time for a 5 minute break! --- background-image: url(Frankenthaler_Helen_Mountains_and_Sea_1952_Mod2.jpg) background-image: url(John_Seery.jpg) # It is really break time! --- # Empty Lists -- What happens if the list is empty? ```scala def sum[A : Semigroup](l: List[A]) : A = l.reduce(_ |+| _) ``` -- Or, do you prefer? ```scala scala> def sum[A: Semigroup](l : List[A]) = l.reduce((a:A, b:A) => implicitly[Semigroup[A]].op(a)(b)) ``` -- We should be using a .code[fold] instead of .code[reduce]. But .code[fold] requires a start value also called the .code[zero] or .code[identity] --- # Monoid - I -- Monoids add the requirement of .code[identity] on top of a .big-code[Semigroup]. -- ```scala trait Monoid[A] extends Semigroup[A] { def identity : A } ``` -- # Identity element Not to be confused with the _Law of identity_, principle of logic stating that an object is the same as itself. .code[ There exists an element .big-code[e] in .big-code[S] such that for every element .big-code[a] in .big-code[S], the equations .big-code[e ⊹ a = a ⊹ e = a] hold. ] -- Example, .code[0 + 2 = 2 + 0 = 2] or .code[1 ∗ 2 = 2 ∗ 1 = 2] --- # Monoid - II ```scala trait Monoid[A] extends Semigroup[A] { * def identity : A def ∅ = identity } ``` -- ```scala def lift[A: Semigroup](a: A) : Monoid[A] = new Monoid[A] { def identity = a def op = Semigroup[A].op } implicit val strs = lift("") // and we have a string monoid! ``` --- # Monoid Laws ```scala object MonoidLaws { def associativity ... def leftIdentity[A: Monoid : Equal](a: A): Boolean = { (Monoid[A].∅ |+| a) === a } def rightIdentity[A: Monoid : Equal](a: A): Boolean = { (a |+| Monoid[A].∅ ) === a } } ``` -- ```scala object MonoidProps { def laws[A: Monoid: Equal: Arbitrary] = new Properties("monoid") { property("associativity") = forAll(MonoidLaws.associativity[A] _) property("left identity") = forAll(MonoidLaws.leftIdentity[A] _) property("right identity") = forAll(MonoidLaws.rightIdentity[A] _) } } ``` -- ```scala scala> MonoidProps.laws[Int].check + monoid.associativity: OK, passed 100 tests. + monoid.left identity: OK, passed 100 tests. + monoid.right identity: OK, passed 100 tests. ``` --- # Sum again -- ```scala def sum[A : Monoid](l: List[A]) : A = l.foldRight(Monoid[A].∅)(_ |+| _) ``` -- ```scala scala> sum(List[Int]()) res1: Int = 0 scala> sum(List[String]()) res2: String = "" ``` -- Mult? -- ```scala scala> sum(List[Int]())(Monoid.lift(1)(Semigroup.lift(_ * _))) res2: Int = 1 scala> sum(List[Int](1,2,3,4,5))(Monoid.lift(1)(Semigroup.lift(_ * _))) res3: Int = 120 scala> implicit val mult = Monoid.lift(1)(Semigroup.lift(_ * _)) mult: goto.Monoid[Int] = goto.Monoid$$anon$1@1d105bdb scala> sum(List[Int](1,2,3,4,5)) res5: Int = 120 ``` --- # Can we do any better? -- ```scala scala> sum(Array(1, 2, 3))
:21: error: type mismatch; found : Array[Int] required: List[?] sum(Array(1, 2, 3)) ``` How about a Tree instead of an Array? -- ```scala sealed trait Tree[A] case class Leaf[A](a: A) extends Tree[A] case class Fork[A](l: Tree[A], r: Tree[A]) extends Tree[A] ``` --- # Type constructors -- ## Unary type constructor #### .code[List[_]] is a special type and it's kind is ∗ → ∗ #### .code[List[Int]] is a proper type as it is complete and it's kind is ∗ -- ## Binary type constructor #### .code[Map[_,_]] is a special type and it's kind is ∗ → ∗ → ∗ #### .code[Map[String, Int]] is a proper type and it's kind is ∗ --- # Higher Kinded Types -- #### .code[Functor[F[_]]] is a higher order type and it's kind is: (∗ → ∗) → ∗ Those brackets aren't an afterthought. Difference between (∗ → ∗) → ∗ and ∗ → (∗ → ∗) -- #### .code[Functor[List[Int]]] is a proper type. -- We require one such higher kinded type to round off our .code[sum]. --- # .big-code[Foldable], a Higher Kinded Type and a Type class Abstracts over containers which can be “folded” into a summary value. -- ```scala trait Foldable[F[_]] { * def fold[A : Monoid](m: F[A]): A } ``` -- ```scala implicit val list : Foldable[List] = new Foldable[List] { override def fold[A: Monoid](m: List[A]) = m.fold(Monoid[A].∅)(_ |+| _) } implicit val tree : Foldable[Tree] = new Foldable[Tree] { override def fold[A: Monoid](m: Tree[A]) = m match { case Leaf(a) => a case Fork(l, r) => (fold(l) |+| fold(r)) } } ``` -- For trees we don't require the monoid identity — why not? --- # Sum now? -- ```scala def sum[F[_]: Foldable, A : Monoid](l: F[A]) : A = Foldable[F].fold(l) ``` -- ```scala scala> sum(Tree(1,2,3,4,5,6)) res9: Int = 21 ``` -- Does .code[Foldable] have laws? -- Yes, left fold should be consistent with right fold. We skip that for now .. but these laws are just as verifiable and need to be met for a .underline[legal] .code[Foldable]. --- # Is that it? -- ### No! What if we could sum(List('a','b','c')) == 294 -- ### .code[Foldable] exposes .code[foldMap] that maps value to another type and then folds. ```scala trait Foldable[F[_]] { * def foldMap[A, B : Monoid](m: F[A])(f: A => B): B def fold[A : Monoid](m: F[A]): A = foldMap(m)(x => x) } ``` -- ### Strictly more powerful than the fold we used before. -- ### And .code[Foldable] buys us .code[any], .code[all], .code[size], .code[intercalate], .code[splitWith], .code[minimum], .code[maximum] etc. for free. --- # Did you know that Maps are Monoids if the values are a Semigroup? -- ```scala implicit def MapMonoid[K, V: Semigroup] = lift( Map[K,V](), (m1: Map[K, V], m2: Map[K, V]) => { m1.foldLeft(m2){ case (to,(k,v)) => to.updated(k, to.get(k).map(Semigroup[V].op(_)(v)).getOrElse(v)) } }) ``` -- ```scala scala> val jan = Map("€" -> 100, "$" -> 900, "#" -> 300) scala> val feb = Map("€" -> 900, "#" -> 500) scala> sum(List(jan, feb)) res0: scala.collection.immutable.Map[String,Int] = Map(€ -> 1000, # -> 800, $ -> 900) ``` --- # Explore the Goodness ### Group, Lattice, Ring, Functor, Applicative, Monad, Traversable, Comonad, Zippers, Lenses, etc. ### Scalaz, Shapeless, Spire etc. ### What is behind CRDTs? --- # Key Takeaways -- ### Precise abstractions - mathematical preciseness -- ### More general to more specific -- ### Properties based testing -- ### Types, Kinds, Type classes, Parametric Polymorphism, etc. -- ### Write less, do more — refactor to remove repeated boiler plate code -- ### Composition: the way from small things to BIG things --- ## Keep Exploring What is parametricity, universal quantification, Types Driven Development, Dependent Types etc. -- ## References 0. [Functional Programming in Scala](http://www.manning.com/bjarnason/) 1. [Theorems for free](http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf) 2. [Propositions as Types](http://homepages.inf.ed.ac.uk/wadler/papers/propositions-as-types/propositions-as-types.pdf) 3. [Fast and Loose Reasoning is Morally Correct](http://www.cse.chalmers.se/~nad/publications/danielsson-et-al-popl2006.pdf) 4. Wikipedia .. for Semigroups, Monoids, Polymorphism, Abstraction principle, and many more. 5. [Typeclassopedia in Haskell](http://www.haskell.org/haskellwiki/Typeclassopedia) ### Code & Blog http://github.com/ppurang/abstractions http://piyush.purang.net/blog --- # Thank You! Extend your toolbox. Types, Functional Programming, Abstract Algebra and Category Theory for profit. ## Attributions 1. Title page image: .attr["Frankenthaler Helen Mountains and Sea 1952". Via Wikipedia - http://en.wikipedia.org/wiki/File:Frankenthaler_Helen_Mountains_and_Sea_1952.jpg#mediaviewer/File:Frankenthaler_Helen_Mountains_and_Sea_1952.jpg] 2. Subtype polymorphism image: .attr["Inheritance". Via Wikipedia - http://en.wikipedia.org/wiki/File:Inheritance.svg#mediaviewer/File:Inheritance.svg] 3. Break page image: .attr["John Seery - 'East', synthetic polymer paint on canvas, 1973, National Gallery of Australia". Via Wikipedia - http://en.wikipedia.org/wiki/File:John_Seery_-_%27East%27,_synthetic_polymer_paint_on_canvas,_1973,_National_Gallery_of_Australia.jpg#mediaviewer/File:John_Seery_-_%27East%27,_synthetic_polymer_paint_on_canvas,_1973,_National_Gallery_of_Australia.jpg]


This is what a post looks like. Straight forward. Date goes above the header. Content goes below the header.
In this section you can introduce a presentation to the template.
This is an example of the default theme I use for my jekyll sites. This theme is used for my blog and my project sites.
This site uses a combination of the following:
20 Aug, 2019
This is what a post looks like. Straight forward. Date goes above the header. Content goes below the header.
In this section you can introduce a presentation to the template.


- Proven quality with superior local support
- Environmentally friendly
- Power of One with all critical components made with precision.
- Lowest operating cost
- Reliable, durable & dependable
- Super silent gensets
- Comprehensive warranty cover: 2-year Standard, with extended warranty options available
Power coverage from 7kw~1800kw
Model: GF: Open type &GFS: Soundproof /Silent/Supper silent type
Engine: UK-ENGINE
Speed:1500/1800rpm
Alternator : Stamford /Leroysomer /Marathon/ABB/YIHUA YHGIP &Insulation
YIHUA- DCEC CUMMINS series diesel generator power coverage from 16kw~220kw 。
Adopting DCEC Cummins, it's manufacturing base invested by Cummins in China, who is specializing in low or medium power diesel engine .The prime products are 4B,6B,6C,6L series diesel engine Gen-set. with
globally uniform quality standard, compact structure ,reliable capability, high ly durability, safety and emission. Power coverage from 16kw~200kw
Power coverage from 16kw~200kw
Model : GF: Open type &GFS: Soundproof /Silent/Supper silent type
Engine :CCEC Cummins
Speed :1500/1800rpm
Alternator : Stamford /Leroysomer /Marathon/ABB/YIHUA YHG
The isuzu serious diesel engines , whose cylinder-bore diameter is 93 millimeter, and the displacement is small, so the fuel consumption could get a high point and the fuel consumption could reach 213 g/kw.h.
Power coverage from 15kw~36kw
Model: GF: Open type &GFS: Soundproof /Silent/Supper silent type
Engine: ISUZU
Speed: 1500/1800rpm
Alternator: Stamford /Leroysomer /Marathon/ABB/YIHUA YHG


The API reference¶
The view functions¶
This module runs the frontend app of iteratec’s Observerhive.
The app implements a simple webservice where the user can either register projects at a Conductor Service, check his or her registrations or turn on and off receiving event messages for the registered projects.
-
src.
activate_user_setup
()[source]¶ Set the active flag to True.
The active flag indicates if a user is currently interested in receiving events for the project he has registered for.
-
src.
change_password
()[source]¶ Render the form to change password of current user.
The function retrieves the form to change one’s password and renders it. If the current user submitted the form, the function hashes the password and stores it in the users file of the app.
-
src.
check_username
()[source]¶ Check if POSTed username does already exist.
Returns: true if username is already in use
-
src.
deactivate_user_setup
()[source]¶ Set the active flag to False.
The active flag indicates if a user is currently interested in receiving events for the project he has registered for.
-
src.
delete_account
()[source]¶ Delete the account of the given user.
Returns: HTTP response 302 and redirect to home endpoint.
-
src.
deregister_project
()[source]¶ Deregister a project at Conductor service if not done already.
The function checks all projects in the users config file and if a project does not have an id already it will try register it at the specified Conductor Service.
-
src.
edit_registrations
()[source]¶ Retrieve all registered projects of the current user and show them.
The function retrieves the current users stored configurations and passes them to the corresponding template so that the user can manipulate them if wished.
-
src.
login
()[source]¶ Render the login page and check login credentials.
The function renders the login form and checks if username does exist and the provided password is correct when the user submits his or her data.
-
src.
logout
()[source]¶ Log the current user out.
Calls the logout_user() function of flask_login and redirects to the homepage of this app.
-
src.
register
()[source]¶ Render the form to register a new user.
The function renders the registration form and stores its values if the current user submitted the form.
-
src.
register_project
()[source]¶ Register a project at Conductor service if not done already.
The function checks all projects in the users config file and if a project does not have an id already it will try register it at the specified Conductor Service.
-
src.
request_loader
(request)[source]¶ Callback function for reloading a user from a Flask request.
The function takes the Flask request and returns a user object or None if the user does not exist.
-
src.
return_active_users
()[source]¶ Function to get all users which are currently active.
Returns: set of usernames
-
src.
show_registrations
()[source]¶ Retrieve all registered projects of the current user and show them.
The function retrieves the current users stored configurations and passes them to the corresponding template.
-
src.
split_registrations
(list_of_registrations)[source]¶ Groups registrations at the same service together.
This function generates a nested list of registrations. Registrations in the same sublist are registered at the same conductor service.
Parameters: list_of_registrations (list) – list of dict objects Returns: nested list of registrations
The “myflask” module¶
-
src.myflask.
get_users
(cwd, file_name)[source]¶ Get users and their passwords.
Parameters: Returns: dictionary of users and passwords
-
class
src.myflask.
FlaskApp
(*args, **kwargs)[source]¶ This class provides a customized Flask application for the client frontend.
Variables: - cwd (str) – current working directory
- users (dict) – all users currently registered
- active_users (dict) – users which want to be notified
-
classmethod
add_user_and_password
(username, password)[source]¶ Adds credentials for a new user to the users file.
Parameters:
-
classmethod
delete_config
(username)[source]¶ Delete a config file for specified user.
Parameters: username (str) – specifying the user Returns: None
-
classmethod
delete_user
(username)[source]¶ Removes credentials from users file.
Parameters: username (str) – indicates which account credentials to remove
-
classmethod
load_config
(username)[source]¶ Loads the config file and returns the list of registrations.
Parameters: username (str) – indicating for which user Returns: list of dictionaries representing registrations
The “config” module¶
This module provides configurations for the Flask app.
Classes and inheritance are used for configuration. The variables are passed through an from_object() call.
The “models” module¶
This module defines the user models which are used in the app.
-
class
src.models.
Anonymous
[source]¶ Generic class for anonymous user.
Besides the inherited methods and attributes it defines an id attribute which is set to Guest.
-
class
src.models.
Project
(project_url, event, credentials)[source]¶ Generic class for registered projects.
Variables:
-
class
src.models.
Registration
(registration_id, service, project_name, project_url, event, active=False)[source]¶ Generic class for a registration.
Variables: - registration_id (int) – allocated by the conductor server
- service (str) – address of the conductor service
- project_name (str) – name chosen by the user for this project
- project_url (str) – url of the project
- event (str) – type of event to be followed
- active (bool) – indicator if user wants to be notified about this
-
class
src.models.
RegistrationSerializer
[source]¶ This provides supporting functions for the Class Registration
The serialize_registration() converts a dictionary with all information of a single registration into a Registration object. The deserialize_registration() does the opposite.
The “forms” module¶
This module contains all forms used by the Observer-Hive frontend.
-
class
src.forms.
ChangeCredentialsForm
(*args, **kwargs)[source]¶ This class defines the form to change an existing users password.
The form provides one entry fields for the current password and two entry fields for new password, the second one being used for verification.
-
class
src.forms.
LoginForm
(*args, **kwargs)[source]¶ This class defines the login form.
The form provides two entry fields for the user’s credentials: username and password.
The “loggers” module¶
This module provides functions to setup logging for the Flask app.
Depending on how the application is run the configuration of the logging will be set differently. For more information read the docs of the specific function.
-
src.loggers.
setup_gunicorn_logging
(app)[source]¶ This is meant to be called if the Flask app is run by Gunicorn.
The logger will set the handlers of the Flask app logger to the Gunicorn logger. The Flask app will have the same log level as the Gunicorn logger.
Parameters: app – the actual Flask app to be logged Returns: the logger object
-
src.loggers.
setup_logging
(log_level='INFO', log_file='info.log')[source]¶ This is meant to be called if the Flask app is run by its own.
It will set up a console log and a produce a log file in the current working directory.
Parameters: - log_level – granularity of log messages
- log_file – file location to write log messages
Returns: logger object
The “notify” API reference¶
The “settings” module¶
This module defines cross module variables which are used to handle events.
-
src.notify.settings.
active_users
= {}¶ Variables: active_users (dict) – dict of users who want to be notified
The “notify” module¶
This module starts the process which handles events from the conductor.
It starts a thread which will iterate through all received events and handles them. Furthermore it imports the customized HTTPRequestHandler for events and runs a simple server.
The “revolver” module¶
This module provides the actual function to show events.
-
src.notify.revolver.
show_messages
()[source]¶ Runs an infinite loop which shows all events.
The function gets the dictionary of active users from the customized Flask app and iterates through it. For each user the intersection of followed projects and events to show is made and only these events will be shown.
Returns: None
The “handler” module¶
This module defines a customized HTTPRequestHandler to receive events.
The “eventhandler” module¶
This module defines classes to handle events.
For every webservice which can be observed there is one class which provides custom functions to notify the user about events.
-
class
src.notify.eventhandler.
EventHandler
[source]¶ Base class providing a minimal set of functions to handle events.
The “blinker” module¶
The “loggers” module¶
This module provides the configurations to setup logging for the notifier.
-
src.notify.loggers.
setup_logging
(log_level='INFO', log_file='info.log')[source]¶ Defines all configurations for logging of the notifier.
It sets up a console log and a produce a log file in the current working directory.
Parameters: - log_level – granularity of log messages
- log_file – file location to write log messages
Returns: logger object


Experienced Full Stack JS Developer. Currently working with Typescript, React.Js, Next.Js, Node.Js, Nest.Js, AWS to build performant web applications. Previously worked on data visualization & building distributed systems using Docker, Kubernetes and Cassandra to support large scale data crunching. Interested in DevOps and system design.
See the Pen Interactive Circles by Nitin Pradeep Kumar (@getnpk) on CodePen.
See the Pen Bouncing Balls by Nitin Pradeep Kumar (@getnpk) on CodePen.