WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

timrowledge


> On 27-02-2018, at 5:42 AM, Louis LaBrunda <[hidden email]> wrote:
>
> Hi Guys,
>
> Thank you all very much.  Now, can someone please tell me what I need to do (please be
> specific) to get this to work on my Raspberry Pi.

OK, this is supposedly simple and yet finding any decent explanation so far eludes me. So let's see if we can develop sometihng that might make sense to include in the swiki or on the bintray page etc.


==========================

If you go to squeak.org you will see the collection of download buttons top-left (I find myself thinking a 'caption' for that group to make it really obvious that it is download related might be nice) and you need to hit the 'More...' button. That takes you to the general downloads page at http://squeak.org/downloads/

Since we just need a new VM package and know that we need the latest one in order to hopefully get this SSL related fix, click on the link icon next to the 'OpenSmalltalk VMs(trunk)' line. We should end up at https://bintray.com/opensmalltalk/vm/cog/201802261515#files

Herein is a long and not very easily interpretable list of files. There *is* a Readme button, which is nice. The content of the readme seems a little in need of improvement; for a start it is apparently the readme for the github source tree rather than something specifically intended to explain the bintray stuff.

Looking down the list of files though I eventually come across a squeak.cog.spur_linux32ARMv6 entry, which pretty much has to be the One. I'm a bit puzzled by the '_itimer' part since that implies use of the interval timer rather than the threaded interrupt, which is what I always use and prefer. I don't know why the autobuild stuff doesn't make that version.

