<FromGitter>
<fridgerator> Here is an example of how its used in c / c++ :https://github.com/oransel/node-talib/blob/master/src/talib.cpp#L1039
<FromGitter>
<fridgerator> I can just use an out paramter `out out_value`, but `out_value` is a `Float64` however it needs to be an `Array(Float64)`
<FromGitter>
<asterite> it seems you need to pass a pointerof s buffer
<FromGitter>
<fridgerator> @asterite bufer ?
DTZUZO has joined #crystal-lang
hypercore has quit [Ping timeout: 260 seconds]
chemist69 has quit [Ping timeout: 245 seconds]
chemist69 has joined #crystal-lang
ht_ has joined #crystal-lang
livcd has quit [Ping timeout: 245 seconds]
wmoxam has quit [Ping timeout: 245 seconds]
wmoxam has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
go|dfish has joined #crystal-lang
tdc has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
tdc has joined #crystal-lang
livcd has joined #crystal-lang
alex`` has quit [Ping timeout: 250 seconds]
alex`` has joined #crystal-lang
tdc has quit [Read error: Connection reset by peer]
tdc has joined #crystal-lang
DTZUZO has quit [Ping timeout: 265 seconds]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
<FromGitter>
<asterite> I mean, in the c++ code there's `wo->outReal = new double*[func_info->nbOutput]`
<FromGitter>
<asterite> so it seems outReal is an "array" of double
<FromGitter>
<asterite> and then: `TA_SetOutputParamRealPtr(func_params, i, &wo->outReal[i][0])`
<FromGitter>
<asterite> `&exp` is `pointerof(exp)` in Crystal
erdnaxeli has quit [Read error: Connection reset by peer]
ternarysolo has quit [Read error: Connection reset by peer]
beepdog has quit [Read error: Connection reset by peer]
olbat[m] has quit [Read error: Connection reset by peer]
<FromGitter>
<asterite> but you need to do `pointerof` an offset inside that array. I don't know if Crystal can do that
<FromGitter>
<asterite> actually `outReal` seems to be an array of arrays
<FromGitter>
<asterite> so complex... I'm having trouble understanding that code so I'll have more trouble translating that code to Crystal, sorry
beepdog has joined #crystal-lang
<FromGitter>
<fridgerator> I had trouble understanding it too. I have the TALib source, maybe I'll try and write my own wrapper function for it.
DTZUZO has quit [Ping timeout: 245 seconds]
<repo>
hey o/
<repo>
how do i get the exit status of a process i ran with Process.run {}
<repo>
i get a nil assertion error if i try using $?.success? after the block
olbat[m] has joined #crystal-lang
erdnaxeli has joined #crystal-lang
ternarysolo has joined #crystal-lang
pf_ has joined #crystal-lang
pf_ has left #crystal-lang [#crystal-lang]
pf_ has joined #crystal-lang
baweaver has quit [Ping timeout: 245 seconds]
pf_ has quit [Quit: Leaving.]
<repo>
hm never mind
<repo>
another question: i have an abstract struct Item and several direct inheriting non-abstract structs. I try to read an array of the json-serialized structs like so: Array(Login | Card | Identity | SecureNote).from_json(io)
<repo>
this gives me an error though, that i can't instanciate the abstract class Item
<repo>
do it a step at a time. first try to statically link your binary and go from there
<alex``>
'fogtrack' is in GIT_ROOT_DIR/fogtrack after that command?
<repo>
correct
<alex``>
and what happens after
<alex``>
of this file
<repo>
might be that you'll need to set the -Dmusl in the shards build command in the docker file. there was some trouble detecting musl libc in the past
<repo>
alex``: see artifacts
<repo>
i define the file as an artifact so gitlab will upload it to artifacts
<repo>
basically you could do whatever you want with it. upload it to a webserver or what not. your choice
<repo>
you could also use gitlab pages for a more permanent storage of the binaries. It wouldn't be versioned though
<FromGitter>
<sam0x17> anyone on the libcrt0.o issue? I'm building duktape.cr on alpine
go|dfish has joined #crystal-lang
ht_ has joined #crystal-lang
<FromGitter>
<j8r> @naqvis I'm trying to use crystar on Crystal 0.31.0, but it does not compile
<FromGitter>
<j8r> there is `/` to `//` to change in `SparseArray#max_entries` to compile, but then running specs returns an overflow in the reader specs
<FromGitter>
<ImAHopelessDev_gitlab> @kinxer I got your ping from that April post, sadly, I scrolled back down on accident. Was there a user wondering about Crystal w/ Godot? That's pretty cool, I hope more people are seeing the potential. They intertwine very easily and it's a powerful stack! Something great can definitely be created with it
pf_ has joined #crystal-lang
<FromGitter>
<kinxer> @ImAHopelessDev_gitlab I hope to have the free time and motivation soon to try out Godot; it seems like a really cool game development suite. With multithreading currently being integrated into Crystal, it might even be feasible (if perhaps time-consuming) to make GDScript/Godot (not sure which one is accurate) bindings for Crystal.
<FromGitter>
<ImAHopelessDev_gitlab> @kinxer π
f1refly has joined #crystal-lang
alex`` has quit [Quit: WeeChat 2.6]
pf_ has quit [Ping timeout: 245 seconds]
pf_ has joined #crystal-lang
<FromGitter>
<sam0x17> any way to make `shards build` output to a particular binary name/path?
<FromGitter>
<sam0x17> in an awkward build script for something and I cant `&& mv bin/my-app ./server` after the build command because that would be executed outside of docker
<FromGitter>
<sam0x17> tool I'm using expects binary at `./server`
<FromGitter>
<sam0x17> was originally using `crystal build` to do this manually, however I now have a dependency that has a postinstall step, which `crystal build` ignores
<FromGitter>
<sam0x17> about to pull out my bag of symbolic link tricks but was hoping I wouldn't have to ;)
<FromGitter>
<nsuchy> if I just pass it the host name I get an error about missing the scheme
ht_ has quit [Quit: ht_]
<FromGitter>
<nsuchy> Based on the error `Socket::Addrinfo::Error getaddrinfo: Temporary failure in name resolution` and it showing a different area with just the host name it looks like it's trying to resolve the entire URL as a domain name.
<FromGitter>
<nsuchy> In the initializer, `@site = HTTP::Client.new(URI.parse(@pve_cluster))` where `@pve_cluster = url`
<FromGitter>
<nsuchy> URI.parse should take the URL we give it and create the client, right?
<FromGitter>
<sam0x17> new problem: has anyone ever had `shards build` seemingly take forever (longest I have run the build is 15 minutes) and `GC Warning: Repeated allocation of very large block (appr. size 805310464): β β ``` May lead to memory leak and poor performance`?``` [https://gitter.im/crystal-lang/crystal?at=5d951941d97d8e3549f260b0]
<FromGitter>
<Blacksmoke16> @nsuchy im pretty sure you can just pass the url to the client
<FromGitter>
<Blacksmoke16> er nvm, if it has protocol and stuff on it prob better to use URI
<FromGitter>
<nsuchy> @Blacksmoke16 what do you mean?
<FromGitter>
<nsuchy> are you talking about my init function?
<FromGitter>
<nsuchy> it fails without the URL.parse
<FromGitter>
<nsuchy> one thing i've noticed is that it works fine on Mac with the shard but not with the app inside Docker
<FromGitter>
<nsuchy> Does Crystal require any special libraries for DNS
<FromGitter>
<Blacksmoke16> might be missing some dep in your container
<FromGitter>
<nsuchy> In the same docker container running the app
<FromGitter>
<nsuchy> a test program makes a DNS request fine
<sorcus>
Hi, little question. How to store 4GB (~140 millions) of strings in memory with fast searching? Radix eats much memory... Custom tree faster, but used ~20GB of memory...
<sorcus>
*Radix very slow when build tree.
<FromGitter>
<nsuchy> You might just need a lot of memory?
<FromGitter>
<fridgerator> Redis?
<sorcus>
I have only ~30GB of memory... :-(
<sorcus>
@fridgerator, hmmm...
<FromGitter>
<nsuchy> any ideas on my dns issue?
<FromGitter>
<nsuchy> I've confirmed that with direct scripts requesting the URL Crystal DNS works with http/client
<FromGitter>
<fridgerator> @nsuchy have you searched the "Temporary failure in name resolution" error?
<FromGitter>
<nsuchy> yes
<FromGitter>
<nsuchy> im at a loss to what's causing it
<FromGitter>
<nsuchy> I'm able to continiously run a test.cr file
<FromGitter>
<nsuchy> to request our proxmox host fine
<FromGitter>
<nsuchy> it's only when using the shard I have the issue
<FromGitter>
<fridgerator> I see a lot of posts about `/etc/resolv.conf` being the culprit
<FromGitter>
<nsuchy> It fails when I directly declare the URL too
<FromGitter>
<nsuchy> So it's not caused by passing an incorrect URL
<FromGitter>
<nsuchy> I've rebuild the docker container several times
<FromGitter>
<nsuchy> which by extension clears cache and installs deps
<FromGitter>
<fridgerator> @nsuchy are you running this on aws?
<FromGitter>
<fridgerator> It just occurred to me, scrolling back through my comments, that I had this same error message last week.
<FromGitter>
<fridgerator> And I know this sounds crazy, and doesn't make any sense, but I went to to work the next day and it was working just fine without me making any changes.
<FromGitter>
<fridgerator> I blamed my aws instance and moved on
<FromGitter>
<fridgerator> ec2*
<sorcus>
Maybe it issue with systemd-resolved if used?
<sorcus>
@nsuchy as a temporary solution you can use direct IP in your URL with Host header.
myfreeweb has joined #crystal-lang
baweaver has joined #crystal-lang
<FromGitter>
<alexherbo2> Hi
<FromGitter>
<Blacksmoke16> Hi
<FromGitter>
<alexherbo2> @Blacksmoke16 Youβre always around xD
<FromGitter>
<Blacksmoke16> I try :p
<FromGitter>
<alexherbo2> Do you have an example of web socket server / client ?
<FromGitter>
<Blacksmoke16> Uhh I do not
<FromGitter>
<plambert> Is anyone aware of a way to call alarm() on Linux/Darwin systems? Or, another way to trigger a timer within a tight loop without the overhead of checking the clock?
<FromGitter>
<alexherbo2> I want to execute commands from JavaScript (client) on my machine through web socket messaging
<FromGitter>
<alexherbo2> @Blacksmoke16 :(
<FromGitter>
<Blacksmoke16> Might be an example in the API docs?
<FromGitter>
<alexherbo2> Under which namespace exactly?