spheres icon indicating copy to clipboard operation
spheres copied to clipboard

Regexp module issue with hash-table

Open alvatar opened this issue 9 years ago • 4 comments

 (load (spheres/string regexp))
> (regexp-extract '(+ numeric) "192.168.0.1")


*** ERROR IN spheres/structure#hash-table#hash-table-mutable? -- (Argument 1) Instance of #<type #2 table> expected
(##direct-structure-ref '#<table #3> 1 '#<type #2 table> #f)

alvatar avatar Oct 23 '15 09:10 alvatar

$ gsi
-- environment: debug -- preloaded libraries: (spheres/core meta) (spheres/core assert)
Gambit v4.8.0

> (load (spheres/string regexp))                
> (regexp-extract '(+ numeric) "192.168.0.1")   
("192" "168" "0" "1")
> 

ovenpasta avatar Oct 29 '15 17:10 ovenpasta

Did you fix it?

alvatar avatar Oct 29 '15 17:10 alvatar

No it just works here. I have gambit 4.8.0 - linux amd64. Maybe issues with 4.8.1?

ovenpasta avatar Oct 29 '15 18:10 ovenpasta

Yes, it might be worth taking a look at changes in how hash-tables are defined. I knew the time would come that the hash-table hack would fail. Anyway, as always I'm sorry I cannot dive into this at the moment. I'll be glad to review your code if you fix it!

alvatar avatar Oct 29 '15 18:10 alvatar