Re: [go-nuts] go process memory limits and gurantees

2016-08-08 Thread Aram Hăvărneanu
On Sun, Aug 7, 2016 at 4:37 AM, gaurav  wrote:
> Please let me know if there is something I have missed to read regarding
> this or if there is already a way to achieve this?


There is not.

-- 
Aram Hăvărneanu

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: Server TCP

2016-08-08 Thread Nathan Kitchen
It's probably already clear from Freddy's response, but...try substituting
"packet" for "package". Both words can be translated into Spanish as
"paquete", so a native Spanish speaker might easily swap them.

-- Nathan

On Thu, Aug 4, 2016 at 3:18 PM,  wrote:

> The login package is a message that the device sends to the server to
> request a connection, for example, the device send 0001 to the server, to
> start the communication and the server answer would be 1002 telling to the
> device that they are connected, now the data sharing can start
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: [ANN] Pixiecore, simple all-in-one netbooting

2016-08-08 Thread Jim Dennis
 David,

 Thanks for the fast response.  I have, since writing that, confirmed that I
 can boot at least one of these systems (Lenovo ThinkPad T410) using
 pixiecore (running on my Mac laptop) when both systems are connected
 to my home router (which, of course, provides DHCP).

 So that works.  I'd like to suggest that you make this point more clear in
 the README.md file (I can provide a pull request if you like).  Another
 possibility might be for you to add an option to pixiecore, perhaps built
 on an compile time option to link to https://github.com/krolaw/dhcp4 ...
 Richard Warburton's DHCP library (client and server support) written
 in Go(lang).

 The other option I'm considering is Astralboot:
 https://github.com/zignig/astralboot which seems to include the DHCP
 server ... but which requires IPFS for the file distribution services.

 I'll test those and write up my recommendations for my boss.


On Mon, Aug 8, 2016 at 11:43 AM, David Anderson  wrote:

