Fork me on GitHub
#joker
<
2019-11-25
>
sb14:11:21

Hello, how to possible create http request with joker?

sb14:11:54

Ok, I see here is joker.http.

👍 4
sb14:11:11

sorry I see now, here is a docs map

sb15:11:15

Possible compile to rpi3? I got this

panic: runtime error: slice bounds out of range

goroutine 1 [running]:

        /Users/sb/Downloads/joker-master/core/pack.go:199
, 0x0, 0x0, 0xc7a100, 0xc9a360, 0xccc0b0, 0x6f, 0x415070)
        /Users/sb/Downloads/joker-master/core/pack.go:102 +0x634
, 0x0, 0x0)
        /Users/sb/Downloads/joker-master/core/procs.go:1711 +0xc0

        /Users/sb/Downloads/joker-master/core/procs.go:1721
main.main()
        /Users/sb/Downloads/joker-master/main.go:653 +0x39c 

jcburley15:11:12

Try rm -f core/a_*.go and rebuild, in case you had stale data files.

sb16:11:38

ok, thanks!

sb16:11:39

I wasn’t lucky. I tried with native build too.. on rpi3 with go 1.7, but I got

# 
../../pkg/profile/profile.go:198: undefined: runtime.SetMutexProfileFraction
../../pkg/profile/profile.go:205: undefined: runtime.SetMutexProfileFraction
# 
core/numbers.go:57: r.Num().IsInt64 undefined (type *big.Int has no field or method IsInt64)

jcburley16:11:32

Hmm, that looks like an issue with the profiling code that is included with Joker but unnecessary and, I think, rarely used. Maybe you can edit main.go and remove it, at least temporarily, until this is addressed?

sb16:11:04

Ok I check it!

jcburley16:11:11

Also, I think README.md has cross-compilation info, if you haven't already found that.

sb16:11:56

Yes, I read. I tried with many options.

sb16:11:34

GOARM 5..6..7 etc

jcburley16:11:43

Please do Issue any problems or ideas for improving the docs then!

jcburley16:11:45

Oh, go 1.7 is probably way too old anyway. Try upgrading to 1.13, or at least 1.12, before proceeding.

sb16:11:04

Ok! Yes, that is true.. I try to do on arm

sb16:11:08

thanks!!

sb17:11:00

Yes, with 1.13 works.. I got back like the first cross compiled version error.

sb17:11:14

:face_with_rolling_eyes:

sb17:11:35

I try to clean

sb17:11:58

I will check tomorrow on arm64. Did you try with arm/ raspberry pi?

sb17:11:18

Maybe Im not so expert in Golang.

sb17:11:07

I got same error on scaleway 64 server..

sb17:11:18

with arm64 config

jcburley17:11:27

Using the latest master (though the latest release should probably work fine), I didn't run into any troubles building Juoker per instructions on my Mac OS X laptop just now:

$ ./run.sh -e '(loaded-libs)'
#{joker.base64 joker.core joker.html joker.http joker.json  joker.math joker.os joker.string joker.time joker.url joker.yaml joker.strconv joker.crypto joker.hex joker.filepath joker.csv}
$ GOOS=linux GOARCH=arm GOARM=6 go build
$ file joker
joker: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, Go BuildID=IEx-v-Gz7Md3-jn608rx/RV8Pe-XEJ76dYrKCZ5YY/sKdgj6f44rxQ23mGYf5_/pBpxeWaDXxOkec_ZY-hC, not stripped
$

sb21:11:07

I dont enough Golang know-how.. but I learn the lang, really cool project. If I will find out what is the problem, then I drop to you

sb21:11:30

That is my first post

jcburley21:11:06

Oh. Well, I don't have an ARM machine to run that executable on, so can't test that....

sb21:11:11

Np. I hope .. me or somebody found out. Really great job! That work on my Mac, really cool job! 👍👍👍 therefore i want to use on my rpi too

jcburley21:11:26

Thing is, IIRC, some others have cross-build Joker to run on ARM machines before (maybe even a Raspberry PI?). Maybe search Issues (on Joker's GitHub) for past mentions and reach out to people who've talked about ARM support, to see if they've got success and maybe recipes?

sb15:11:51

Ok I try find somebody who solved! Thx

👍 4
sb15:11:48

i used this command env GOOS=linux GOARCH=arm GOARM=5 go build -o clj