text:
# Introduction

In Basic Algebra I, I am struggling with fully understanding the following exercise:

Show that $S\overset{\alpha}{\to}T$ is injective if and only if there is a map $T\overset{\beta}{\to}S$ such that $\beta\alpha=1_S$, surjective if and only if there is a map $T\overset{\beta}{\to}S$ such that $\alpha\beta=1_T$. In both cases, investigate the assertion: if $\beta$ is unique then $\alpha$ is bijective.

# My Problem

I am struggling only with the bold portion. (I have written proofs by contradiction for the other aspects of the question.) What confuses me specifically is this:

• What is this question really asking? Is it saying, "What happens when $\beta$ is unique when both $\beta\alpha=1_S$ and $\alpha\beta=1_T$?" or is it saying, "What happens when $\beta$ is unique and either $\beta\alpha=1_S$ or $\alpha\beta=1_T$ is true?"

# Remarks

As you can see, my real problem here is understanding precisely what is being asked. If it is asking, the first (both $\alpha\beta=1_T$ and $\beta\alpha=1_S$ are true), then we're simply constructing the very definition of a bijection. If it's asking the latter, I don't know what's going on . . . Are we somehow still constructing a bijection?

Can you all give me help on reading questions such as this?

-
That an injective map has a left inverse is only true if its domain is nonempty. –  Michael Greinecker Dec 29 '12 at 21:01

I parse this as follows:

The bold sentence refers separately to each of the two statements.

So expanded out, this would be:

1a. Show that ... is injective if and only if ... Show also that if $\beta$ is unique then $\alpha$ is bijective.

1b. Show that ... is surjective if and only if... Show also that if $\beta$ is unique then $\alpha$ is bijective.

-
Why do you parse this this way? Why is this correct when the other interpretation is not? I'm not saying you're wrong. I'm genuinely asking those questions because I don't see why this is the intended meaning of the question. –  000 Dec 29 '12 at 1:00
Fair question. I replace 'both' with 'each', where the claim is that the statement "in both cases" is true iff "each case" is true separately. –  Assad Ebrahim Dec 29 '12 at 1:04
Could you explain what the mathematical consequences of your interpretation are? I am not seeing any and it makes the question seem null. I am most likely wrong as I am heavily confused. I think it is interpreted the other way because that appears to be the only way of making a sensible question. I mean, Jacobson (the author) even puts a definition of bijections in terms identical to what the other interpretation says: "$S\overset{\alpha}{\to}T$ is bijective if and only if there exists a map $T\overset{\beta}{\to}S$ such that $\beta\alpha=1_S$ and $\alpha\beta=1_T$." –  000 Dec 29 '12 at 1:09
Jacobson (in my opinion) is not the clearest author, and I've also found understanding exactly what he means a tad challenging (frustrating?) Do you want to take this into a chat room? It may be quicker and easier there. –  Assad Ebrahim Dec 29 '12 at 1:17
Transcript resolving the problem. –  Assad Ebrahim Dec 29 '12 at 2:15

# Central Matter

With the help of AKE, I was able to figure out what's being said here. The crux is this: $$\beta \text{ is unique} \iff |S|=|T| \iff \alpha \text{ is bijective},$$ which quickly implies that if $\alpha$ is bijective in either case.

# Elaboration and Specifics

For the mapping $\alpha$ wherein $\beta\alpha=1_S$, we have that $\alpha$ is injective. However, $\beta$ can be any map $T\to S$ such that all the elements of $T$ map to $S$. This means that $\beta$ acts not just on the elements $\alpha(s)$; it acts on all elements of $T$. As a result, there are, in general, elements in $T$ which can be mapped to any $s\in S$. Thus, there are many possible maps $\beta$; we can create a new one simply by changing what a given $t\in T$ which is not $\alpha(s)$ maps to.

Now, the issue is this: We are supposing $\beta$ is unique. This means there cannot be elements in $T$ which are not equal to $\alpha(s)$. If there were, then $\beta$ would cease to be unique for the reason outlined just above. Hence, we have that $\alpha$ is also surjective. Therefore, $\alpha$ is bijective. $\blacksquare$

For the mapping $\alpha$ wherein $\alpha\beta=1_T$, we have a similar situation. Using the same line of logic, we see that there cannot be $s\in S$ such that $s\ne \beta(t)$. If there were, $\beta$ would cease to be unique. Thus, we have that $\alpha$ is injective. Therefore, $\alpha$ is bijective. $\blacksquare$

-
Hint: You might want to start with extreme cases, such as when $S$ or $T$, but not both, has only one element. (I take the problems to be whether "$\alpha$ is bijective if and only if there is a unique map $\beta$ such that $\beta\alpha=1_S$" and similarly for the other part.) –  Michael E2 Dec 29 '12 at 5:23
@MichaelE2 That's a very good point. This question has indeed taught me to examine cases in particular detail. –  000 Dec 29 '12 at 5:49


text:
# Change in Harmony

Calculus Level 5

$\sum _{ n=1 }^{ \infty }{ \dfrac { { H }_{ n }^{ \left( 2 \right) } }{ { \left( n+1 \right) }^{ 2 } } } =\dfrac { { \pi }^{ A } }{ B }$

If the equation above holds true for positive integers $$A$$ and $$B$$, find $$A+B.$$

Notation: $$H_n^{(m)}$$ denotes the generalized harmonic number, $$\displaystyle H_n^{(m)} = \sum_{k=1}^n \dfrac1{k^m}$$.

×

format: plain


text:
• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
 Our tetration concept is a wrong way? Ansus Junior Fellow Posts: 20 Threads: 5 Joined: Aug 2008 11/06/2010, 12:08 AM (This post was last modified: 11/06/2010, 01:33 AM by Ansus.) By analogy with discrete multiplicative derivative of a function $f(x+1)\frac1{f(x)}$ we can define a discrete iterative derivative $f(x+1)\circ f^{[-1]}(x)$. The inverse operator to it (discrete iterative integral) is known as superfunction or flow. It exhibits many properties common to integral such as that it is more difficult to express in closed form than the derivative and that a constant parameter appears in the process. But what if to consider the local iterative integrals and derivatives? Lets define the local iterative derivative as follows: $f^{\circ}(x)=\lim_{h\to\infty} \left( f \left(x+\frac xh\right)\circ f^{[-1]}(x)\right)^{[h]}$ where in the square brackets is the number of iterations. And also by analogy we can define the local iterative integral as an inverse operator. As we can see, the local iterative integral of x+1 is addition, local iterative integral of addition is multiplication and local iterative integral of multiplication is exponentiation (just as in the case of discrete iterative integral). There is no reason to define tetration as discrete iterative integral of exponentiation as we usually do. Rather we could better define tetration as the local iterative integral of exponentiation, this new definition will rid us of any problems of interpolation over discrete points, problems of uniqueness etc. Although it will give us completely different function as "local tetration" The local tetration thus satisfies the following equation: $a^x=\lim_{h\to\infty} \left( f_a \left(f_a^{[-1]}(x)+\frac xh\right)\right)^{[h]}$ Any thoughts? « Next Oldest | Next Newest »

 Messages In This Thread Our tetration concept is a wrong way? - by Ansus - 11/06/2010, 12:08 AM RE: Our tetration concept is a wrong way? - by mike3 - 11/06/2010, 01:30 AM RE: Our tetration concept is a wrong way? - by Ansus - 11/06/2010, 04:57 AM RE: Our tetration concept is a wrong way? - by mike3 - 11/06/2010, 06:37 AM

 Possibly Related Threads... Thread Author Replies Views Last Post What am I doing wrong here? JmsNxn 2 3,893 05/26/2011, 02:21 AM Last Post: JmsNxn

Users browsing this thread: 1 Guest(s)


text:
# ICHEP 2016 Chicago

3-10 August 2016
Chicago IL USA
US/Central timezone
There is a live webcast for this event.

## Non-accelerator physics with Hyper-Kamiokande (13' + 2')

6 Aug 2016, 15:15
15m
Chicago 6 ()

### Chicago 6

Oral Presentation Neutrino Physics

### Speaker

Luis Labarga (Departam.de Fisica Teorica)

### Description

While the Standard Model provides an excellent description of low energy particle interactions, the description is nonetheless incomplete and there are well motivated reasons to believe it is only part of a larger theory. Among these is its explicit conservation of baryon number, a quantity whose violation is required to produce the matter dominated universe observed today. This issue is addressed in Grand Unified Theories, for instance, through the introduction of interactions which convert quarks into leptons and thereby allow for baryon number violation in the form of unstable nucleons. Though the experimental signatures of nucleon decay are often tractable and several potential channels exist, a positive signal has never been observed. Indeed, modern searches have yielded limits which begin to probe model predictions, constraining the lifetime to less than $10^{33}$ or $10^{34}$ years depending on the decay mode. Amid these stringent constraints the design of the next-generation water Cherenkov detector Hyper-Kamiokande is being optimized for observation of nucleon decay. Not only is the detector planned to be an order of magnitude larger than predecessor experiments, but its improved photon yield will enable superior signal efficiency and background rejection. As a result it is expected to have more than an order of magnitude better sensitivity to a signal. This presentation will describe the physics potential of Hyper-Kamiokande's nucleon decay search program, including standard decay channels such as $p \rightarrow e^{+}\pi^{0}$ and $p \rightarrow \bar \nu K^{+}$ as well as several others.

### Primary authors

Luis Labarga (Departam.de Fisica Teorica) Masashi Yokoyama (University of Tokyo)


text:
# Shockley Diode Calculator

Created by Álvaro Díez
Reviewed by Bogna Szyk and Steven Wooding
Last updated: Dec 21, 2022

The Shockley diode calculator allows you to calculate either the voltage drop or the current flowing through a real diode, knowing the other value. It allows you to calculate I-V values and helps you understand how the transistor works in either forward or reverse bias. The Shockley diode calculator can obtain values for both a real (imperfect) and an ideal diode using the Shockley diode equation (also called the diode law).

## What are real and ideal diodes?

A diode is an electronic component that only allows the electrical current to flow in one direction. It is made by putting in contact an n-type and a p-type semiconductor crystal. The physics behind the behavior of the p-n junction is complicated. Still, the resulting diode can almost perfectly block the current flowing in one direction of the electrical circuit while allowing it to flow normally in the other direction. The Shockley diode calculator helps you calculate the current-voltage (I-V) relationship in both cases.

As is common in science, there are imperfections arising from the manufacturing processes and the imperfect technology at our disposal; these imperfections are parametrized by the emission coefficient (n) that typically ranges between 1 and 2 (1 being an ideal diode). The ideal diode is, as the name implies, an idealization in which the diode is assumed to have no imperfections.

In most cases, a real diode can be assumed to behave like an ideal diode without a significant loss in accuracy. However, for exact calculations, the user is welcome to change the emission coefficient from an ideal diode (1) to that of the diode they are working with. This emission coefficient is a parameter of the diode and should be given as part of its specifications.

## Shockley diode equation and how the calculator works

The Shockley diode calculator uses the Shockley diode equation (shown below) that has 5 different parameters, 4 of which should be input by the user.

$\large I = I_{\rm S}\left(e^\frac{V_{\rm D}}{nV_{\rm T}} - 1 \right)$

Three of these five parameters are what you could call "specifications of the diode," meaning they are intrinsic parameters of a particular diode:

1. $n$Emission coefficient is a parametrization of the imperfections of the diode. Typically ranges from 1 (ideal diode) to 2. It is set to 1 by default in the Shockley diode calculator.