> On Sun, Aug 7, 2016 at 5:11 PM,  wrote:
>
>>
>>  David,
>>
>>  I'm confused by one part of this ...
>>
>> On Monday, September 14, 2015 at 8:18:23 PM UTC-7, David Anderson wrote:
>>
>>  ...
>>
>> Of note is that Pixiecore does *not* require replacing or changing your
>>> existing DHCP server. Instead, Pixiecore uses a feature of the PXE spec
>>> (very poorly named "ProxyDHCP" - it's not a proxy, and it's barely DHCP) to
>>> complement the normal DHCP network configuration with PXE configurations
>>> for eligible clients, without directly interacting with the network's main
>>> DHCP server. Your non-PXE clients and your regular DHCPd are completely
>>> unaware of Pixiecore and don't need any reconfiguration.
>>>
>>>
>>  ... if I'm reading correctly then it sounds like you're saying that
>> 'pixiecore' is NOT a DHCP server.  That it's able to piggyback on DHCP
>>  traffic (on a segment, within a given ethernet broadcast/collision
>> domain) to provide additional configuration data (using this "ProxyDHCP"
>> feature/spec.) which a PXE client can use for just the TFTP fetch
>> (bootloader -> kernel + initrd/initramfs chains)?
>>
>>  If that's the case then, I guess it's necessary to have a separate DHCP
>> server on the network already?
>>
>
> That's correct. ProxyDHCP allows a third-party server to provide _just_
> network booting information, while the network's primary DHCP server
> provides network configuration. The idea being that you can run Pixiecore
> on an existing DHCP-managed network without changing any other
> configurations.
>
> While at this point I probably know enough of DHCP to implement full DHCP
> support as well... I'm a bit resistant to doing so, because really good
> DHCP support is a huge can of worms in terms of supporting buggy
> implementations, and I'd much rather point people to dnsmasq if they need a
> quick and dirty DHCP server :).
>
>
>>  (I've tried setting up multiple PXE clients on cross-over cables to my
>> MacOS X (10.11.5) running 'pixiecore' 
>> (fc0d895c19e7c6a31f9d3b8ad5c8967d7285ef87
>> from Feb 28, 2016) and the "tinycorelinux" configuration as described in
>> the github
>>  pages.  When running it I get messages like:
>>
>> [ProxyDHCP] Couldn't find an IP address to use to reply to
>> f0:de:f1:3b:b9:65: interface en5 has no usable unicast addresses
>>
>> [ProxyDHCP] Offering to boot f0:de:f1:3b:b9:65 (via 172.17.17.1)
>>
>> [ProxyDHCP] Responding to f0:de:f1:3b:b9:65: write udp4 0.0.0.0:67->
>> 255.255.255.255:68: sendmsg: network is unreachable
>>
>>
>>  ... after having statically configure the en5 (thunderbolt connect
>> ethernet cable to the other systems (I've tried four different systems, at
>> least two of which I've PXE booted into Linux using the traditional
>> ISC/Linux tools and configuration in the past).  I've done this with and
>> without ethernet cross-over cabling (many ethernet adapters know support
>> auto-MDI crossing) and I've done with direct and through an old, simple,
>> Netgear switch ... but always with no DHCP server on that segment!
>>
>
> The initial error you're getting is that Pixiecore can't find a usable
> source IP address on en5. It needs that address to transmit the ProxyDHCP
> response. Do you have any IPs configured on en5?
>
>
>>  I'll try again with a DHCP server to see if that works.  But you might
>> make it clear in the docs if 'pixiecore' REQUIRES a separate DHCP server,
>> or perhaps add an option to detect and optionally provide DHCP services.
>>
>
> Are you connecting your machine directly to a system that you need to
> boot? If that's the case, you'll run into a separate issue if you try to
> run both Pixiecore and a DHCP server on the same machine, which is that
> they both want to bind to the DHCP server port, and so one of them will
> fail. I have a working solution for that on linux using some raw socket
> trickery, but since I have no macs, I don't have an answer for your setup
> yet :(.
>
> The closest thing to an 

[go-nuts] Go 1.7 Release Candidate 6 is released

2016-08-08 Thread Chris Broadfoot
Hello gophers,

We have just released go1.7rc6, a release candidate for Go 1.7.
Some say that it's the best one yet.
It is cut from release-branch.go1.7 at the revision tagged go1.7rc6.

Please help us by testing your Go programs with the release, and
report any problems using the issue tracker:
  https://golang.org/issue/new

You can download binary and source distributions from the usual place: 
  https://golang.org/dl/#go1.7rc6

To find out what has changed in Go 1.7, read the draft release notes:
  https://tip.golang.org/doc/go1.7

Documentation for Go 1.7 is available at:
  https://tip.golang.org/
  
A comprehensive list of changes since rc5 is here:
  https://github.com/golang/go/compare/go1.7rc5...go1.7rc6
  
We plan to issue Go 1.7 in a week's time (August 15).

Cheers,
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: How to create reusable HTML components using default html/template package

2016-08-08 Thread Paulo Janeiro
I'm using html/template already.
I'm able to parse my templates dynamically but my approach doesn't seems to 
be the best to handle dozens of different templates that can be used inside 
N different combinations, especially because I want to cache them and not 
to have to parse those combination every time I render that view.
For example, I have this code:

func extractFileNames () (templateFileNamesFull []string) {
files, _ := ioutil.ReadDir("./views")   
 
for _, f := range files {   

if strings.Contains(f.Name(), ".html") {   
 
templateFileNamesFull = append(templateFileNamesFull, "views/" + 
f.Name())   
}
}
return templateFileNamesFull   
 
}


var Templates = template.Must(template.ParseFiles(extractFileNames()...)) 

This works great WITHOUT layouts/components, because using components make 
me have N of these combinations, instead of just one "Templates" variable 
with all posed templates:

t1.ParseFiles("boilerplate.html", "page1.html")
...
tN.ParseFiles("boilerplate.html", "pageN.html")

AFAIK with GO I can't create dynamic variables like "template1",..., 
"templateN" thus making this road not the best one for what I want.

So,  as a newcomer to this language and with some homework done, my 
question is if there are some best practices for using these small 
components or is it something that makes the use of a Web Framework 
necessary?


On Monday, August 8, 2016 at 7:09:48 PM UTC+1, parais...@gmail.com wrote:
>
> Use the html/template package . It's a good idea to go through the 
> documentation of the standard lib once and to see what packages it 
> provides. In fact, with Go the knowledge of the std lib is as important 
> knowing any other  features of the language. 
>
> Le dimanche 7 août 2016 23:51:05 UTC+2, Paulo Janeiro a écrit :
>>
>> Coming from another language, I'm starting to port a web app to Go using 
>> default packages to test-drive it but I couldn't find any 
>> standard/recommended way of using pre-defined HTML components that I could 
>> use in HTML pages and inside other components.
>>
>> Specifically, is there a recommended pattern on how to use a component 
>> inside another component inside another component passing data to each one 
>> in a transparent way?
>> As far as I understand Go differentiates itself from other languages 
>> because you don't need to use a Web framework and rather use default 
>> API/middleware. But when it comes to reusable templates/components (and 
>> also layouts) I don't see an immediate  parallel.
>>
>> Could someone point me in the correct direction?
>> Thanks.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: [ANN] Pixiecore, simple all-in-one netbooting

2016-08-08 Thread David Anderson
On Sun, Aug 7, 2016 at 5:11 PM,  wrote:

>
>  David,
>
>  I'm confused by one part of this ...
>
> On Monday, September 14, 2015 at 8:18:23 PM UTC-7, David Anderson wrote:
>
>  ...
>
> Of note is that Pixiecore does *not* require replacing or changing your
>> existing DHCP server. Instead, Pixiecore uses a feature of the PXE spec
>> (very poorly named "ProxyDHCP" - it's not a proxy, and it's barely DHCP) to
>> complement the normal DHCP network configuration with PXE configurations
>> for eligible clients, without directly interacting with the network's main
>> DHCP server. Your non-PXE clients and your regular DHCPd are completely
>> unaware of Pixiecore and don't need any reconfiguration.
>>
>>
>  ... if I'm reading correctly then it sounds like you're saying that
> 'pixiecore' is NOT a DHCP server.  That it's able to piggyback on DHCP
>  traffic (on a segment, within a given ethernet broadcast/collision
> domain) to provide additional configuration data (using this "ProxyDHCP"
> feature/spec.) which a PXE client can use for just the TFTP fetch
> (bootloader -> kernel + initrd/initramfs chains)?
>
>  If that's the case then, I guess it's necessary to have a separate DHCP
> server on the network already?
>

That's correct. ProxyDHCP allows a third-party server to provide _just_
network booting information, while the network's primary DHCP server
provides network configuration. The idea being that you can run Pixiecore
on an existing DHCP-managed network without changing any other
configurations.

While at this point I probably know enough of DHCP to implement full DHCP
support as well... I'm a bit resistant to doing so, because really good
DHCP support is a huge can of worms in terms of supporting buggy
implementations, and I'd much rather point people to dnsmasq if they need a
quick and dirty DHCP server :).


>  (I've tried setting up multiple PXE clients on cross-over cables to my
> MacOS X (10.11.5) running 'pixiecore' 
> (fc0d895c19e7c6a31f9d3b8ad5c8967d7285ef87
> from Feb 28, 2016) and the "tinycorelinux" configuration as described in
> the github
>  pages.  When running it I get messages like:
>
> [ProxyDHCP] Couldn't find an IP address to use to reply to
> f0:de:f1:3b:b9:65: interface en5 has no usable unicast addresses
>
> [ProxyDHCP] Offering to boot f0:de:f1:3b:b9:65 (via 172.17.17.1)
>
> [ProxyDHCP] Responding to f0:de:f1:3b:b9:65: write udp4 0.0.0.0:67->
> 255.255.255.255:68: sendmsg: network is unreachable
>
>
>  ... after having statically configure the en5 (thunderbolt connect
> ethernet cable to the other systems (I've tried four different systems, at
> least two of which I've PXE booted into Linux using the traditional
> ISC/Linux tools and configuration in the past).  I've done this with and
> without ethernet cross-over cabling (many ethernet adapters know support
> auto-MDI crossing) and I've done with direct and through an old, simple,
> Netgear switch ... but always with no DHCP server on that segment!
>

The initial error you're getting is that Pixiecore can't find a usable
source IP address on en5. It needs that address to transmit the ProxyDHCP
response. Do you have any IPs configured on en5?


>  I'll try again with a DHCP server to see if that works.  But you might
> make it clear in the docs if 'pixiecore' REQUIRES a separate DHCP server,
> or perhaps add an option to detect and optionally provide DHCP services.
>

Are you connecting your machine directly to a system that you need to boot?
If that's the case, you'll run into a separate issue if you try to run both
Pixiecore and a DHCP server on the same machine, which is that they both
want to bind to the DHCP server port, and so one of them will fail. I have
a working solution for that on linux using some raw socket trickery, but
since I have no macs, I don't have an answer for your setup yet :(.

The closest thing to an answer I have is to make sure you connect both the
machine running Pixiecore and the system you're trying to boot to an
ethernet broadcast domain that already has DHCP services provided by some
other machine. I'm very much aware that this isn't great, and I'll now go
off and think about how to improve that.

- Dave


>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Why is reflect.ValueOf(nil map).Interface() != nil?

2016-08-08 Thread Steven Blenkinsop
Perhaps for clarity, the trip through reflect is a red herring. All you
need is to put the map in an interface:

package main
>
> import (
> "fmt"
> )
>
> func main() {
> var m map[string]interface{}
> if m != nil {
> panic("m != nil")
> }
> var i interface{} = m
> if i == nil {
> // I expect this.
> fmt.Println("OK")
> } else {
> // This is what happens.
> fmt.Printf("nil != %# v\n", i)
> }
> // output:
> // nil != map[string]interface {}(nil)
> }
>

The reason the interface is non-nil in this case is described in Ian's link.

On Mon, Aug 8, 2016 at 1:27 PM Ian Lance Taylor  wrote:

> On Mon, Aug 8, 2016 at 10:07 AM, Sam Salisbury 
> wrote:
> > The code speaks for itself, I thought I was understanding reflection up
> > until this point... It seems that the zero value of maps is nil, until
> you
> > round-trip them to a reflect.Value, and they become non-nil.
>
> This is an instance of https://golang.org/doc/faq#nil_error .
>
> Ian
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Re: How to create reusable HTML components using default html/template package

2016-08-08 Thread Marvin Renich
* Paulo Janeiro  [160808 11:14]:
> I understand what your point, but I'm just trying to see if this is 
> something easy to do by myself or if I should start looking into a framework
> Nevertheless, I'm using Phoenixframework (Elixir).
> Here we could define a layout that is made of componentes (pre-built 
> templates). Data is passed when you insert templates (components):
> 
> 
> 
> 
> 

Would the html/template package do what you want?

...Marvin

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] net/http and static binaries

2016-08-08 Thread Seb Binet
On Mon, Aug 8, 2016 at 5:12 PM, Ian Lance Taylor  wrote:

> On Sun, Aug 7, 2016 at 7:08 PM, Amit Saha  wrote:
> >
> > From an old thread [1], I learned that CGO_ENABLED=0 will create static
> > binaries for programs using the net/http package. I still see the same
> > behavior as of go version go1.6.3 linux/amd64. Does this mean this is the
> > only way to get statically linked binaries for programs using net/http?
>
> It is a simple way that works.  Why do you want another way?
>
> The issue is not actually the net/http package, it's the net package.
> The net package is designed to fall back to the C library for DNS
> lookups in some cases.  Setting CGO_ENABLED=0 disables that fallback,
> and the net package will use pure Go code for DNS (which it does in
> most cases anyhow).
>

If I am not mistaken, you can achieve the same with the somewhat clearer
"netgo" build tag:

$ cat main.go
package main

import (
"net"
"log"
)

func main() {
c, err := net.Dial("tcp", "localhost:4000")
if err != nil {
log.Fatal(err)
}
defer c.Close()
c.Write([]byte("hello"))
}

$ go build -tags=netgo -o netgo main.go
$ go build -o netcgo main.go

$ ldd netcgo
linux-vdso.so.1 (0x7ffc8c729000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x7f6cb60bd000)
libc.so.6 => /usr/lib/libc.so.6 (0x7f6cb5d1f000)
/lib64/ld-linux-x86-64.so.2 (0x7f6cb62da000)

$ ldd netgo
  not a dynamic executable

-s

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: How to create reusable HTML components using default html/template package

2016-08-08 Thread Paulo Janeiro
I understand what your point, but I'm just trying to see if this is 
something easy to do by myself or if I should start looking into a framework
Nevertheless, I'm using Phoenixframework (Elixir).
Here we could define a layout that is made of componentes (pre-built 
templates). Data is passed when you insert templates (components):








<%= render FabricaASA.ComponentView, "clientInfo.html",

clientInfo_isMobileiPad: nil,
clientInfo_smallScreenWidth: "750"
%>


<%= if get_flash(@conn, :info) do %>

<%= get_flash(@conn, :info) %>


setTimeout(function(){
$(".comp.alert.info").css("opacity", "0")
}, 3000);

<% end %>
<%= if get_flash(@conn, :error) do %>
<%= get_flash(@conn, :error) 
%>
<% end %>


<%= render FabricaASA.ModuleView, "headerASA.html", conn: @conn,

header_class: nil,
header_id: nil,
header_posit: nil,
header_dimen: nil,
header_mainStyle: nil,
header_effect: "onTop"
%>


<%= render @view_module, @view_template, assigns %>





<%= render FabricaASA.ModuleView, "footer.html",
footer_class: nil,
footer_id: nil,
footer_tooltip: nil
%>


">
<%= render FabricaASA.ModuleView, "importJs.html" %>





Code inside "Page content" is what is shown depend ending on the route.
Each component can be made of other componentes (templates):


style=" position: absolute;
top: 0px;
left: 0px;
z-index: 50;
width: 100%;
<% end %>">
   
 

<%= if @conn.request_path == "/" do %> 

<%= render FabricaASA.ComponentView, "menuButton.html",
conn: @conn,
menuButton_id: "1",
menuButton_class: nil,
menuButton_posit: nil,
menuButton_dimen: "flex: 1.5 0 90px",
menuButton_mainStyle: "visibility: hidden", 
  #...hides the element but keep it there to occupy its space
menuButton_hiddenElement: ".header.firstChild.bottom",
menuButton_marginDown: "70px",
menuButton_marginTime: "0.6s",
menuButton_slideTime: "slow",
menuButton_slideEasing: nil,
menuButton_effect: "push",
menuButton_maniElem: ".vpage.main"
%> 
   
<%= else %>
<%= render FabricaASA.ComponentView, "menuButton.html",
conn: @conn,
menuButton_id: "1",
menuButton_class: nil,
menuButton_posit: nil,
menuButton_dimen: "flex: 1.5 0 90px; height: 100%",
menuButton_mainStyle: nil,
menuButton_hiddenElement: ".header.firstChild.bottom",
menuButton_marginDown: "70px",
menuButton_marginTime: "0.6s",
menuButton_slideTime: "slow",
menuButton_slideEasing: nil,
menuButton_effect: "push",
menuButton_maniElem: ".vpage.main"
%> 
<% end %>
<%= render FabricaASA.ComponentView, "button.html",
button_id: "1",
button_class: "tooltip",
button_posit: nil,
button_dimen: "flex: 1 0 50px",
button_mainStyle: nil,
button_script: 'hopscotch.startTour(tour)',
button_imgPath: "/images/helpwhite.svg",
button_width: "30px",
button_height: "30px",
button_tooltip: "Ver tour explicativo de novo",
button_label: nil,
button_linkURL: nil,
button_effect: "aux"
%> 
   
<%= render FabricaASA.ComponentView, "textBlock.html",
textBlock_id: nil,
textBlock_class: nil,
textBlock_posit: nil,
textBlock_dimen: "height: 100%; flex: 2 1 15px",
textBlock_title: "Right Item",
textBlock_text: nil,
textBlock_hType: "5",
textBlock_effect: nil,
textBlock_mainStyle: "visibility: hidden",
textBlock_titleStyle: nil,
textBlock_textStyle: nil
%>


   
  
<%= unless @conn.request_path == 
"/polPrivLight" do %>
<%= render 

Re: [go-nuts] net/http and static binaries

2016-08-08 Thread Ian Lance Taylor
On Sun, Aug 7, 2016 at 7:08 PM, Amit Saha  wrote:
>
> From an old thread [1], I learned that CGO_ENABLED=0 will create static
> binaries for programs using the net/http package. I still see the same
> behavior as of go version go1.6.3 linux/amd64. Does this mean this is the
> only way to get statically linked binaries for programs using net/http?

It is a simple way that works.  Why do you want another way?

The issue is not actually the net/http package, it's the net package.
The net package is designed to fall back to the C library for DNS
lookups in some cases.  Setting CGO_ENABLED=0 disables that fallback,
and the net package will use pure Go code for DNS (which it does in
most cases anyhow).

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: IDE for GOLANG

2016-08-08 Thread luke
http://goclipse.github.io/

kritika...@indiamart.com於 2016年8月2日星期二 UTC+8下午8時25分21秒寫道:
>
> Hi, 
> is there IDE for creating a web service in GOLANG by using Revel framework 
>  which follows MVC architecture.
>
> i am using Ubuntu ..
>
>
>
> *Watch our latest TV Commercial #IndiaKiKhoj 
> *
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: [ANN] Pixiecore, simple all-in-one netbooting

2016-08-08 Thread jimd

 David,

 I'm confused by one part of this ...

On Monday, September 14, 2015 at 8:18:23 PM UTC-7, David Anderson wrote:

 ... 

Of note is that Pixiecore does *not* require replacing or changing your 
> existing DHCP server. Instead, Pixiecore uses a feature of the PXE spec 
> (very poorly named "ProxyDHCP" - it's not a proxy, and it's barely DHCP) to 
> complement the normal DHCP network configuration with PXE configurations 
> for eligible clients, without directly interacting with the network's main 
> DHCP server. Your non-PXE clients and your regular DHCPd are completely 
> unaware of Pixiecore and don't need any reconfiguration.
>
>
 ... if I'm reading correctly then it sounds like you're saying that 
'pixiecore' is NOT a DHCP server.  That it's able to piggyback on DHCP
 traffic (on a segment, within a given ethernet broadcast/collision domain) 
to provide additional configuration data (using this "ProxyDHCP" 
feature/spec.) which a PXE client can use for just the TFTP fetch 
(bootloader -> kernel + initrd/initramfs chains)?

 If that's the case then, I guess it's necessary to have a separate DHCP 
server on the network already?

 (I've tried setting up multiple PXE clients on cross-over cables to my 
MacOS X (10.11.5) running 'pixiecore' 
(fc0d895c19e7c6a31f9d3b8ad5c8967d7285ef87 from Feb 28, 2016) and the 
"tinycorelinux" configuration as described in the github
 pages.  When running it I get messages like:

[ProxyDHCP] Couldn't find an IP address to use to reply to 
f0:de:f1:3b:b9:65: interface en5 has no usable unicast addresses

[ProxyDHCP] Offering to boot f0:de:f1:3b:b9:65 (via 172.17.17.1) 

[ProxyDHCP] Responding to f0:de:f1:3b:b9:65: write udp4 
0.0.0.0:67->255.255.255.255:68: sendmsg: network is unreachable


 ... after having statically configure the en5 (thunderbolt connect 
ethernet cable to the other systems (I've tried four different systems, at 
least two of which I've PXE booted into Linux using the traditional 
ISC/Linux tools and configuration in the past).  I've done this with and 
without ethernet cross-over cabling (many ethernet adapters know support 
auto-MDI crossing) and I've done with direct and through an old, simple, 
Netgear switch ... but always with no DHCP server on that segment!

 I'll try again with a DHCP server to see if that works.  But you might 
make it clear in the docs if 'pixiecore' REQUIRES a separate DHCP server, 
or perhaps add an option to detect and optionally provide DHCP services.


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] net/http and static binaries

2016-08-08 Thread Amit Saha
Hi all,

>From an old thread [1], I learned that CGO_ENABLED=0 will create static 
binaries for programs using the net/http package. I still see the same 
behavior as of go version go1.6.3 linux/amd64. Does this mean this is the 
only way to get statically linked binaries for programs using net/http?

[1] https://groups.google.com/forum/#!topic/golang-nuts/Rw89bnhPBUI

Thanks,
Amit.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Call for Participation - Communicating Process Architectures 2016

2016-08-08 Thread Kevin Chalmers

|  |
|Communicating Process Architectures (CPA) 2016|
|  |
|  The 38th. WoTUG Conference on Concurrent and Parallel Systems   |
|  |
|  Sunday (evening) 21st. - Tuesday (afternoon) 23rd. August 2016  |
|  |
|  http://www.wotug.org/cpa2016/ 

 >
   
|
|  |
|  Host institute: Niels Bohr Institute, University of Copenhagen  |
|  |



This is the second *Call for Participants* for CPA 2016.  CPA is
concerned with concurrency at all scales.  It aims to bridge the gap
between the mathematical theory of concurrency and its practical
application to the design, implementation and validation of parallel
applications for embedded, multicore and distributed computing systems.
Further information on the themes for CPA can be found in the Call for
Papers (now closed):

  http://www.wotug.org/cpa2016/call.shtml 


NEW IN THIS CALL:

  * The programme schedule is now posted at:

  http://www.wotug.org/cpa2016/programme.shtml 


Titles and abstracts for all presentations (keynotes, accepted papers,
workshops and fringe talks) are on the above page.

  * We are pleased to announce Markus Jochum, Professor for Physical
Oceanography at the Niels Bohr Institute, as Keynote speaker at
CPA 2016.  His talk is titled:

   Computational Challenges for Climate Modelling

The abstract for his talk is on the programme page (see above).
Markus completed his PhD in physical oceanography in 2002 at MIT.
He then worked for 8 years as ocean model developer at the National
Center for Atmospheric Research, USA.  He was appointed to his
present Chair in 2012.
  
  * Registration is open for CPA 2016:

  http://www.wotug.org/cpa2016/registration.shtml 


The registration fee has been set at Euro 250 (including VAT).
This fee covers:

  - attendance at all conference, workshop and fringe sessions;
  - coffee/tea breaks, lunches and evening meals, including
the conference dinner;
  - one copy of the Proceedings.

Accommodation is not provided from the registration fee.  Information on
a range of nearby hotels is given on the registration page.

  * The registration page also gives details of student bursaries, sponsored
by WoTUG.  Bursaries provide a discount of between Euro 150 and Euro 
100,
depending on demand, and are still available.

  * As is usual for the Fringe, CPA 2016 remains open for further proposals
for short informal presentations (for the Sunday night opening session):

  http://www.wotug.org/cpa2016/fringe.shtml 


Thank you for reading this Call.  Please forward to colleagues who might
like to know about CPA 2016.  Please email  (or us -
see below) if you need any further information.


Brian Vinter
  Professor, Head of HPC, UCPH
  

Peter Welch
  Emeritus Professor of Parallel Computing, University of Kent
  

-- 

[go-nuts] Re: Go 1.7 Release Candidate 5 is released

2016-08-08 Thread lobeun

rc5 includes three fixes: two to the `go doc` command, and one fix
for time for macOS Sierra Beta 4.

 week's time

在 2016年8月3日星期三 UTC+8上午8:50:34,Chris Broadfoot写道:
>
> Hello gophers,
>
> We have just released go1.7rc5, a release candidate for Go 1.7.
> It is cut from release-branch.go1.7 at the revision tagged go1.7rc5.
>
> rc5 includes three fixes: two to the `go doc` command, and one fix
> for time for macOS Sierra Beta 4.
>
> Please help us by testing your Go programs with the release, and
> report any problems using the issue tracker:
>   https://golang.org/issue/new
>
> You can download binary and source distributions from the usual place: 
>   https://golang.org/dl/#go1.7rc5
>
> To find out what has changed in Go 1.7, read the draft release notes:
>   https://tip.golang.org/doc/go1.7
>
> Documentation for Go 1.7 is available at:
>   https://tip.golang.org/
>   
> A comprehensive list of changes since rc4 is here:
>   https://github.com/golang/go/compare/go1.7rc4...go1.7rc5
>   
> We still plan to issue Go 1.7 in a week's time (August 8).
>
> Cheers,
> Chris
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Shouldn't net/http Client.Do() return EOF when a connection is closed?

2016-08-08 Thread Bruno Albuquerque
I am seeing a weird issue when using Client.Do() to do a request. Here is
the scenario:

go version go1.7rc5 linux/amd64

The server I am sending the request to, receives it and, for this specific
request, closes the connection immediately without sending any replies. To
detect this, I wanted to compare the result error against io.EOF and that
failed. The reason is because the actual error is a custom error:

Post [URL]: EOF

This makes it complicated to check for this condition. The best approach I
could come up with was checking if the string suffix was EOF which is weird
at the very least.

Am I missing something?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Is this an acceptable way to handle errors

2016-08-08 Thread GoNutter
Thanks Lance.

On Saturday, August 6, 2016 at 4:43:02 PM UTC+1, Ian Lance Taylor wrote:
>
> On Sat, Aug 6, 2016 at 5:50 AM, GoNutter  > wrote: 
> > 
> > I have a number of cases where I have to handle typed errors. I have 
> been 
> > doing this previoiusly 
> > 
> > err :=SomeFunctionCall() 
> > if err != nil{ 
> >   switch e := err.(type){ 
> > case sometype: 
> >//do something 
> > case someothertype: 
> >//do something else 
> > default: 
> >//do default 
> >   } 
> > } 
> > 
> > However, it occurred to me that I can just do this... 
> > 
> > err :=SomeFunctionCall() 
> >   switch e := err.(type){ 
> > case nil: 
> >break 
> > case sometype: 
> >//do something 
> > case someothertype: 
> >//do something else 
> > default: 
> >//do default 
> > } 
> > 
> > 
> > I guess this will be less efficient because it will involve some 
> reflection 
> > in cases where I imagine the initial check that error is not nil will be 
> > less expensive. Is this correct? 
>
> No, not really.  The check for err == nil is pretty much the same as 
> the initial check in the type switch.  There might be an extra branch 
> instruction in the type switch, I'm not sure, but I expect it would be 
> negligible in practice. 
>
> > Apart from this, is there any other reason that this would not be a 
> > recommended way to handle the nil error case? 
>
> It's more idiomatic Go to write err != nil, so other people reading 
> your code may find it a bit surprising.  Only you can judge how 
> important that is for you. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] Re: How to create reusable HTML components using default html/template package

2016-08-08 Thread Simon Ritchie
> Specifically, is there a recommended pattern on how to use a component 
inside another component inside another component passing data to each one 
in a transparent way?

That's not awfully specific.  I'm guessing that you are thinking of a 
particular framework that you have used with another language.  Can you say 
what that is?  Your question would be clearer if you do that.

I'm using a solution based on ideas from Struts and Spring, which are Java 
frameworks.  However, what I'm doing may not be anything like what you are 
trying to do.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.