Re: [shoes] Segfault with shoes build on the nobody knows shoes
URL example
- From:
- Cecil Coupe
- Date:
- 2011-09-16 @ 01:06
Apologies I was only half correct. I built my shoes3 with 1.9.2 and it
segfaults. Definitely a Ruby 1.9.2 issue.
Re: [shoes] Segfault with shoes build on the nobody knows shoes
URL example
- From:
- Cecil Coupe
- Date:
- 2011-09-16 @ 00:54
Interesting. The code worked on my linux x64 Shoes - but I have the
original Shoes3 code, not the develop branch and my Shoes is complied
with Ruby 1.9.1. I suspect something has changed in the url code
handling of a regexp that 1.9.2 doesn't like.
On Thu, 2011-09-15 at 22:59 +0200, Tobias Pfeiffer wrote:
> Hey guys - me again :P
>
> I hope this isn't a known issue that I missed. Running this code (taken
> straight from nobody knows shoes) with red shoes:
>
> class Dictionary < Shoes
> url '/', :index
> url '/(\w+)', :word
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL example
- From:
- Eric Watson
- Date:
- 2011-09-16 @ 00:29
Out of curiosity, does it work if you add a block at the end
Shoes.app do; end
?
On Sep 15, 2011, at 5:28 PM, spiralofhope <spiralofhope@lavabit.com> wrote:
> On Thu, 15 Sep 2011 22:59:52 +0200
> Tobias Pfeiffer <tobias.pfeiffer@student.hpi.uni-potsdam.de> wrote:
>
>> Shoes is built straight from develop today. I think it is related to
>> using the Shoes class or the urls (I tried to rewrite infoes using
>> this and then came across this error and I noticed that it also
>> happened when trying the nks code).
>>
>> I dunno, shall I open an issue or does somebody know what's wrong on
>> first sight?
>
> On my red shoes, built quite a long time ago, it also segfaults.
>
> It has something to do with
>
> url '/', :index
>
> I'm not too familiar with url(), is that part of the code correct?
>
>
> --
> http://spiralofhope.com
>
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL example
- From:
- Eric Watson
- Date:
- 2011-09-16 @ 06:04
On Sep 15, 2011, at 5:53 PM, spiralofhope wrote:
> This is how the code looks, with some formatting and that new ending:
> https://gist.github.com/1221295
>
> This code no longer crashes, but it only displays a default Shoes
> window, with nothing inside it.
I think for the url call to work, you'd have to change the last line to
Dictionary.app do; end
But even if you do that, it's still an empty window. On my OS X 10.7
Shoes, the original (without block) doesn't segfault--it gives the error I
described in https://github.com/shoes/shoes/issues/140
Does your Shoes also segfault on this most minimal example:
Shoes.app
?
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL example
- From:
- ashbb
- Date:
- 2011-09-16 @ 11:15
Hi Tobi and folks,
I guess this is not a url() method problem just a UTF-8 character code
handling problem.
Look at the character code of "doesn't" that you want to show with para().
I guess Tobi copied and pasted the code from PDF file (NKS.pdf).
So, the "doesn't" is not ascii code.
There are two ways to solve the problem.
1st: Replace "doesn't" to ascii code.
2nd: Add "# -*- encoding: utf-8 -*-" at the top of the file and save the
file as utf-8 code file (not as ascii code file).
ashbb
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL
example
- From:
- Tobias Pfeiffer
- Date:
- 2011-09-16 @ 17:20
Hey ashbb,
well my editor is set to UTF-8 and I first noticed this problem when
trying to refactor my infoes project - where all the code is written by me.
I tried to do what you said, replaced the ' with the own from my
keyboard, inserted the encoding statement and double checked that gedit
promised me to save it as UTF-8. Sadly same error.
The code works on green shoes btw.
Tobi
On 09/16/2011 01:15 PM, ashbb wrote:
> Hi Tobi and folks,
>
> I guess this is not a url() method problem just a UTF-8 character code handling
> problem.
> Look at the character code of "doesn't" that you want to show with para().
> I guess Tobi copied and pasted the code from PDF file (NKS.pdf).
> So, the "doesn't" is not ascii code.
>
> There are two ways to solve the problem.
>
> 1st: Replace "doesn't" to ascii code.
> 2nd: Add "# -*- encoding: utf-8 -*-" at the top of the file and save the file as
> utf-8 code file (not as ascii code file).
>
> ashbb
>
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL example
- From:
- ashbb
- Date:
- 2011-09-17 @ 00:21
Hi Tobi,
> The code works on green shoes btw.
Okay then, there must be another problem on Red Shoes. ;-)
To identify the cause, could you confirm the following snippets?
On my Windows 7, they all work well with Shoes 3 (0.r1514).
# 1st
class Dictionary < Shoes
url '/', :index
def index
para 'hello'
end
end
Shoes.app
# 2nd
class Dictionary < Shoes
url '/', :index
url '/word', :word
def index
button("OK"){visit "/word"}
end
def word
para 'hello'
end
end
Shoes.app
# 3rd
class Dictionary < Shoes
url '/', :index
url '/(\w+)', :word
def index
button("OK"){visit "/hello"}
end
def word(string)
para string
end
end
Shoes.app
ashbb
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL example
- From:
- ashbb
- Date:
- 2011-09-17 @ 01:09
Hi spiralofhope,
> Does it help if I also run them?
Yes!! Very helpful!
Your results shows that this is a Ruby 1.9.2 issue (the difference between
Ruby 1.9.1 and 1.9.2). Just as Cecil had already mentioned.
I guess Tobi will get the same results.
ashbb
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL
example
- From:
- Tobias Pfeiffer
- Date:
- 2011-09-17 @ 08:05
You guess right ;-)
Tobi
On 09/17/2011 03:09 AM, ashbb wrote:
> Hi spiralofhope,
>
> > Does it help if I also run them?
> Yes!! Very helpful!
>
> Your results shows that this is a Ruby 1.9.2 issue (the difference between Ruby
> 1.9.1 and 1.9.2). Just as Cecil had already mentioned.
>
> I guess Tobi will get the same results.
>
> ashbb
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL
example
- From:
- spiralofhope
- Date:
- 2011-09-16 @ 17:57
On Sat, 17 Sep 2011 09:21:14 +0900
ashbb <ashbbb@gmail.com> wrote:
> To identify the cause, could you confirm the following snippets?
Does it help if I also run them?
They all gave an error:
https://gist.github.com/1223466
(The "no version information available" messages is normal for me)
--
http://spiralofhope.com
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL
example
- From:
- spiralofhope
- Date:
- 2011-09-16 @ 02:34
On Fri, 16 Sep 2011 01:04:00 -0500
Eric Watson <wasnotrice@gmail.com> wrote:
> Does your Shoes also segfault on this most minimal example:
>
> Shoes.app
Mine doesn't.
--
http://spiralofhope.com
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL
example
- From:
- Tobias Pfeiffer
- Date:
- 2011-09-16 @ 09:24
On 09/16/2011 08:04 AM, Eric Watson wrote:
> On Sep 15, 2011, at 5:53 PM, spiralofhope wrote:
>
> > This is how the code looks, with some formatting and that new ending:
> > https://gist.github.com/1221295
> >
> > This code no longer crashes, but it only displays a default Shoes
> > window, with nothing inside it.
>
> I think for the url call to work, you'd have to change the last line to
>
> Dictionary.app do; end
>
> But even if you do that, it's still an empty window. On my OS X 10.7 Shoes, the
> original (without block) doesn't segfault--it gives the error I described in
> https://github.com/shoes/shoes/issues/140
>
> Does your Shoes also segfault on this most minimal example:
>
> Shoes.app
>
> ?
>
Shoes doesn't segfault on Shoes.app
And the example doesn't run when you add
Shoes.app do ; end or something like that to the end... :-/ It just
opens up an empty shoes window.
Same for Dictionary.app do ; end
Dictionary.app produces a segfault again ... :-/
cheers,
Tobi
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL
example
- From:
- spiralofhope
- Date:
- 2011-09-15 @ 22:53
On Thu, 15 Sep 2011 19:29:16 -0500
Eric Watson <wasnotrice@gmail.com> wrote:
> Out of curiosity, does it work if you add a block at the end
>
> Shoes.app do; end
>
> ?
This is how the code looks, with some formatting and that new ending:
https://gist.github.com/1221295
This code no longer crashes, but it only displays a default Shoes
window, with nothing inside it.
--
http://spiralofhope.com
Re: [shoes] Segfault with shoes build on the nobody knows shoes URL
example
- From:
- spiralofhope
- Date:
- 2011-09-15 @ 15:31
On Thu, 15 Sep 2011 22:59:52 +0200
Tobias Pfeiffer <tobias.pfeiffer@student.hpi.uni-potsdam.de> wrote:
> Shoes is built straight from develop today. I think it is related to
> using the Shoes class or the urls (I tried to rewrite infoes using
> this and then came across this error and I noticed that it also
> happened when trying the nks code).
>
> I dunno, shall I open an issue or does somebody know what's wrong on
> first sight?
On my red shoes, built quite a long time ago, it also segfaults.
It has something to do with
url '/', :index
I'm not too familiar with url(), is that part of the code correct?
--
http://spiralofhope.com