2. $I_{\rm S}$ – (Reverse) saturation current is the intrinsic current present in all diodes (including the ideal diode), and it is almost only dependent on the temperature. For a more detailed explanation, we recommend the Wikipedia article on .

3. $V_{\rm T}$ – Thermal voltage is the internal voltage in the diode when disconnected from the circuit. It is caused by the temperature and the properties of the p-n junction inside the diode.

The other 2 are experimental variables, the ones that are typically changed during a laboratory experiment.

1. $V_{\rm D}$Voltage drop is the voltage difference between the connections of the diode to the circuit.

2. $I$Current flowing through the diode.

## How to use the Shockley diode calculator

The Shockley diode calculator is a simple tool that allows you to obtain information about a real/ideal diode. The typical use case would be to find the I-V curve of a particular diode from its specifications. However, the possibilities increase significantly when used in conjunction with other calculators.

For example, by using this Shockley diode calculator in conjunction with the Ohm's law calculator, you can obtain the values of the resistance and power draw of the real/ideal diode for any value of current or voltage. This method is advantageous since a diode does not follow a linear relationship between the current flowing through it and the voltage drop. Its resistance is not constant but depends on the voltage/current applied and the temperature.

Other uses might include fast simulation of simple circuits and their properties. It is true that as an electrical circuit to be simulated grows in complexity, it becomes more time efficient to use dedicated software (such as LabView, LTspice...) for such a task. Nevertheless, in the case of one-time simulations of basic circuits, this Shockley diode calculator – together with the LED resistor calculator and the voltage drop calculator – provides a straightforward way to perform accurate simulations of circuits involving diodes (including several LEDs) and to take into account the effects of the wiring/resistances present in them.

Álvaro Díez
Emission coefficient
Saturation current
mA
Thermal voltage
mV
Voltage drop
V
Current
mA
People also viewed…

### Black Friday

How to get best deals on Black Friday? The struggle is real, let us help you with this Black Friday calculator!

### Helmholtz resonator

Find the resonant frequency of an acoustic cavity with out Helmholtz resonator calculator!

### Physical pendulum

The physical pendulum calculator helps you compute the period and frequency of a physical pendulum.

### Sunbathing

Do you always remember to put on sunscreen before going outside? Are you sure that you use enough? The Sunbathing Calculator ☀ will tell you when's the time to go back under an umbrella not to suffer from a sunburn!


text:
# How do you find the amplitude and period of y = 3sin2x-(pi/2)?

Jul 25, 2018

As below. graph{3 sin (2x) - pi/2 [-10, 10, -5, 5]}

#### Explanation:

Standard form of sine function is $y = A \sin \left(B x - C\right) + D$

Given: $y = 3 \sin 2 x - \frac{\pi}{2}$

$A = 3 , B = 2 , C = 0 , D = \frac{\pi}{2}$

Amplitude $= | A | = 3$

Period $= \frac{2 \pi}{|} B | = \frac{2 \pi}{2} = \pi$

Phase Shift $= - \frac{C}{B} = 0$

Vertical Shift $= D = - \left(\frac{\pi}{2}\right)$


text:
GFS Artemisia

The `gfsartemisia`package redefines the `\ae`, `\o` and `\aa` commands to only work in the T1 encoding. Typing `æ`, `ø` and `å` using package `inputenc` still works.

Usage

```\usepackage{gfsartemisia}
\usepackage[T1]{fontenc}
```

Style examples

```\normalfont
```

```\itshape
```

```\scshape
```

```\bfseries
```

Font implementation

GFS Artemisia is available as Type 1.
GFS Artemisia is available as OpenType or TrueType.

Part of TeX Live?

GFS Artemisia is part of TeX Live.


text:
# Running models multiple times with different data or parameters

## Primary tabs

R allows you to create loops so that you can do things such as read in files one at a time and run a model on each of them.

For a given model such as myModel below, these tasks involve running the model repeatedly with different data or settings, and storing some of the output.

One approach is to define a model, and an object to store the results:

myModel <- mxModel( blah blah blah ) # define a FIML model but don't put any data in it.
myParameters <- matrix(NA, 100, 5) # suppose 100 files and you want to save 5 parameters from each run

Then simply write a for-loop in R to call the model repeatedly

for (i in 1:100) {
tempFileName <- paste("myFile",i,".dat", sep=0) # Suppose files name myFile1.dat, myFile2.dat, etc.


text:
Gives the number of variance parameters for parameterizations of the Gaussian mixture model that are used in MCLUST.

nVarParams(modelName, d, G, ...)

## Arguments

modelName

A character string indicating the model. The help file for mclustModelNames describes the available models.

d

The dimension of the data. Not used for models in which neither the shape nor the orientation varies.

G

The number of components in the Gaussian mixture model used to compute loglik.

...

Catches unused arguments in indirect or list calls via do.call.

## Value

The number of variance parameters in the corresponding Gaussian mixture model.

## Details

To get the total number of parameters in model, add G*d for the means and G-1 for the mixing proportions if they are unequal.

## References

C. Fraley and A. E. Raftery (2002). Model-based clustering, discriminant analysis, and density estimation. Journal of the American Statistical Association 97:611:631.

C. Fraley, A. E. Raftery, T. B. Murphy and L. Scrucca (2012). mclust Version 4 for R: Normal Mixture Modeling for Model-Based Clustering, Classification, and Density Estimation. Technical Report No. 597, Department of Statistics, University of Washington.

## See also

bic, nMclustParams.

## Examples

mapply(nVarParams, mclust.options("emModelNames"), d = 2, G = 3)
#> EII VII EEI VEI EVI VVI EEE VEE EVE VVE EEV VEV EVV VVV
#>   1   3   2   4   4   6   3   5   5   7   5   7   7   9


text:
# Is alcohol based sanitizer flammable? [closed]

After applying sanitizers can they catch fire, if yes, then after what time is it safe to use the hands, say in the kitchen. Also one more question is that if they are flammable then the flammable component is alcohol. However as soon as we apply the sanitizer the alcohol evaporates? Then how can they remain flammable on our hands?

• As soon as alcohol evaporates, they cease to be flammable. Soon as it is, this does not happen instantly, though. – Ivan Neretin Jun 11 at 5:13
• Hm, their medical application Is off-topic, but their physical and chemical properties are still on-topic. – Poutnik Jun 11 at 5:39
• @Poutnik It's still the same bag. Being too broad, this should be already closed. – Mithoron Jun 11 at 19:18

Firstly, we should realise that sanitizers should not be considered as pure alcohols, alcohols are indeed a major component of it but many other important components are also present. A typical sanitizer contains these things -

Isopropyl alcohol/ Ethyl alcohol, Glycerin, Water, Carbomer(stabilizer) and some other components mostly related to cosmetics.

After applying sanitizers, can they catch fire?

Yes, there is 60%-70% alcohol content which is highly flammable. Organic compounds like alcohols, alkanes etc have very high enthalpy of combustion ($$\Delta_\mathrm{c}H^\circ$$ = -2000 kJ/mol for Isopropyl alcohol) and they can evaporate very easily due to the heat of our hands($$\Delta_\mathrm{vap}H^\circ$$= 40kJ/mol for isopropyl alcohol).

As soon as we apply alcohol, it evaporates so why is it still flammable?

This is actually wrong, as I earlier mentioned, that sanitizers are not only alcohols, in fact, the 'carbomer' present acts as a stabilizer to emulsify/dissolving all the components in it. These stabilizers prevent the alcohol to evaporate immediately and allow it to disinfect our hands fully. Also, after applying sanitizers, many of you might feel hands becoming sticky it is because of the presence of Glycerin and other cosmetic products used in it which act like a moisturizer. So generally it takes about 30-40 seconds for all(mostly) the alcohol to evaporate and sustaining a risk to be inflammable for a long time. A thing to keep in mind is that the residue (mostly Glycerin) is also flammable(not that much, it's flammability rating is one) so after the alcohol has evaporated, you aren't fully safe from catching fire.

If your are working in kitchen, there is no actual need of using sanitizers as you can always wash hands in sink with soap and water.

I hope this answer cleared some of your doubts, stay safe :).

• In this answer, I don't think I have added something which needs a reference, the enthalpy data is the standard NIST data, and everything else is rather applications of organic chemistry, carbomer being a stabilizer due to it's high molecular mass etc. – Pj30 Jun 11 at 7:09
• Water is also a common ingredient in hand sanitizer. – SE - stop firing the good guys Jun 11 at 13:28
• @SE-stopfiringthegoodguys thank you for the comment, yes, water is also a common ingredient in sanitizers. I have updated my answer. – Pj30 Jun 11 at 13:43
• @piojo thank you for your comment. Comment part 1 You are absolutely right, carbomer(or some other chemicals) can be formally called as a thickener but if you compare the time taken for alcohol to evaporate of the sanitizers you will see a drastic difference,. the WHO sanitizer evaporates way to fast, but note that it does not decrease it's potential to sanitize (notice the volume you take of your WHO sanitizer and compare it with the branded sanitizer). – Pj30 Jun 11 at 16:11
• @piojo Comment part 2 Using a thickener/solvent just makes it more efficient as most of the alcohol is used up after sanitizing hence it works with very small amounts, while the WHO sanitizer which is somewhat thinner is used in comparatively a bit more amounts at a time works just the same. (The comment was exceeding the word limit so had to answer it in 2 parts ;-)) – Pj30 Jun 11 at 16:12


text:
## Naturally definable sets of natural numbers (2): Can the circle be broken?

(follow-up to: Naturally definable sets of natural numbers)

Every formula $\Psi(x)$ in the first-order language of Peano arithmetic defines a set of natural numbers. Some of these sets are finite, others are infinite. Every finite set $\lbrace n_0, n_1, ..., n_k \rbrace$ can be defined by an equation $p(x) = q(x)$ with $p(x), q(x)$ finite polynomials in $x$ with natural coefficients. Let in the following $\phi(x)$ be such an equation [read "phi" for "finite"]. Infinite sets cannot be described by any $\phi(x)$.

Given a formula $\Omega(x)$ which defines an infinite set [read "omega" for "infinite"]. Then every formula of the form $\Omega(x) \vee \phi(x)$ or $\Omega(x)\wedge \neg\phi(x)$ defines an infinite set, too.

The motivation of the following definition is this: A formula defining an infinite set shall be called arbitrary if it is derived from a natural (= non-arbitrary) formula by adding or removing finitely many arbitrary elements.

Definition (wannabe): A formula $\Omega(x)$ is arbitrary iff it defines an infinite set and is equivalent

1. to a formula $\omega(x) \vee \phi(x)$ with $\phi(x) \not\rightarrow \omega(x)\ \ \ \ \ \ \ \ \ \$ or
2. to a formula $\omega(x) \wedge \neg \phi(x)$ with $\omega(x) \not\rightarrow \neg\phi(x)$

where $\omega(x)$ is not arbitrary. (Of course, $\omega(x)$ defines an infinite set.)

On first sight, this definition seems circular:

Let $\Omega(x) \equiv \omega(x) \vee \phi(x)$ with $\phi(x) \not\rightarrow \omega(x)$.

Then $\omega(x) \equiv \Omega(x) \wedge \neg\phi'(x)$ with $\Omega(x) \not\rightarrow \neg\phi'(x)$.

Then $\Omega(x)$ is arbitrary iff $\omega(x)$ is not arbitrary.

Might this seemingly vicious circle not be in fact a (hidden) recursive definition (by something like "(abstract) length of formulas")?