Anyway, if you download that package to your Squeak realted directory (today it's easiest to do
`wget https://bintray.com/opensmalltalk/vm/download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` in a terminal on your Pi) and extract it (`tar -xzvf download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` and please don't ask me why wget or bintray sticks that stuff in front!) then you should find a directory called 'sqcogspurlinuxhtRPi'.

First thing to do to test that it unpacked properly is to (in that terminal again) run
`./sqcogspurlinuxhtRPi/squeak {my.image}`
Remembering of course that my.image should be replaced by your image name. I have successfully forgotten to do that on occasion.

Assuming it works at all, try your test case in a workspace by printit -
(ReadStream on: (WebClient httpGet: 'http://freegeoip.net/json/', (WebClient httpGet: 'https://api.ipify.org') content) content utf8ToSqueak) content
I get
'{"ip":"173.183.106.150","country_code":"CA","country_name":"Canada","region_code":"BC","region_name":"British Columbia","city":"Qualicum Beach","zip_code":"V9K","time_zone":"America/Vancouver","latitude":49.3468,"longitude":-124.4361,"metro_code":0}
which looks pretty much what you'd want.

If that is all good then you need to move the VM files to wherever you keep your VMs. I always keep them just where they sit in the Squeak directory because I so often have to fiddle. I suspect some unix mavens will be getting hot sweats at this point as they heat up their photon-keyboards to fire weapons grade missives in my direction explaining how you must, must, MUST move your executable fines to... somewhere or other.

Personally I use the Raspbian GUI tool to select an image file, get the menu and choose 'open with...' and then 'Custom Command Line' and browse for the squeak script in sqcogspurlinuxhtRPi as the thing to execute. That way I can do the normal d-click on the image to run it.

========================

All that is stupidly over complicated and it really ought to be made simpler somehow.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: NBRM: Unconditional No BRanch Multiple



Reply | Threaded
Open this post in threaded view
|

WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

Louis LaBrunda
Hi Tim,

Thanks for all this.  I am dealing with four other things right now but will get to this as
soon as I can.  I will let you know how it goes.

Lou


On Tue, 27 Feb 2018 10:37:35 -0800, tim Rowledge <[hidden email]> wrote:

>
>
>> On 27-02-2018, at 5:42 AM, Louis LaBrunda <[hidden email]> wrote:
>>
>> Hi Guys,
>>
>> Thank you all very much.  Now, can someone please tell me what I need to do (please be
>> specific) to get this to work on my Raspberry Pi.
>
>OK, this is supposedly simple and yet finding any decent explanation so far eludes me. So let's see if we can develop sometihng that might make sense to include in the swiki or on the bintray page etc.
>
>
>==========================
>
>If you go to squeak.org you will see the collection of download buttons top-left (I find myself thinking a 'caption' for that group to make it really obvious that it is download related might be nice) and you need to hit the 'More...' button. That takes you to the general downloads page at http://squeak.org/downloads/
>
>Since we just need a new VM package and know that we need the latest one in order to hopefully get this SSL related fix, click on the link icon next to the 'OpenSmalltalk VMs(trunk)' line. We should end up at https://bintray.com/opensmalltalk/vm/cog/201802261515#files
>
>Herein is a long and not very easily interpretable list of files. There *is* a Readme button, which is nice. The content of the readme seems a little in need of improvement; for a start it is apparently the readme for the github source tree rather than something specifically intended to explain the bintray stuff.
>
>Looking down the list of files though I eventually come across a squeak.cog.spur_linux32ARMv6 entry, which pretty much has to be the One. I'm a bit puzzled by the '_itimer' part since that implies use of the interval timer rather than the threaded interrupt, which is what I always use and prefer. I don't know why the autobuild stuff doesn't make that version.
>
>Anyway, if you download that package to your Squeak realted directory (today it's easiest to do
>`wget https://bintray.com/opensmalltalk/vm/download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` in a terminal on your Pi) and extract it (`tar -xzvf download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` and please don't ask me why wget or bintray sticks that stuff in front!) then you should find a directory called 'sqcogspurlinuxhtRPi'.
>
>First thing to do to test that it unpacked properly is to (in that terminal again) run
>`./sqcogspurlinuxhtRPi/squeak {my.image}`
>Remembering of course that my.image should be replaced by your image name. I have successfully forgotten to do that on occasion.
>
>Assuming it works at all, try your test case in a workspace by printit -
>(ReadStream on: (WebClient httpGet: 'http://freegeoip.net/json/', (WebClient httpGet: 'https://api.ipify.org') content) content utf8ToSqueak) content
>I get
>'{"ip":"173.183.106.150","country_code":"CA","country_name":"Canada","region_code":"BC","region_name":"British Columbia","city":"Qualicum Beach","zip_code":"V9K","time_zone":"America/Vancouver","latitude":49.3468,"longitude":-124.4361,"metro_code":0}
>which looks pretty much what you'd want.
>
>If that is all good then you need to move the VM files to wherever you keep your VMs. I always keep them just where they sit in the Squeak directory because I so often have to fiddle. I suspect some unix mavens will be getting hot sweats at this point as they heat up their photon-keyboards to fire weapons grade missives in my direction explaining how you must, must, MUST move your executable fines to... somewhere or other.
>
>Personally I use the Raspbian GUI tool to select an image file, get the menu and choose 'open with...' and then 'Custom Command Line' and browse for the squeak script in sqcogspurlinuxhtRPi as the thing to execute. That way I can do the normal d-click on the image to run it.
>
>========================
>
>All that is stupidly over complicated and it really ought to be made simpler somehow.
>
>
>tim
--
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon


Reply | Threaded
Open this post in threaded view
|

WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

Louis LaBrunda
In reply to this post by timrowledge
Hi Tim,

I finally got back to this.  I was busy with some very un-fun C stuff.

The latest VM from where your post points seems to work fine.  At least as far as getting the
info from the web goes.  Thanks.

Lou



On Tue, 27 Feb 2018 10:37:35 -0800, tim Rowledge <[hidden email]> wrote:

>
>
>> On 27-02-2018, at 5:42 AM, Louis LaBrunda <[hidden email]> wrote:
>>
>> Hi Guys,
>>
>> Thank you all very much.  Now, can someone please tell me what I need to do (please be
>> specific) to get this to work on my Raspberry Pi.
>
>OK, this is supposedly simple and yet finding any decent explanation so far eludes me. So let's see if we can develop sometihng that might make sense to include in the swiki or on the bintray page etc.
>
>
>==========================
>
>If you go to squeak.org you will see the collection of download buttons top-left (I find myself thinking a 'caption' for that group to make it really obvious that it is download related might be nice) and you need to hit the 'More...' button. That takes you to the general downloads page at http://squeak.org/downloads/
>
>Since we just need a new VM package and know that we need the latest one in order to hopefully get this SSL related fix, click on the link icon next to the 'OpenSmalltalk VMs(trunk)' line. We should end up at https://bintray.com/opensmalltalk/vm/cog/201802261515#files
>
>Herein is a long and not very easily interpretable list of files. There *is* a Readme button, which is nice. The content of the readme seems a little in need of improvement; for a start it is apparently the readme for the github source tree rather than something specifically intended to explain the bintray stuff.
>
>Looking down the list of files though I eventually come across a squeak.cog.spur_linux32ARMv6 entry, which pretty much has to be the One. I'm a bit puzzled by the '_itimer' part since that implies use of the interval timer rather than the threaded interrupt, which is what I always use and prefer. I don't know why the autobuild stuff doesn't make that version.
>
>Anyway, if you download that package to your Squeak realted directory (today it's easiest to do
>`wget https://bintray.com/opensmalltalk/vm/download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` in a terminal on your Pi) and extract it (`tar -xzvf download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` and please don't ask me why wget or bintray sticks that stuff in front!) then you should find a directory called 'sqcogspurlinuxhtRPi'.
>
>First thing to do to test that it unpacked properly is to (in that terminal again) run
>`./sqcogspurlinuxhtRPi/squeak {my.image}`
>Remembering of course that my.image should be replaced by your image name. I have successfully forgotten to do that on occasion.
>
>Assuming it works at all, try your test case in a workspace by printit -
>(ReadStream on: (WebClient httpGet: 'http://freegeoip.net/json/', (WebClient httpGet: 'https://api.ipify.org') content) content utf8ToSqueak) content
>I get
>'{"ip":"173.183.106.150","country_code":"CA","country_name":"Canada","region_code":"BC","region_name":"British Columbia","city":"Qualicum Beach","zip_code":"V9K","time_zone":"America/Vancouver","latitude":49.3468,"longitude":-124.4361,"metro_code":0}
>which looks pretty much what you'd want.
>
>If that is all good then you need to move the VM files to wherever you keep your VMs. I always keep them just where they sit in the Squeak directory because I so often have to fiddle. I suspect some unix mavens will be getting hot sweats at this point as they heat up their photon-keyboards to fire weapons grade missives in my direction explaining how you must, must, MUST move your executable fines to... somewhere or other.
>
>Personally I use the Raspbian GUI tool to select an image file, get the menu and choose 'open with...' and then 'Custom Command Line' and browse for the squeak script in sqcogspurlinuxhtRPi as the thing to execute. That way I can do the normal d-click on the image to run it.
>
>========================
>
>All that is stupidly over complicated and it really ought to be made simpler somehow.
>
>
>tim
--
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon


Reply | Threaded
Open this post in threaded view
|

Re: WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

Tobias Pape
Hi Lou
> On 27.03.2018, at 18:01, Louis LaBrunda <[hidden email]> wrote:
>
> Hi Tim,
>
> I finally got back to this.  I was busy with some very un-fun C stuff.
>
> The latest VM from where your post points seems to work fine.  At least as far as getting the
> info from the web goes.  Thanks.
>

Sounds good.

Best regards
        -Tobias

> Lou
>
>
>
> On Tue, 27 Feb 2018 10:37:35 -0800, tim Rowledge <[hidden email]> wrote:
>
>>
>>
>>> On 27-02-2018, at 5:42 AM, Louis LaBrunda <[hidden email]> wrote:
>>>
>>> Hi Guys,
>>>
>>> Thank you all very much.  Now, can someone please tell me what I need to do (please be
>>> specific) to get this to work on my Raspberry Pi.
>>
>> OK, this is supposedly simple and yet finding any decent explanation so far eludes me. So let's see if we can develop sometihng that might make sense to include in the swiki or on the bintray page etc.
>>
>>
>> ==========================
>>
>> If you go to squeak.org you will see the collection of download buttons top-left (I find myself thinking a 'caption' for that group to make it really obvious that it is download related might be nice) and you need to hit the 'More...' button. That takes you to the general downloads page at http://squeak.org/downloads/
>>
>> Since we just need a new VM package and know that we need the latest one in order to hopefully get this SSL related fix, click on the link icon next to the 'OpenSmalltalk VMs(trunk)' line. We should end up at https://bintray.com/opensmalltalk/vm/cog/201802261515#files
>>
>> Herein is a long and not very easily interpretable list of files. There *is* a Readme button, which is nice. The content of the readme seems a little in need of improvement; for a start it is apparently the readme for the github source tree rather than something specifically intended to explain the bintray stuff.
>>
>> Looking down the list of files though I eventually come across a squeak.cog.spur_linux32ARMv6 entry, which pretty much has to be the One. I'm a bit puzzled by the '_itimer' part since that implies use of the interval timer rather than the threaded interrupt, which is what I always use and prefer. I don't know why the autobuild stuff doesn't make that version.
>>
>> Anyway, if you download that package to your Squeak realted directory (today it's easiest to do
>> `wget https://bintray.com/opensmalltalk/vm/download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` in a terminal on your Pi) and extract it (`tar -xzvf download_file?file_path=squeak.cog.spur_linux32ARMv6_itimer_201802261515.tar.gz` and please don't ask me why wget or bintray sticks that stuff in front!) then you should find a directory called 'sqcogspurlinuxhtRPi'.
>>
>> First thing to do to test that it unpacked properly is to (in that terminal again) run
>> `./sqcogspurlinuxhtRPi/squeak {my.image}`
>> Remembering of course that my.image should be replaced by your image name. I have successfully forgotten to do that on occasion.
>>
>> Assuming it works at all, try your test case in a workspace by printit -
>> (ReadStream on: (WebClient httpGet: 'http://freegeoip.net/json/', (WebClient httpGet: 'https://api.ipify.org') content) content utf8ToSqueak) content
>> I get
>> '{"ip":"173.183.106.150","country_code":"CA","country_name":"Canada","region_code":"BC","region_name":"British Columbia","city":"Qualicum Beach","zip_code":"V9K","time_zone":"America/Vancouver","latitude":49.3468,"longitude":-124.4361,"metro_code":0}
>> which looks pretty much what you'd want.
>>
>> If that is all good then you need to move the VM files to wherever you keep your VMs. I always keep them just where they sit in the Squeak directory because I so often have to fiddle. I suspect some unix mavens will be getting hot sweats at this point as they heat up their photon-keyboards to fire weapons grade missives in my direction explaining how you must, must, MUST move your executable fines to... somewhere or other.
>>
>> Personally I use the Raspbian GUI tool to select an image file, get the menu and choose 'open with...' and then 'Custom Command Line' and browse for the squeak script in sqcogspurlinuxhtRPi as the thing to execute. That way I can do the normal d-click on the image to run it.
>>
>> ========================
>>
>> All that is stupidly over complicated and it really ought to be made simpler somehow.
>>
>>
>> tim
> --
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
>
>


Reply | Threaded
Open this post in threaded view
|

Re: WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

timrowledge
In reply to this post by Louis LaBrunda


> On 27-03-2018, at 9:01 AM, Louis LaBrunda <[hidden email]> wrote:
>
> Hi Tim,
>
> I finally got back to this.  I was busy with some very un-fun C stuff.
>
> The latest VM from where your post points seems to work fine.  At least as far as getting the
> info from the web goes.  

I'm glad the recipe worked but it's still way too complicated.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Adding manpower to a late software project makes it later.



Reply | Threaded
Open this post in threaded view
|

Re: WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

Ron Teitelbaum


On Wed, Mar 28, 2018 at 1:30 PM, tim Rowledge <[hidden email]> wrote:


> On 27-03-2018, at 9:01 AM, Louis LaBrunda <[hidden email]> wrote:
>
> Hi Tim,
>
> I finally got back to this.  I was busy with some very un-fun C stuff.
>
> The latest VM from where your post points seems to work fine.  At least as far as getting the
> info from the web goes.

I'm glad the recipe worked but it's still way too complicated.

Hi Tim,

What is too complicated?  

Ron Teitelbaum 


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Adding manpower to a late software project makes it later.






Reply | Threaded
Open this post in threaded view
|

Re: WebClient httpGet: 'http://freegeoip.net/json/' works on windows not linux

timrowledge


> On 28-03-2018, at 10:49 AM, Ron Teitelbaum <[hidden email]> wrote:
>
> What is too complicated?  

The entire list of things I had to suggest to Lou - the digging around to find the file(s), the extraction hassles, the weird bintray URL, where to put the vm files..

Since we have automation tools it might be nice to make them build a more easily accessible package and put it in a less hidden place. I don;t like having to go down into that basement, find the disused toilet guarded by a leopard and pull stuff from a locked filing cabinet :-)

And we certainly need to document where to look and what to find.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Porting is such sweet sorrow



12