Cannot this circle be broken? What about the intuition, that $(\exists y) x = 2 \cdot y$ is a non-arbitrary formula, but that $(\exists y) x = 2 \cdot y \vee x = 17$ is an arbitrary one?

-
-1. This question is terribly vague. Since I don't believe that there actually is a useful and coherent notion of "natural" along these lines, I find it impossible to help you give precise substance to an intuition that I don't share. But I would be happy to consider again, however, if you make a precise proposal. So I would encourage you to ask a focused, precise question. – Joel David Hamkins Feb 5 2010 at 2:41
I appreciate your comment, but what I cannot understand is, why nobody seems to share or even is willing to try to share my intuition/feeling expressed in the last sentence of my question? (Francois at least seemed to be able to make some sense of it.) Maybe I should have mentioned that my question has to do with the philosophical questions for "natural kinds" and "induction" (see e.g. en.wikipedia.org/wiki/…). – Hans Stricker Feb 5 2010 at 8:40
Well, I think I did try, because I answered your two previous questions on this topic, with fairly complete answers each time (you deleted the first question shortly after I posted my answer). And Francois has also given you excellent answers. The substance of his answer below is that you may be looking for naturality in the wrong place, in the syntax, rather than in the sets themselves. – Joel David Hamkins Feb 5 2010 at 13:49
Indeed, the answers were excellent (see my comment on Francois' answer), and I am really thankful that you took the time. My comment only concerned your claim that you don't share my intuition. – Hans Stricker Feb 5 2010 at 14:13

From what I gather from your question, your "natural formulas" would form a complete set of distinct representatives for definable subsets of N under the equivalence relation $X \mathrel{E}_0 Y$ defined by $|(X \setminus Y) \cup (Y \setminus X)| < \aleph_0$. Unfortunately, there is no simple way to do this; such a system of distinct representatives necessarily has very high complexity. In fact, finding a system of distinct representative for $E_0$ over all subsets of N is precisely the same complexity as Vitali's construction of a non-measurable set!

In your question, you talk about formulas rather than the sets they define, but this is not much different (the difference is known as "lightface vs boldface" in the literature). Problems of this type are extensively studied in Descriptive Set Theory, under the heading of Borel Equivalence Relations. The relation $E_0$ is in a very precise sense the simplest Borel equivalence for which has no simple system of distinct representatives, it thus plays a very important role in this theory.

A good place to get started with Descriptive Set Theory is Kechris's Classical Descriptive Set Theory. For your particular problem, you want to look at the "lightface theory," for which the standard reference is Moschovakis's Descriptive Set Theory. There are a few good surveys and books on Borel equivalence relations, but most require a fair amount of familiarity with the subject.

-
 This is an enlightening answer to a supposedly obscure question. Thank you. – Hans Stricker Feb 5 2010 at 9:04 What is the complexity of a set/system of sets? What is complexity in this context, anyway? Has it to do with the level in the arithmetical/analytical hierarchy? Is it then not the members of the set/system that are of high complexity? By contrast: Is "simple" in the "simple system of distinct representatives" you mention a precisely defined term? – Hans Stricker Feb 11 2010 at 8:45 Assuming that your set of distinct representatives is the set of "natural" sets I am looking for - which I am not quite sure yet - I accept this answer. (In any case it opened up my mind for descriptive set theory.) – Hans Stricker Feb 11 2010 at 9:31 By "complexity," I meant the first level of the projective hierarchy that contains a solution of the given problem. This is independent of ZFC, but the minimum consistent with ZFC is $\Delta^1_2$. There are several similar options for "simplicity" and most make sense; I don't think I had a specific one in mind. – François G. Dorais♦ Feb 11 2010 at 12:41 Your "wannabe definition" is very close to saying "the set is arbitrary if it is not equivalent to the representative of its $E_0$ equivalence class." (Technically, your definition should have a third case for when the set is neither contained in nor contains the representative of its $E_0$ class, but I assumed that this was an omission since $E_0$ equivalence was within the same spirit as what you were describing.) – François G. Dorais♦ Feb 11 2010 at 12:43


text:
# Inverted Index in C#

This is my last post for 2015. All in all 2015 has been a good year. Many people from all over the world have read my posts, tried my code. Some even subscribed…

In this post I will do something rather simple – write an inverted index builder in C#. What is an inverted index? It is the simplest form of document indexing to allow for performing boolean queries on text data. For example, imagine we have several text files and we would like to find out which of them contain all or some of the search terms. We can group search terms using regular boolean AND and OR expressions.

To illustrate, let’s say we have two files, 1.xt and 2.txt. The two files contains the following:

file 1: one star is sparkling bright
file 2: two stars are sparkling even brighter

An inverted index on such data is built in four steps:

1. Collect the documents.
2. Tokenize the text by parsing each element.
3. Perform linguistic pre-processing (e.g. removing punctuation, removing capitalization, etc.) to normalize the elements.
4. Create an index in a form of a dictionary, where keys are the elements and the values are the documents that contain them.

It is really as simple as that. I am not going to code the normalization step as this would remove the main emphasis of this post. Instead, I will provide two simple extensions to allow for an AND and OR queries on the index.

So, given our short example files, how does the inverted index look like? Here is a visual example:

I use C# Dictionary to store such an index. The AND and OR are provided as extensions, and for a moment can handle only two keywords. It would be simple to remove this restriction by passing an array or a list to the extensions methods instead. In the end, the code is just an example of using LINQ (Intersect, Union and SelectMany). If you end up using this code, please add your own exceptions handling.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace InvertedIndex
{

public static class Extensions
{
public static IEnumerable<string> And (this Dictionary<string, List<string>> index, string firstTerm, string secondTerm)
{
return(from d in index
where d.Key.Equals(firstTerm)
select d.Value).SelectMany(x=>x).Intersect
((from d in index
where d.Key.Equals(secondTerm)
select d.Value).SelectMany(x => x));
}

public static IEnumerable<string> Or(this Dictionary<string, List<string>> index, string firstTerm, string secondTerm)
{
return (from d in index
where d.Key.Equals(firstTerm) || d.Key.Equals(secondTerm)
select d.Value).SelectMany(x=>x).Distinct();
}

}

class EntryPoint
{
public static Dictionary<string, List<string>> invertedIndex;

static void Main(string[] args)
{
invertedIndex = new Dictionary<string, List<string>>();
string folder = "C:\\Users\\Elena\\Documents\\Visual Studio 2013\\Projects\\InvertedIndex\\Files\\";

foreach (string file in Directory.EnumerateFiles(folder, "*.txt"))
{
}

var resAnd = invertedIndex.And("star", "sparkling");
var resOr = invertedIndex.Or("star", "sparkling");

}

private static void addToIndex(List<string> words, string document)
{
foreach (var word in words)
{
if (!invertedIndex.ContainsKey(word))
{
invertedIndex.Add(word, new List<string> { document });
}
else
{
}
}
}
}
}

Enjoy and Happy New Year!

P.S. And here is the GitHub link: https://github.com/elena-sharova/Inverted-Index.git

# Fast Binomial Option Pricing Model

In this post I will share with you a fast Binomial Option Pricer. I’ve built this pricer without using trees or other bulky data structures and this is what makes it very fast. At the moment, the pricer is capable of pricing Vanilla Options. However, it can be easily extended to price barrier or digital options. This model is not suitable for pricing path-dependent (e.g. Asian options) yet. I will work on designing a model for path-dependent options later on. We’ll begin by revisiting the idea of the Binomial Model. Then, I explain how I designed my pricer. The pricer is coded in C# and split into five program files. Each file can be downloaded via links provided below. Please note my disclaimer.

#### Binomial Pricing Model

The Binomial Pricing Model (BPM) has been around for ages. It is based on the idea of risk-neutral world where the value of a portfolio of derivatives can be replicated with a portfolio of its underlying and bonds. The BPM is a discrete model in a sense that it breaks-up the time-period between now and the maturity date into discrete time-steps. Then, for each time-step the underlying spot price is evolved until maturity. The terminal underlying prices are used to obtain the first sequence of derivative’s values. Then, the BPM works backwards to the starting point. On each time-step the previously-obtained values of the derivative are used to calculated the newer values using the risk-neutral pricing formula (i.e. the discounted expectation). This is repeated until the first time-step is reached.

#### Worked Example

The BPM requires a tree-like structure to hold simulated prices of the underlying and, finally, to hold intermediate option prices. Let’s look at an example. Suppose I need to price a vanilla call option with the following parameters: current spot = £41.75; strike = £45.0; bond yield/rate = 0.535%; spot volatility = 34%; time to maturity = 2 months. The BPM requires me to simulate the spot price for some period covering 2 months. It is up to me into how many time-steps I divide this 2-months period. Let’s say I divide it into 2 periods. Then I need to simulate something like this:

So, S0 is the current spot, S1 and S2 are simulated for each corresponding time-node. Each node is a result of the spot price moving up or down. There are two BPM types: the multiplicative and the additive. In this post I am only showing you the multiplicative model, which means that we have up and down factors that are multiplied into the current spot price to obtain the new spot. For example, if up factor is 1.103 and down factor is 0.9065 then our simulated two-step tree will look like this:

where 46.05 was obtained by multiplying 41.75 into 1.103, and so on. The spot underlying prices at time-step 2 can be used to price the call option with the following payoff: Max(X-K, 0), where X is a given terminal spot and K is the specified strike (e.g. we have specified £45.0). So, in terms of call prices at time S2 we have £5.80 for up_up, £0.0 for up_down and £0.0 for down_down. We now take these call prices and work back to the starting point. At this point we need the risk-neutral option pricing formula. In the BPM it takes this form:

$V=exp(-r\cdot \delta t)\cdot [p\cdot V_{u}+(1-p)\cdot V_{d}]$

where r is the bond yield/rate, delta t is the single time-step expressed in times to maturity, p is the risk-neutral probability of the price of the underlying to increase at the next time-step, and Vu and Vd are the option prices we have just calculated. In practice, both, the probability of price increase and the up/down factors are dictated by the SDE model. The supplied code is configured to work for Jarrow&Rudd, Cox&Ross&Rubinstein and the BS cases. Once we have the time S1 option prices, we proceed to calculate the time S0 option price by using the same risk-neutral formula and the time S1 option prices.

#### Designing Binomial Option Model for Speed

As far as coding the BPM, we need to make decisions about how to represent the simulated spot prices, how to represent the intermediate option prices, and how to glue together components that do the following: simulate price of the underlying for various SDEs, represent option payoff and the workings of the binomial model itself. Ideally, a large number of simulations should be possible (e.g. N=1,000). Taking a binary tree to represent simulated prices is not feasible because it would require a tree with 2^N -1 nodes. A key to a fast BPM is to recognize three things:

1. We don’t need to store intermediate spot prices, only the final spot prices.
2. The binomial tree is a recombining tree due to its discrete nature.
3. Two price paths that are different by a single time outcome (i.e. up or down) are adjacent to each other.

The adopted design can be imagined as the following:

The multiplicative model lends itself to a use of powers. Thus a price path where spot is increasing on each step is calculated as S*u*u*u…*u, etc. Because the paths that differ by a single outcome are adjacent, we don’t need a fancy data structure to store terminal prices of the underlying. A plain array of doubles works just fine. Finally, to implement the binomial model, we utilize only two arrays. The first array is populated with the first option prices. The second array is used to calculate option prices for one step backwards. While the original is now storing the copies of the second array one value at a time.

The full BPM project implemented in C# can be accessed via these links:

An UPDATE: a careful reader noted that the SDE link was wrong. The SDE file now lets you download the correct file. Also, a very useful suggestion was made by the same reader – to replace the inner body of the double for loop in BinomialPricer.GetPrice with the following assignment. Indeed, the time it takes to price the example vanilla option drops from 3,833 to 2,299 milliseconds on my PC in debug release. Thank you!

...
for (int i = timeSteps; i>=0; i--)
{
for (int j=0; j<nodes; j++)
{
//tempOptionPrices[j] = instDRate*(upProb*firstOptionPrices[j] + downProb*firstOptionPrices[j + 1]);
//firstOptionPrices[j] = tempOptionPrices[j]; // reuse firstoptionprices array for next iteration
firstOptionPrices[j] = instDRate * (upProb * firstOptionPrices[j] + downProb * firstOptionPrices[j + 1]);
}
nodes--;
}

//return tempOptionPrices[0];
return firstOptionPrices[0];
...

# Executing a Python Script from a C# Program

Python is a great programming language. It also has fantastic libraries (e.g. numPy, sciPy, pandas, etc.) that can significantly simplify and speed-up development. So, it is no surprise that sometimes when considering a coding solution for some problem you scratch your head and wish if you could only do it in Python (i.e. instead of C# or other low level programming language)!

In this short post I will show you how to execute a Python scrip and capture its output from a C# console-based program. Essentially, running a Python script from C# can be done either with IronPython dll referenced within your C# project and using the IronPython.Hosting library; or via kicking off a process that executes a Python program. The advantage of the later is that the script can be written in any Python flavor, provided you have installed the Python shell compatible with the script.

For this example I am using the following Python program saved as ‘hello.py’:

#!/usr/bin/env

import sys

def main():
print('Hello')
if len(sys.argv) >=3:
x = sys.argv[1]
y = sys.argv[2]
# print concatenated parameters
print(x+y)

if __name__=='__main__':
main()

The following C# code will start a process and assign it to the Python interpreter with the Python program name passed as argument. The output is parsed as stream. However, the output can be written to a file instead.

using System;
using System.Diagnostics;
using System.IO;

namespace ExecutingPythonScript
{
class EntryPoint
{
static void Main(string[] args)
{

int x = 1;
int y = 2;
string progToRun = "C:\\Python27\\hello.py";
char[] spliter = {'\r'};

Process proc = new Process();
proc.StartInfo.FileName = "python.exe";
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;

// call hello.py to concatenate passed parameters
proc.StartInfo.Arguments = string.Concat(progToRun, " ", x.ToString(), " ", y.ToString());
proc.Start();

foreach (string s in output)
Console.WriteLine(s);

proc.WaitForExit();

}
}
}

And that is all. It is that simple. One last thing to point out: progToRun could have been a string literal assigned to the actual Python code. This works well when you have a small task and don’t want to write a Python program to hold it.

# Dependency Injection Patterns

This is a short post to review two dependency injection (DI) design patters: Constructor Injection and Property Injection. These two DIs are the easiest and the most commonly used patterns. There are other DI patters: Ambient Context and Method Injection. Personally I find them rather involved, and will skip them for now. Most of the background material for this post is gathered from Mark Seemann’s Dependency Injection in .Net. I highly recommend this book to anyone interested in DI patters.

#### Constructor Injection

Constructor injection is the most widely used DI pattern, and is the default patter for most of DI. It works by making all callers of a class to provide the dependency/ies as its public constructor parameter/s. The default or parameter-less constructor is never provided (remember, in C# if you provide your own constructor, the default one is scrapped). As you may have seen in my previous blog post, quite often the dependencies are supplied as interfaces. Here, any class that implements a particular interface can act as the required dependency. However, the passed dependency can be an instance of any object, so it does not have to be an interface.

If you examine the displayed code (i.e. not the pdf file code) from my previous blog on lines 15 through 20, you will see that I have added the guard clause to ensure the dependency is not null. This is an important point, since passing a null to a constructor expecting a reference or a nullable value type will compile, but won’t work. Also, marking the dependency as private and readonly, guarantees its integrity. The clear benefit of constructor DI is the separation of responsibilities, as well as improved code maintainability. If the dependency is meant to be optional, then the property injection could be used instead.

#### Property Injection

Property injection DI pattern (also known as a Setter Injection) is closely related to the constructor injection. This pattern is used when the dependency in a class is optional, and there may be a local to the class default that can be used instead. If the calling class needs to override the default behavior, it provides its own dependency by setting a public or an internal property. The default behavior is specified in the constructor of the dependent class (i.e. BasicInterpolation.ConsoleWriter). However, to decouple it Output class from interpolation code, I could have added a console-based subclass to the Output class itself.

Below is an example of a property injection DI pattern. I have changed the UserOutput.Output class from the interpolation code to now use this pattern. Note that I am keeping the guard clause to ensure the passed dependency is not null. However, I can no longer have the property as readonly. Also, we allow the property to be set only once:

namespace UserOutput
{
#region GENERIC_OUTPUT
internal interface IWriter
{
void Write(string message);
}

internal class Output
{
private IWriter outputwriter;

public IWriter writer
{
get
{
if (this.outputwriter == null)
{
// provide with a default writer
this.outputwriter = new BasicInterpolation.ConsoleWriter();
}
return this.outputwriter;

}

set
{
if (value == null)
{
throw new ArgumentNullException("Null writer interface.");
}

if (this.outputwriter!=null)
{
// writer can only be set once
throw new InvalidOperationException();
}

this.outputwriter = value;
}
}

}
#endregion
}

#### Conclusion

In the Design Patters world, the constructor injection is the simplest pattern. In simplicity, it is followed by the property injection pattern. The latter can be used when a default behavior is required.

# Abstract Class vs. Interface and when to Use Both

I have recently come across a puzzling code example in one book. Here is a snapshot of the code:

public interface ITwoFactorPayoff
{ // The unambiguous specification of two-factor payoff contracts

// This interface can be specialized to various underlyings
double payoff(double factorI1, double factorII);
}
public abstract class MultiAssetPayoffStrategy: ITwoFactorPayoff
{

public abstract double payoff(double S1, double S2);
}

Can you see why I was puzzled? The web is full of advice for when to choose abstract class vs. interface and the other way around. Take for example, this MSDN link or this stackoverflow Q&A. Anyone who is not lazy has written something about this already. However, a discussion on when one would want to use both is somewhat lacking. And rightly so, you may say. The above code introduces a redundancy with no apparent benefit. Here, inheriting from MultiAssetPayoffStrategy class still requires to implement the payoff method. So, why not just use the interface? I would agree with you that the example is poorly designed (in spite of the fact that the book it comes from is an expensive one!). Nevertheless, it got me thinking – when would one actually want to have abstract classes implementing interfaces. Here are the reasons I have come up with. Would be interested to know if you can add anything to this.

### Reason 1 – Tidy Code

This is the simplest reason, and the first one that came to my mind. Imagine you have 10 or more interfaces that, a class hierarchy you are working on requires to implement. That is, class A must implement interface1, interface2, …, interfaceN; class B also must implement these interfaces. In other words, a situation that looks like this:

public interface Interface1
{
void method_interface1();
}

public interface Interface2
{
void method_interface2();
}
...
public class A: Interface1, Interface2
{
void method_interface1() {...}
void method_interface2() {...}
...

}

public class B: Interface1, Interface2
{
void method_interface1() {...}
void method_interface2() {...}
...

}

A way to simplify the code is to introduce either another interface that inherits from all 10 interfaces or simply an abstract class that does the same. Then, class A and class B just need to inherit from a single abstract class or a single interface.

### Reason 2 – Providing Default Implementation for Some but Not Other Members

An abstract class could provide a default behavior for some methods. I admit, this is different to the book’s example since that method is an abstract one. But we all know that an abstract class can have non-abstract methods. The derived class then has an option on which methods it needs to implement. Here is a simple example (note that default implementation is decorated as virtual):

namespace OOPDesign
{
public interface IPrice
{
double Price(double strike);
}

public interface IPrintPrice
{
void PrintPrice(double price);
}

public abstract class Pricer: IPrice, IPrintPrice
{
public abstract double Price(double strike);

public virtual void PrintPrice(double price)
{
Console.WriteLine(price);
}
}

internal sealed class OptionPricer: Pricer
{
public override double Price(double strike)
{
return strike + 15;
}

}

class EntryPoint
{
static void Main(string[] args)
{
double strike = 20;
OptionPricer op = new OptionPricer();
op.PrintPrice(op.Price(strike));
}
}
}

### Reason 3 – Combining Class Hierarchy with Contracts

This is probably the most obvious reason for choosing abstract classes together with interfaces. An abstract class can serve as a design summary of what all derived classes should do. This can aid in implementing a well-known visitor pattern. To give some credit to the mentioned book, it eventually evolves the example code to be based on this design pattern. If you are not familiar with the visitor pattern, I suggest you google it. Below I am providing a C# implementation based on the Java example one can find in Wikipedia (although it is not a one-for-one translation, as I have simplified the code a bit). This visitor pattern example can be summed-up as follows. We start off with three contracts: 2 interfaces and one abstract class. The abstract class is here to tell all its concrete classes to implement one of the interfaces (the accept method). The other interface is for the “visiting” classes. These visiting classes don’t really know what they are visiting, as long as the concrete class can accept them (which is guaranteed since the concrete classes are of the parent type and implement the accept functionality.

namespace VisitorExample
{
public interface ICarElementVisitor
{
void visit(CarBodyPart part);
}

public interface ICarElement
{
void accept(ICarElementVisitor visitor);
}

public abstract class CarBodyPart: ICarElement
{
public abstract void accept(ICarElementVisitor visitor);
public abstract string Name { get;  }
public abstract string Action { get;  }
}

public sealed class Wheel: CarBodyPart
{
private string name;
private string action;

public Wheel(string name, string action)
{
this.name = name;
this.action = action;
}

public override void accept(ICarElementVisitor visitor)
{
visitor.visit(this);
}

public override string Name
{
get
{
return this.name; ;
}
}

public override string Action
{
get
{
return this.action; ;
}
}

}

public sealed class Engine : CarBodyPart
{

private string name;
private string action;

public Engine(string name, string action)
{
this.name = name;
this.action = action;
}

public override void accept(ICarElementVisitor visitor)
{
visitor.visit(this);
}

public override string Name
{
get
{
return this.name; ;
}
}

public override string Action
{
get
{
return this.action; ;
}
}
}

public sealed class Body : CarBodyPart
{

private string name;
private string action;

public Body(string name, string action)
{
this.name = name;
this.action = action;
}

public override void accept(ICarElementVisitor visitor)
{
visitor.visit(this);
}

public override string Name
{
get
{
return this.name; ;
}
}

public override string Action
{
get
{
return this.action; ;
}
}
}

public sealed class Car : CarBodyPart
{
ICarElement[] elements;
private string name;
private string action;

public Car()
{
this.name = "car";
this.action = "driving ";

this.elements = new ICarElement[]
{   new Wheel("front left wheel", "Kicking my "),
new Wheel("front right wheel", "Kicking my "),
new Wheel("back left wheel", "Kicking my ") ,
new Wheel("back right wheel", "Kicking my "),
new Body("Body", "Moving my "),
new Engine("Engine", "Starting my ")
};
}

public override void accept(ICarElementVisitor visitor)
{
foreach(ICarElement elem in elements)
{
elem.accept(visitor);
}
visitor.visit(this);
}

public override string Name
{
get
{
return this.name; ;
}
}

public override string Action
{
get
{
return this.action; ;
}
}
}

sealed class CarElementPrintVisitor:ICarElementVisitor
{
public void visit(CarBodyPart part)
{
Console.WriteLine("Visiting " + part.Name);
}
}

sealed class CarElementActionVisitor:ICarElementVisitor
{
public void visit(CarBodyPart part)
{
Console.WriteLine(part.Action + part.Name);
}
}

class EntryPoint
{
static void Main(string[] args)
{
ICarElement car = new Car();
car.accept(new CarElementPrintVisitor());
car.accept(new CarElementActionVisitor());


text:
#### logs Catalogue

days :1663
Table logs
date_time
user
message
2017-05-30 02:26:27
(luzpaz) http://phoronix.com/scan.php?page=news_item&px=Qt-5.9-RC2-Released
2017-05-30 03:04:53
phryk
"FreeCAD is still in the early stages of development" Is this still true, 14 years after the initial release?
2017-05-30 03:44:25
(kkremitzki) Well, the planned scope is pretty huge so in some sense I would say that's true... maybe a later stage of early
2017-05-30 05:03:13
dioz
yo
2017-05-30 05:03:27
dioz
any of you cnc guys know what the constant 3.82 is?
2017-05-30 05:03:39
dioz
ie. i wanna determine spindle speed
2017-05-30 05:04:07
dioz
so i 3.82 * 80(mild steel) /( 21/64)
2017-05-30 05:04:18
dioz
what is that constant?
2017-05-30 05:05:07
dioz
21/64 would be my drill size for a 3/8 fine thead
2017-05-30 05:05:17
dioz
tap size
2017-05-30 05:05:38
dioz
2017-05-30 10:16:38
(luzpaz) @sliptonic ^
2017-05-30 14:24:51
(kkremitzki) Testing $$\begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}$$
2017-05-30 14:31:45
(luzpaz) $$\begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & -1 \end{bmatrix}$$
2017-05-30 14:37:26
(luzpaz) I fear we may need to re-do the source integration database since it malfunctioning often. I put a lot of work associating fixes to tickets. Alas it may have all been in vain
2017-05-30 14:54:52
(kkremitzki) Hopefully not, that should be a last resort
2017-05-30 15:18:13
sliptonic
dioz: It's not really a constant. It converts the SFM (surface speed of the material) into inches at the same time it converts the diameter of the tool into the circumference.
2017-05-30 15:19:16
sliptonic
SFM is Surface FEET per minute so needs to be converted to inches.
2017-05-30 21:06:52
(abdullahtahiriyo) [[1 0 0] [0 1 0] [0 0 1]]
2017-05-30 21:07:05
(abdullahtahiriyo) which syntax does it use?
2017-05-30 21:07:27
(kkremitzki) LaTeX, you enclose it in double dollar signs
2017-05-30 21:09:17
(abdullahtahiriyo) Ok, so it supports LaTeX syntax. That is cool...
2017-05-30 21:10:36
(abdullahtahiriyo)
2017-05-30 21:10:36
(abdullahtahiriyo) R^2 =
2017-05-30 21:10:36
(abdullahtahiriyo) \left({\begin{array}{cc} c & s \end{array}}\right)
2017-05-30 21:10:36
2017-05-30 21:10:48
(kkremitzki) You need to wrap it in
2017-05-30 21:10:54
(kkremitzki) $$2017-05-30 21:11:52 FreeCADBot2 (abdullahtahiriyo)$$
2017-05-30 21:11:52
(abdullahtahiriyo) \begin{matrix}
2017-05-30 21:11:52
(abdullahtahiriyo) a & b \\
2017-05-30 21:11:52
2017-05-30 21:12:07
(abdullahtahiriyo) $$2017-05-30 21:12:07 FreeCADBot2 (abdullahtahiriyo) R^2 = 2017-05-30 21:12:08 FreeCADBot2 (abdullahtahiriyo) \left({\begin{array}{cc} c & s \end{array}}\right) 2017-05-30 21:12:08 FreeCADBot2 (abdullahtahiriyo) [full message: https://gitter.im/FreeCAD/FreeCAD?at=592dd250fa63ba2f76966062] 2017-05-30 21:13:13 FreeCADBot2 (abdullahtahiriyo)$$ R^2 =
2017-05-30 21:13:13
(abdullahtahiriyo) \left({\begin{array}{cc} c & s \end{array}}\right)
2017-05-30 21:13:13
(abdullahtahiriyo) \left(\begin{array}{cc} 1 & 0\ 0 & 1 \end{array}\right)
2017-05-30 21:13:13
2017-05-30 21:13:24
(abdullahtahiriyo) It looks nice!
2017-05-30 21:13:27
(abdullahtahiriyo) Thanks!
2017-05-30 21:13:55
(kkremitzki) Indeed, it's pretty nice to have LaTeX support in a chat
2017-05-30 21:15:08
(abdullahtahiriyo) \begin{alignedat}{3} 2017-05-30 21:15:08 FreeCADBot2 (abdullahtahiriyo) & \hskip8em &\diffp{\mathcal D}{t}& = â Ã \mathcal H & \hskip8em &\text{\rlap{(Loi de Faraday)}} \\[0.5ex] 2017-05-30 21:15:08 FreeCADBot2 (abdullahtahiriyo) & & \diffp{\mathcal B}{t}& = -â Ã \mathcal E & &\text{\rlap{(Loi d'AmpÃ¨re)}} \\[0.5ex] 2017-05-30 21:15:08 FreeCADBot2 (abdullahtahiriyo) [full message: https://gitter.im/FreeCAD/FreeCAD?at=592dd3050ba4d59763f7049b] 2017-05-30 21:15:27 FreeCADBot2 (AjinkyaDahale) are the KaTeX parse errors intentional? 2017-05-30 21:15:56 FreeCADBot2 (abdullahtahiriyo) It is me trying to push the boundaries... 2017-05-30 21:16:56 FreeCADBot2 (abdullahtahiriyo)\begin{aligned}
2017-05-30 21:16:57
2017-05-30 21:16:57
2017-05-30 21:16:57
2017-05-30 21:17:35
(kkremitzki) There's a preview tool available at https://khan.github.io/KaTeX/
2017-05-30 21:19:36
(abdullahtahiriyo) That is indeed a better way...
2017-05-30 21:50:16
XXCoder
as usual clients that add protocol makes a mess for people using proper protocol lool
2017-05-31 00:19:26
2017-05-31 01:28:21
2017-05-31 01:37:45
(sgrogan) @bblacey , if your bck from vacation can you look at this https://forum.freecadweb.org/viewtopic.php?f=4&t=17501&start=250#p175243 I think on OSX your probably detecting it from OCCT cmake but I think @abdullahtahiriyo has detected a FreeCAD flaw.
2017-05-31 01:38:30
(sgrogan) Also @vejmarie are you out theere?
2017-05-31 01:41:50
(bblacey) @sgrogan - sure, Iâll take a look. Also, Iâde be happy to add the AppImage âdeploy to Githubâ logic to Travis if you and @triplus want some help with that as well.
2017-05-31 01:42:57
(sgrogan) Well that would certainly be cool. I think but am not sure that Travis is building it sucessfully.
2017-05-31 01:44:05
(bblacey) From the logs - it looks like it is: +ls -lh ../out/FreeCAD-0.17.git201705252304.glibc2.17-x86_64.AppImage
2017-05-31 01:44:05
(bblacey)
2017-05-31 01:44:05
(bblacey) -rwxr-xr-x 1 travis travis 212M May 30 16:51 ../out/FreeCAD-0.17.git201705252304.glibc2.17-x86_64.AppImage
2017-05-31 01:44:05
(bblacey)
2017-05-31 01:45:37
(bblacey) But we build with both clang and gcc on linux so we should modify to only deploy on one, clang recommended. It should also respect the DEPLOY flag and adhere to the naming convention, all of which should be easy to do.
2017-05-31 01:47:26
(sgrogan) That's the one I uploaded today. The scipt deploys from the Ubuntu PPA trusty debs. So gcc. We don't need to re-package. An arguement could be made for a more immediate package, but the PPA is the best supported on Linux.
2017-05-31 01:47:57
(bblacey) For TBB, not sure I am following the problem/issue totally but you have to pass -DUSE_TBB:BOOL=ON to the OpenCascade cmake.
2017-05-31 01:50:54
(sgrogan) OCCT is being built with TBB, but FreeCAD isn't using it due to the the lack of the compiler definition. If I understand. @abdullahtahiriyo has been giving a tutorial. Even if FreeCAD is passed the _DHAVE_TBB=ON is passed.
2017-05-31 01:54:50
(sgrogan) Or is it a problem with the naming? You say _DUSE_TBB, I say DHAVE_TBB. I will check.
2017-05-31 01:56:14
(bblacey)
2017-05-31 01:56:15
(bblacey) USE_TBB Boolean flag Indicates whether TBB 3rd party is used or not. TBB stands for Threading Building Blocks, the technology of Intel Corp, which comes with different mechanisms and patterns for injecting parallelism into your application. OCCT remains parallel even without TBB product
2017-05-31 01:56:15
(bblacey)
2017-05-31 01:56:33
2017-05-31 02:19:18
(bblacey) @sgrogan - it does look like OCCT uses HAVE_TBB internally. For example, from
2017-05-31 02:19:18
(bblacey)
2017-05-31 02:19:31
(sgrogan) In OCCT 7.1 I see this "set (OpenCASCADE_WITH_TBB ON)" in OpenCASCADEConfigVersion.cmake
2017-05-31 02:22:21
(sgrogan) Ahh, these are the headers @vejmarie uses, so he has probably added to them and they are from OCCT, these are probably the upstream changes he's working on. I need to find his OCCT branch.
2017-05-31 02:26:19
(bblacey) Here? https://github.com/vejmarie?tab=repositories
2017-05-31 02:34:22
(sgrogan) somewhere here: https://github.com/vejmarie/occt-7/tree/parallel_step
2017-05-31 02:55:51
(sgrogan) Need to learn how this works [code}#ifdef HAVE_TBB
2017-05-31 02:55:51
(sgrogan) using namespace tbb;
2017-05-31 02:55:51
2017-05-31 06:27:56
(vejmarie) Yes i am back
2017-05-31 09:27:09
2017-05-31 12:41:14
(luzpaz) @sasobadovinac thx but i cant view it on this iPad. It returns: WebGL implementation must support at least 16 texture units
2017-05-31 12:46:14
(luzpaz) WB @vejmarie :+1:
2017-05-31 12:46:31
(vejmarie) thanks
2017-05-31 13:12:23
(luzpaz) Look at the 2nd result when throwing this in to google: qt5 touchpad pinch osx
2017-05-31 13:18:52
AndreeeCZ
hello all!
2017-05-31 13:19:05
AndreeeCZ
is there a way to produce a 'cut' or 'profile' view?
2017-05-31 13:19:26
AndreeeCZ
say you have an engine composed of various stuff and you want to see inside, how it all fits together
2017-05-31 13:21:28
AndreeeCZ
ok i found out its called 'section view'
2017-05-31 13:22:44
AndreeeCZ
is arch SectionPlane the thing?
2017-05-31 13:24:15
AndreeeCZ
http://www.khulsey.com/portfolioimages/engine-section-view-v6.jpg
2017-05-31 15:22:05
Almisuifre
Salutations \o/
2017-05-31 15:23:24
Amritpal
yorik, hi
2017-05-31 15:23:28
(luzpaz) Greets
2017-05-31 15:24:49
yorik
hi Amritpal
2017-05-31 15:25:38
Amritpal
yorik, Is there any work still pending which will be helpful in my GSoC project?
2017-05-31 15:26:59
yorik
Amritpal: from my point of view no. The task I gave you was actually more to get you fully "at home" in the internal working of the Rebar object
2017-05-31 15:27:12
yorik
so you will be able to easily modify it if needed
2017-05-31 15:27:26
(abdullahtahiriyo) @bblacey @sgrogan There seems not to be a problem at building OCCT. There seems to be a problem at building FC. The problem I think I have identified is that the OCCT include files that are used in FC use the HAVE_TBB preprocesor macro (not a cmake environment FLAG). However, the HAVE_TBB preprocesor macro is not set. There should be a way in FC's cmake to "read" from the cmake information generated by the OCCT build whether OCCT
2017-05-31 15:27:26
TBB or not, so as to set the HAVE_TBB preprocesor macro or not, so that the headers that are included in FC and the symbols that will be linked during compilation match.
2017-05-31 15:27:35
yorik
I think you did very well :) so I think you can start on your own project
2017-05-31 15:28:38
yorik
Amritpal: I would be very glad if you can pot as much as possible on the FreeCAD forum too, to let people follow the progresses
2017-05-31 15:29:06
yorik
because not many of them will go look at the BRLCAD dev log
2017-05-31 15:29:29
(abdullahtahiriyo) I do not know much of Cmake, but it would appear to me that the resulting cmake files from the OCCT compilation that are installed under the cmake library are the key. However, I have no idea how to bring those into play when compiling FreeCAD. In other words, what should be added to FC's cmake, so that this information is retrieved and the HAVE_TBB preprocesor macro set (or not) in accordance.
2017-05-31 15:29:33
(luzpaz) Yea, we love progress reports ;D
2017-05-31 15:29:43
yorik
also maybe we could setup a kind of weekly chat session with Bernd too
2017-05-31 15:31:04
Amritpal
yorik, okay I will put my all dev log on FreeCAD forum
2017-05-31 15:31:44
(luzpaz) @berndhahnebach ping
2017-05-31 15:31:54
Amritpal
yorik, by the way, I have posted the work which I have done in community bonding period.
2017-05-31 15:32:16
Amritpal
2017-05-31 15:33:42
Amritpal
yorik, I also have noticed one more thing in the FreeCAD like in the structural element having reinforcement, when I change the placement of the structural element its reinforcement is not moved with respect to the structural element. Is it a bug or I am missing something?
2017-05-31 15:34:48
(luzpaz) @abdullahtahiriyo thanks for your fantastic work on the bugtracker. Very much appreciated!
2017-05-31 15:37:01
yorik
Amritpal: No you are right. It's a problem we need to address.
2017-05-31 15:38:31
yorik
When its placement changes, the structure object should propagate the changes to all its included rebars
2017-05-31 15:40:18
(abdullahtahiriyo) @luzpaz I just fix bugs. You do the fantastic work keeping everything updated and pinging one and the other. I have said several times that FC is awesome because of the diversity of people and capabilities and the ability to work together. Let's make PDN roll ;)
2017-05-31 15:42:06
Amritpal
yorik, Yes, we need to add the placement of structural element to the rebar object placement. So, by doing this thing placement of the rebar object will also change w.r.t to structural element.
2017-05-31 15:42:15
yorik
@luzpaz @abdullahtahiriyo Agree! I am a bit behind in addressing all your pings luzpaz, but please continue! The tracker is really getting in much better shape
2017-05-31 15:45:27
yorik
Amritpal: yes that can be done in two locations: Either it is the structure that triggers a change to its rebars, or it's the rebar that triggers its own change when its host structure has changed.
2017-05-31 15:46:51
yorik
Amritpal: The thing is, we need to compare the struct placement before it is changed, with after it has changed, to get a "difference", that we can add to the rebar's placement
2017-05-31 15:49:02
Amritpal
yorik, I got it.:)
2017-05-31 15:49:11
(luzpaz) Yorik @abdullahtahiriyo thanks guys. I agree about diversity. Thanks for letting me know that the pings are not too disruptive. :+1:
2017-05-31 15:50:39
(abdullahtahiriyo) @luzpaz They are disruptive. They need be disruptive otherwise we would be happily thinking about that new feature and completely neglecting the bugs ;)
2017-05-31 15:51:32
yorik
Amritpal: I think I remember there was some beforePropertyChange() that could be used in Python Features... I'll have a look
2017-05-31 15:54:03
Amritpal
yorik, okay.
2017-05-31 15:55:46
(luzpaz) @sgrogan oinged you about https://github.com/UWP-Open-Source-Community/Documentation/issues/5#issuecomment-305209285
2017-05-31 15:58:46
(luzpaz) @abdullahtahiriyo LOL true
2017-05-31 16:13:43
(luzpaz) @yorikvanhavre ive been thinking, having a webhost that has shell access would only make things easier to make maintenance changes. And it would not add to the complexity of maintenance which i think is what folks are concerned about.
2017-05-31 16:16:17
(yorikvanhavre) @luzpaz the thing is, the webhost is handled by JÃ¼rgen, and I don't think he will want to change. Also I'm not sure I fully agree with you about "it would not add to the complexity of maintenance" ;)
2017-05-31 16:16:47
(luzpaz) Right now we have an issue with the source integration mantisbt plugin not working consistently because the initial import didnt go well. Kurt is troubleshooting it all via FTP and its difficult
2017-05-31 16:17:03
(yorikvanhavre) I know
2017-05-31 16:17:16
(yorikvanhavre) wiki maintenance is also annoying without phpbb
2017-05-31 16:17:27
(yorikvanhavre) without shell access i mean
2017-05-31 16:18:46
(luzpaz) it can get complex if we start doing more complex things voia the shell. But to read logs and execute commands all via ftp... thats prohibitive and time consuming. I understand though that there is a dependency jurgen
2017-05-31 16:20:34
(luzpaz) jurgen isnt involved though... so whats the problem with just finding a host that gives us more access ? (Beside the concern of complexity)
2017-05-31 16:21:23
(luzpaz) I sense there is a political issue
2017-05-31 16:22:50
(yorikvanhavre) well, you convince him, you convince me :)
2017-05-31 16:25:55
(luzpaz) @yorikvanhavre Sure, im willing to try :smile_cat: : How do i access him ?
2017-05-31 16:26:32
(yorikvanhavre) well I'm afraid the only way I know is sending him a PM on the forum...
2017-05-31 16:27:44
(kkremitzki) It would be nice to have shell access to the server but I think there are some intermediate steps that need to be taken before considering moving hosting providers
2017-05-31 16:28:37
(kkremitzki) Right now the FTP directories that make up freecadweb.org are in sort of a "unicorn server" state where everything working is highly dependent on, e.g. one-off fixes, configuration, etc., we saw issues related to this with the forum upgrade
2017-05-31 16:29:23
(kkremitzki) Now that all the apps that make up freecadweb are upgraded, the next stage is to make deployment repeatable, so that we could actually execute a move of hosting providers without a lot of pain
2017-05-31 16:30:01
(kkremitzki) A benefit to this is that doing it correctly means anyone who wants to contribute to the infrastructure can deploy a staging server with mostly empty test/stub databases and do things like fiddle with themes and plugins
2017-05-31 16:31:11
(kkremitzki) Even if we got a new hosting provider tomorrow, the move itself couldn't be executed without the risk of big downtime or unexpected side-effects
2017-05-31 16:31:36
(luzpaz) @kkremitzki awesome. How far are we from repeatable deployment?
2017-05-31 16:32:16
(yorikvanhavre) kkremitzki: to be totally honest with you, the more you go in that direction, the less I feel able to help and all the more all the weight of web maintenance is shifting to your shoulders only...
2017-05-31 16:32:19
(kkremitzki) BTW work on Buildbot continues, I'm testing with https://build.freecad.io right now, and also I found out the Blender project uses Buildbot as well and they have a really nice setup where you can see how much FreeCAD could do with Buildbot as well: https://builder.blender.org/
2017-05-31 16:33:13
(yorikvanhavre) I might be a bit of an old-fashion obsolete web person, though :D
2017-05-31 16:33:47
(kkremitzki) @luzpaz Well one big thing is cleaning up the backups to where we have sample DBs without, e.g. private messages, emails, etc, in them. Another thing is making a choice of technology for it all
2017-05-31 16:34:21
(kkremitzki) @yorikvanhavre I understand what you mean, but if it's done correctly, you should pretty much be able to do everything the same (i.e. just deploying with git-ftp could still work)
2017-05-31 16:34:43
(kkremitzki) another thing with that is that we would need infrastructure admin documentation. I spent a little time testing namespaces on the wiki but haven't been able to get them working
2017-05-31 16:35:04
(luzpaz) @yorikvanhavre last time jurgen interacted on the forum: Mon Oct 26, 2015 12:55 am
2017-05-31 16:35:36
(yorikvanhavre) @luzpaz: yeah i know :(
2017-05-31 16:36:00
(luzpaz) So what if he doesnt respond?
2017-05-31 16:36:05
(kkremitzki) I added a "Infrastructure" namespace on the wiki but it doesn't seem to be behaving correctly
2017-05-31 16:36:28
2017-05-31 19:24:26
(sasobadovinac) Does anyone have any knowledge on the books available in this Humble Bundle https://www.humblebundle.com/books/linux-book-bundle ?
2017-05-31 20:12:13
(sasobadovinac) @bblacey Don't you think it would make sense to use Travis Cron Jobs for AppImage builds if we do them on Travis?
2017-05-31 20:13:54
(sasobadovinac) They can be detected with "TRAVIS_EVENT_TYPE: cron", IMO running them weekly would be good enough
2017-05-31 20:14:06
2017-05-31 20:17:35
(sasobadovinac) @sgrogan What would be the commands in the terminal if you would build AppImage from PPA on a clean machine?
2017-05-31 20:37:35
(bblacey) @sasobadovinac - sounds reasonable. Iâm just offering to lend a helping hand so feel free to weigh in on the optimal deployment frequency here - https://forum.freecadweb.org/viewtopic.php?f=4&t=22606&p=176382#p176382
2017-05-31 20:45:17
(sasobadovinac) @bblacey It just sounds like it should not be that hard to do, but I did not try to make it yet :worried:
2017-05-31 21:04:50
(sgrogan) @sasa @bblacey We are already building the AppImage on Travis, look at the last lines of Travis.yml for the commands. We are not yet deploying. I think ideally we would build it if there was a PPA update from the last build, but a cron job run weekly is a good step forward.
2017-05-31 21:16:24
(bblacey) @sgrogan - I saw @triplusâ work to build the AppImage and will add the deploy logic that re-uses the travis helpers we built for the OS X deployments (very straight-forward). I will also only deploy on a cronjob as @saso recommended and schedule one cron per week unless others weigh in for a higher frequency on the forum. Sound right?
2017-05-31 21:18:50
(sgrogan) Sounds great I was deploying about every 2-3 weeks before the script broke. If we can prune the old ones that would also be cool. Right now there is an old one I've left before the PPA switched to OCCT 7.1 and broke netgen.
2017-05-31 21:19:51
(bblacey) the travis-helper scripts include a deploy. unless you want something different, I will set the prune to 1 - the same as the OS X builds.
2017-05-31 21:21:28
(sgrogan) If possible I like to leave the oldest one always, for those that need netgen. Same as I'm doing with Win. Would prune 2 do that?
2017-05-31 21:21:29
(sasobadovinac) cron jobs can be set to run monthly, weekly or daily
2017-05-31 21:21:44
(sasobadovinac) weekly seems ok to me for appimage
2017-05-31 21:22:48
(sasobadovinac) i was however thinking you would prefer to not make them from new travis builds but from ppa?
2017-05-31 21:22:54
(bblacey) prune keeps the last # builds but there is an âoptionalâ string search so we will just use a different name for the auto builds.
2017-05-31 21:25:51
(bblacey) @sasobadovinac - actually, doing it from PPA is a pretty good ideaâ¦ From a maintenance stand-point, it might be good to build and deploy from a single place. Once we have our own infrastructure, I imagine we will centralize so I can go either way. Personally, Iâm not familiar with the PPA infrastructure deploying to GitHub so maybe you could take that one if that is the direction we choose to go?
2017-05-31 21:26:46
(sasobadovinac) i was thinking it could also be faster and maybe less depended to build fails
2017-05-31 21:26:57
(sgrogan) @bblacey great. @sasso I have mixed feelings. If we use the PPA they align with Ubuntu so great for consistency. If we built from the Travis assets we could do it on every push. We'd need to add the PPA dependecies to Travis (like occt7.1 and eigen3) doing so would restrict the matrix we have now. Travis uses the oce from the trusty repo that's old. Better for CI I think.
2017-05-31 21:28:08
(sgrogan) Oh and I don't know how to build the AppImage without the existing debs
2017-05-31 21:29:22
(sasobadovinac) oooh, ok i misunderstood, i was thinking it would be just like (pseudo): if cron; install from PPA; build appimage; deploy
2017-05-31 21:29:43
(sasobadovinac) but if it is more complex then doing as we do now on travis is better
2017-05-31 21:31:19
2017-05-31 21:31:53
(sgrogan) No from the PPA that's what it is. We can build from Travis directly without the PPA. I think this means (psuedo) Build FreeCAD on Travis, create .debs, build AppImage, deploy
2017-05-31 21:33:24
(bblacey) Hmmm, I was just going to add the deploy logic for the app image that is already built on Travis - @triplusâ work with the aforementioned cron control/swtiches.
2017-05-31 21:34:46
(sgrogan) @bblacey This is all we need.:)
2017-05-31 21:38:40
(sgrogan) There is someone working on this on the OpenSuse build system too. https://forum.freecadweb.org/viewtopic.php?f=4&p=176382#p176272 The deployment form Travis is nice but I think providing the best CI for wmayer and yorik is most important. That's the main reason I don't deploy win from Appveyor until we have a working cache. To build locally for me it's just a double click.
2017-05-31 21:45:44
2017-05-31 21:46:05
(sasobadovinac) @sgrogan what do you mean by working cache?
2017-05-31 21:47:49
(sasobadovinac) IMO it never hurts to have some working backup CI methods as long as they don't represent to much trouble for us to create them
2017-05-31 21:48:46
(sgrogan) We don't use caching on Appveyor. I think keeping the build time short for the linux developers is more important than deploying from Appveyor and taking more time. Especially because it's so easy for me to do it manually. I can also look at self test failures and decide to deploy or not.
2017-05-31 21:50:44
2017-05-31 21:51:58
(sasobadovinac) crone jobs on travis run totally independent from PR / merge builds, it is why IMO they are a good fit for such things
2017-05-31 21:52:11
2017-05-31 21:53:29
(sasobadovinac) if a concern and if possible we can save that script in our git
2017-05-31 21:54:14
(sasobadovinac) as i understand it is now at appimage github?
2017-05-31 21:54:47
(sasobadovinac) i guess if they get hacked there will be bigger problems then just our deploy :smile:
2017-05-31 21:55:26
(sgrogan) I had a similar discussion with @triplus. the AppImage stuff all is on github, so it they could hack that they could hack us.
2017-05-31 21:55:36
(sasobadovinac) another way to do it is to check the yaml hash
2017-05-31 21:56:08
(sasobadovinac) but we will have to update the known hash if yaml gets updated
2017-05-31 21:57:18
(sgrogan) That would require more maintenance, recently the script broke and triplus made a pull request. You were faster to the same conclusion. I think it's OK I just value your opinion on the security stuff.
2017-05-31 22:00:10
(sasobadovinac) well the maintenance would give us the control over it
2017-05-31 22:03:33
(sgrogan) Would you mind posting your thoughts on the forum. We both seem to be arguing both sides of the same argument :smile:
2017-05-31 22:04:53
(sgrogan) I don't think we need to decide immediately
2017-05-31 22:10:27
(sasobadovinac) yes, i don't think it is an issue
2017-05-31 22:11:34
(sasobadovinac) and we can check how other projects have it setup
2017-05-31 22:12:00
(sasobadovinac) AppImage is getting quite popular
2017-05-31 22:18:07
(sgrogan) > AppImage is getting quite popular
2017-05-31 22:18:07
(sgrogan) I'm quite surprised. As a win guy I'm quite used to packing like this. Last time I counted I have 7 versions of Python on my system. I guess the convenience to overcome dependencies is just to great. From a packaging standpoint it's the best of both worlds. From the PPA we get all the sucurity updates for free and it's cross distro.
2017-05-31 22:21:31
(sgrogan) @luzpaz Thanks for the link. More OpenSource on win is a good thing.
2017-05-31 22:22:17
(sasobadovinac) As for security, personally I am waiting for all the os-es to become more like Qubes OS
2017-06-01 06:11:02
jhol
https://www.freecadweb.org/tracker/view.php?id=3061 - this is a weird one
2017-06-01 11:41:52
(abdullahtahiriyo) @kkremitzki
2017-06-01 11:42:03
2017-06-01 13:32:37
2017-06-01 16:04:18
(luzpaz) Looks like the gitter.im activity panel needs a restart
2017-06-01 16:29:38
2017-06-01 16:42:23
(abdullahtahiriyo) @luzpaz
2017-06-01 16:42:41
(abdullahtahiriyo) Not at all. That is a very interesting crash. I will give it a look
2017-06-01 16:42:51
(abdullahtahiriyo) later on
2017-06-01 16:43:41
2017-06-01 17:28:02
(abdullahtahiriyo) @kkremitzki
2017-06-01 17:28:05
2017-06-01 17:28:42
(kkremitzki) Let me take a look
2017-06-01 18:14:26
(kkremitzki) That change is interesting Abdullah, for my test case that allows mirroring w.r.t base planes but not the vertical/horizontal sketch axes
2017-06-01 18:15:12
(abdullahtahiriyo) Could you post your test (fcstd) case in the forum thread? @kkremitzki
2017-06-01 18:15:14
jhol
I encountered this bug doing some cad work on the daily build over the weekend
2017-06-01 18:15:23
jhol
really cool to see lots of interest in it
2017-06-01 18:15:54
(abdullahtahiriyo) @jhol it is the most annoying thing ever!
2017-06-01 18:16:30
jhol
abdullahtahiriyo: actually this one caused me more annoyance: https://freecadweb.org/tracker/view.php?id=3061#c9233
2017-06-01 18:16:59
jhol
-- though annoyance is the wrong word, because I'm very grateful for all the awesome work going on in FreeCAD
2017-06-01 18:19:21
(abdullahtahiriyo) @kkremitzki
2017-06-01 18:19:32
(kkremitzki) Hey
2017-06-01 18:19:35
(abdullahtahiriyo) I think I have tested your use case
2017-06-01 18:19:45
(abdullahtahiriyo) a sketch rectange
2017-06-01 18:19:49
(abdullahtahiriyo) 1x1
2017-06-01 18:19:54
(abdullahtahiriyo) coincident in the origin
2017-06-01 18:20:02
2017-06-01 18:20:03
(abdullahtahiriyo) mm
2017-06-01 18:20:31
(abdullahtahiriyo) Try trying to drag the origin coincident towards the side where your transformation is failing
2017-06-01 18:21:44
(kkremitzki) The transformation failing/being the incorrect one was actually because I had swapped the vertical/horizontal sketch lines I mentioned
2017-06-01 18:22:07
(kkremitzki) but putting it back to the way it was and mirroring works as expected.. so that's good to know more about where the bug really is
2017-06-01 18:22:38
(kkremitzki) I was kinda getting lost in the weeds so to speak with the quaternions and matrices, haha.. having heard of them but never used them before
2017-06-01 18:24:34
2017-06-01 18:24:55
(abdullahtahiriyo) With your lines swap (which I still think is a fix), it does not fail.
2017-06-01 18:25:16
(kkremitzki) Right, it wasn't failing, I just meant it was doing the incorrect mirroring
2017-06-01 18:25:46
(abdullahtahiriyo) Ah ok, but that is because we need to change the mesh not to invert and to correct X/Y, shouldn't we?
2017-06-01 18:26:45
(abdullahtahiriyo) What I mean, is that the mesh is wrong (two times wrong), not your fix with H/V. I think
2017-06-01 18:27:06
(kkremitzki) Right
2017-06-01 18:28:36
(kkremitzki) I suppose it makes sense for you to look at the sketcher/precision stuff so I could look at the viewprovider issue?
2017-06-01 18:28:45
(abdullahtahiriyo) If you feel like fixing the mesh, I will continue with the checkIntersection. I have been debugging it intermitently all the day long
2017-06-01 18:28:51
(abdullahtahiriyo) Perfect sync
2017-06-01 18:29:02
(abdullahtahiriyo) I will handle sketcher after the checkIntersection.
2017-06-01 20:37:54
(abdullahtahiriyo) @kkremitzki How do I trigger your unit test from FC Console?
2017-06-01 22:07:17
xavier_
Is there a way to make *everything* constrained to some degree?
2017-06-01 22:08:04
xavier_
Unless explicitly set - I keep accidentally moving things that I don't want to and just having that freehand move/rotate tool scares me
2017-06-01 22:18:45
(kkremitzki) @abdullahtahiriyo ./bin/FreeCAD --run-test TestPartDesignApp in build folder
2017-06-01 22:24:22
(abdullahtahiriyo) @kkremitzki ah ok, thanks!
2017-06-01 22:25:47
(kkremitzki) With Part::checkIntersection() returning true I have:
2017-06-01 22:25:48
(kkremitzki)
2017-06-01 22:25:48
(kkremitzki) FAIL: testMirroredCase (TestPartDesignApp.PartDesignMirroredTestCases)
2017-06-01 22:25:48
2017-06-01 22:28:03
(kkremitzki) So once you have a fix that volume comparison needs to be changed to >1.0.
2017-06-01 22:29:09
(kkremitzki) Really it'd be better if 2.0 worked but I believe the mirrored volume was like 1.99....8, like 2e-16 short of 2.0 or so
2017-06-01 22:29:25
(kkremitzki) If Volume == 2.0 worked that is
2017-06-01 22:39:57
(sgrogan) @kkremitzki , would a valid case be create a cube whose center is offset from the origin by some amount in x. Then mirror about the y-axis. Volume could be anywhere between 1, if the x offset was 0, and 2 if the offset put the edge at the y-axis?
2017-06-01 22:43:24
(kkremitzki) Yeah, that's definitely on a list of test cases for mirroring, although I was gonna do a slightly different scenario with a symmetric cube and check that the volume is ~ 1.0 in one case and ~2.0 in the other
2017-06-01 22:45:15
(kkremitzki) Not sure the easiest way to describe the cube but it'd have one corner at (-0.5, 0, 0) and the opposite corner at (0.5, 1, 1), so a mirror about YZ should give a volume of 1 and a mirror about XZ should be a volume of 2
2017-06-01 22:46:34
(sgrogan) Exactly, thanks for the work on this. The mirror feature is hard to test it's so confusing.
2017-06-01 22:46:59
(kkremitzki) No kidding, not only was it failing, but it was failing to report the failure correctly
2017-06-01 22:47:37
(abdullahtahiriyo) From console:
2017-06-01 22:47:39
(abdullahtahiriyo) import PartDesign
2017-06-01 22:47:51
(abdullahtahiriyo) import unittest
2017-06-01 22:48:06
2017-06-01 22:48:14
(abdullahtahiriyo) unittest.TextTestRunner().run(mysuite)
2017-06-01 22:50:52
(kkremitzki) So I have https://build.freecad.io set up to track pushes to https://github.com/kkremitzki/freecad and attempt a build with public viewing but build control behind a login (it could also be allowed to anyone in FreeCAD Github Org) although as you may see I haven't gotten the build environment set up correctly because the builds fail almost immediately
2017-06-01 22:51:51
(kkremitzki) One thing I wanted to ask about was having build config/recipes in the main repo or a separate one. Because Buildbot allows for it to be separated which might be nice, but the recipes are all in-repo currently. Anyone have any thoughts on this?
2017-06-01 22:52:37
(kkremitzki) Buildbot also allows for in-repo config using .bbtravis.yml files
2017-06-01 22:55:46
(sgrogan) We have this https://github.com/FreeCAD/FreeCAD-ports-cache . @bblacey let me post the libpacks for the AppVeyor builds here. It has different access rights than the main repo?
2017-06-01 23:09:30
(kkremitzki) Yeah, there can be per-repo access rights, e.g. I can merge the https://github.com/freecad/homepage repo. So a future FreeCAD/Buildbot repo could be worked on in a way that doesn't require any of Yorik or Werner's time
2017-06-01 23:10:32
(kkremitzki) Buildbot workers can be ran on Windows VMs (possible currently with the freecad.io servers) and if a Mac OS build server were available, on there too
2017-06-01 23:10:53
2017-06-01 23:10:57
(sgrogan) I don't know about conflicts but maybe the ports cache repo could morph into a packaging repo?
2017-06-01 23:13:00
(sgrogan) What are the linux .tar.bz2's?
2017-06-01 23:18:19
(abdullahtahiriyo) @kkremitzki the test passes even with self.failUnless(self.Mirrored.Shape.Volume < 0.0) or self.failUnless(3 < 1), either there is some kind of cache or it is the demonstration I suck a python. I wanted to know which volume the text thinks it has but no avail. Anyway, I will go back to checkIntersection
2017-06-01 23:28:50
(sgrogan) @kkremitzki is this relevant to the tolerance issues? https://dev.opencascade.org/index.php?q=node/1056
Logs go back to 2013-03-31 18:28:57


text:
The JavaZ project

# Geometrical drawing

## Creation tool: mathPoint

Drawing a gravitational Eiffel tower outline with massPoint & mathPoint tools.

 A gravitational Eiffel tower outline with massPoint & mathPoint tools
massPoint---mathPoint-------massPoint------------------mathPoint

All  mathPointsposition are calculated according to the massPoints coordinates on which they depend.

 Drag any massPoint , their belonged mathPoints will move accordingly. reset Reload the complete graphic

Compared with the first one (Episode #1: massPointtool), this layout has two types of points:

• 18 massPoints, gravity sensitive and draggable.
• 14  mathPoints. They are not gravity sensitive nor draggable. They can be defined as satellites of the massPoints.

## The mathPoint tool

A mathPoint is a dynamical point, not a physical object like massPoints . The mathPoint tool is essentially a drawing and rendering tool and belongs to pure geometry.

A mathPoint can be located:

• anywhere on a line or a curve passing through two massPoints. A mathPoint can also be implemented with a movement along its belonging line or curve.
• at any point of an area defined by three or four massPoints.
• at the exact intersection of two lines, each of these lines passing through two massPoints.

A mathPoint is not draggable by mouse or touch event. It depends entirely on its belonging massPoints.


text:
# Barry Glassner on food

Salon’s interview with Barry Glassner is really interesting. What’s nice is that he brings up the way in which the organic/healthy/no-trans-fat/etc food movement ignores the glaring issues of class (and race, reading between the lines) that are the real problem in our society. While it would be nice if we ate healthier, these healthy meals have to be affordable and efficient to those with the fewest resources (time and money) to spend on meals. I might get his book (from the library) to get more of the details.

(via Winnie’s post at get in my belly.)

# scaling laws as comedy

[Note : imagine B is from India.]

A: Oh my God!
B: What is it?
A: I just proved this great result!
B: Really???
A: Yeah, it’s an lower bound on the achievable rate!
B: So what is it?
A: Well my scheme shows it’s at least log! Log(N)!
B: Ok…
A: Isn’t that cool?
B: Seems a bit… low.
A: Well it’s not polynomial…
B: Hardly. Log(log(N))? You’ve got to be joking.
A: C’mon! Look, if you have a log, log(N) growth you can bootstrap that up to something better.
B: No you need to get rid of a log.
A: I did get rid of a log! It’s an improvement on Singh et al.
B: So it was log log log before?
A: No, log log.
A: Well it’s log log…
B: Exactly! Log log!
A: By log, do you…
B: Log log by log?
A: No, you have an extra two logs in there, it’s…
B: 1 by log? What the heck are you trying to prove!
A: It’s log! Log! Log!
B: I give up. Why don’t you come back when you’ve figured it it out. See if you can get it to log(N). [exits]

# new paper : deterministic list codes for state-constrained AVCs

It should be up on ArXiV later today…

A.D. Sarwate and M. Gastpar
Deterministic list codes for state-constrained arbitrarily varying channels
Submitted to IEEE Transactions on Information Theory
ArXiV cs.IT/0701146

The capacity for the discrete memoryless arbitrarily varying channel (AVC) with cost constraints on the jammer is studied using deterministic list codes under both the maximal and average probability of error criteria. For a cost function $l(\cdot)$ on the state set and constraint $\Lambda$ on the jammer, the achievable rates are upper bounded by the random coding capacity $C_r(\Lambda)$. For maximal error, the rate $R = C_r(\Lambda) – \epsilon$ is achievable using list codes with list size $O(\epsilon^{-1})$. For average error, an integer $\lsym(\Lambda)$, called the \textit{symmetrizability}, is defined. It is shown that any rate below $C_r(\Lambda)$ is achievable under average error using list codes of list size $L > \lsym$. An example is given for a class of discrete additive AVCs.

# yet another test

I can only hope that this Gaussian will appear:

\mathbb{P}(X \le x) = \int_{-\infty}^{x} \frac{1}{\sqrt{2 \pi}} \exp(- y^2/2) dy

How to do it:

1. Install the WP-Cache plugin. Note that you have to muck with file permissions and it’s somewhat non-intuitive.
2. Install the MimeTeX plugin.
3. Stress out about the fact that for some equations the terminating quote ” in the alt tag for the image has turned into a fancy quote. Come up with a hack involving placing an empty img tag right after every piece of LaTeX. Hope that you figure out a way around it.

# not again!

Since I only recently started reading ArXiV through my RSS aggregator, I was a unaware of the astonishing regularity with which “proofs” of polynomial-time algorithms for NP-complete problems are proposed. Most recent is this one, but one can find a more comprehensive list here. The latter page is a bit too unskeptical of the claims, since they say “so and so proved P=NP in this paper.” It’s not a proof if it’s wrong, and pretty much all of these proofs have been shown to be wrong. But it might be an interesting exercise one week for some reading group or topics class to formally prove some of these guys wrong. Of course, for every person claiming a proof that P=NP there is another person ready to knock them down and claim that P!=NP. Maybe it’s just a little self-correcting mechanism in the ArXiV.

# one thing that xmh got right

At MIT I used the xwindows program xmh to read my email. It was a pretty bare-bones program, but had one really great feature. Instead of having to drag a message to a folder to refile it, you could just right-click on the folder title and it would mark it as beign destined for there. Then you could commit all of the moves in one fell swoop. Neither GMail nor Thunderbird nor Mail.app seem to have this feature, which I regarded as a genius piece of interface in what was otherwise a pretty ugle program, all told. Maybe I’m the only one who got a lot of mileage out that feature, but I can’t help but think that our modern mail clients are missing something.

# maximum versus maximal

So I know I learned this at one point, but I can’t rederive the logical argument explaining when to use the words “maximal” and “maximum.” Certainly maximum is both an adjective and a noun, and maximal is just an adjective.

One explanation I remember was that there can be many maximal things, but only one maximum thing. I know that you call it a maximal ideal in algebra, and it need not be unique (unless it’s a local ring?), but then why say “local minima” if a minimum is unique?

I just noticed I’m a bit inconsistent in my usage in this paper I’m writing, and I can’t tell if I should call it the “maximum probability of error criterion” or the “maximal probability of error criterion.” I was leaning to the former, but now thinking about it has got me all muddled.

# IEEEtran BibTeX annoyance

I’m busy as a bee writing two papers for ISIT 2007 (in Nice, woohoo!) and as usual I find myself at odds with the IEEE Transactions style formats. The BibTeX format by default puts the bibliography in order of how references are cited, and as far as I can tell there is no option for putting things in alphabetical order. One option is of course to use the \nocite command before any of the other text. This will put the citations in the bibliography without anything in the main text — a handy feature for sneaking in references that you don’t need but should cite (perhaps to appease reviewers). But that hack defeats the purpose of BibTeX, which is to stop you from futzing with your bibliography by formatting the thing in the correct manner, be it APA, MLA, ACM, or IEEE.

I understand that for a survey paper it would be advantageous to list references in the order that they are cited. That way all the papers on topic A will be in a big block together in the bibliography, and the cite package provides a nice shorthand that will list the references as [1 – 5] instead of [1][2][3][4][5]. For conference papers, which often have fewer than 10 citations, it seems that the aesthetic benefits of an alphabetized bibliography outweigh the minor inconvenience in typesetting. From looking at existing published papers, it seems that the IEEE isn’t particularly insistent on making the bibliography in citation-order. So why not provide the alphabetical option?

Perhaps its because the entire LaTeX package system is being maintained by Michael Shell, who I’m sure has better things to do with his time, like a real job. It almost boggles the mind that so many people in the IEEE use this LaTeX package and the Institute doesn’t really support it in the way that the AMS supports AMSTeX.

# HD-DVD copy protection

Apparently the HD-DVD copy protection system has been compromised. Is this really a big surprise? I mean, if you actually go and talk to the engineers who designed AACS, would they think it’s totally unbreakable? Behind all the PR and marketing hacks who don’t know the first thing about cryptography are the people who actually designed this system, and I’m sure they would list a load of standard caveats like “assuming a bounded-complexity adversary” But even then, perhaps twixt design and implementation someone screwed up and weakened the protections.

The whole approach to copy-protecting media via controlling the hardware is a little odd to me. Its like having a secret decoder ring made of a piece of red cellophane. If you make a media format which is useful for carrying data and holding movies, you’re inviting attacks far more complicated than those envisioned by scenarios in which you have an average user buying a player and plugging it into their TV. Is it really that the design specs were for the latter and didn’t even think about what would happen if someone popped the disc into their computer?

Personally, I thnk these guys knew it would happen all along and were surprised at how little time it took. The truth is probably that people in the company who were ignorant of the technology ended up approving something that was a lot weaker than it should have been, and not that the guy who hacked the standard was somehow a super-genius. This is not to take away from his accomplishment, but it seems like you can either build a watertight security system or one that leaks like a sieve, and this is more of the latter.