DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
yxhuvud has quit [Remote host closed the connection]
oddp has joined #crystal-lang
sorcus has quit [Quit: WeeChat 2.8]
sorcus has joined #crystal-lang
yxhuvud has joined #crystal-lang
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
<f1refly>
Can I get a statically linked crystal compiler somewhere or do I have to compile it myself? I'd like to submit a solution to a task at university in crystal, but I'd have to include the compiler myself, so a statically linked one would be very handy
<jhass>
it's not statically linked but might work anyways
<f1refly>
It doesn't work unfortunaltely, as the target system is not a dev system and is missing some linking utils
<jhass>
well, a static build won't solve that
<f1refly>
Hmmm
<jhass>
can you instruct running a docker container perhaps?
<jhass>
or installing a snap?
<f1refly>
No, I've no control over that system
<f1refly>
I might just do it in ruby
<jhass>
yeah, sorry :(
<jhass>
the compiler just shells out for the linking part
<f1refly>
Can't have everything in this world I suppose
<f1refly>
It's very sad that crystal isn't in the debian and ubuntu repos yet
<jhass>
maybe you could submit a statically compiled binary of your program alongside the source code
<f1refly>
I might've been able to tell the prof to install it with apt, but I doubt he'll do any custom repos or whatever you have to do to install with snap
<f1refly>
the program has to be compiled on the testing machine to get any points, so no, that won't work
<FromGitter>
<Blacksmoke16> isnt snap already included on ubuntu?
<f1refly>
"so just mount this disk image to some folder and chroot into it lol"
<f1refly>
don't see anything wrong with that
<jhass>
erm..
<jhass>
"run it in this container by ..."
<jhass>
mention container and it sounds cool and reasonable
<FromGitter>
<Blacksmoke16> give him a usb with alpine on it and tell him to boot into it 😆
<jhass>
but yeah, we are well into "easier to rewrite in Ruby" territory :D
<FromGitter>
<j8r> in ruby 0.1-alpha
<FromGitter>
<j8r> Or whatever old version in Debian 4.9 :3
<f1refly>
exodus is hella cool
<f1refly>
damn
<f1refly>
gonna try that regardless of its usefulness
<jhass>
mmh, I guess Ruby and debian actually have sorta the same age
<FromGitter>
<ondreian> Hey there, recently something changed and I keep getting this error message in vscode's error message hud whenever I'm working on a crystal lang project: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I tried out `scry` as was suggested in that repo, but unfortunately that generates a lot more errors [https://gitter.im/crystal-lang/crystal?at=5f033c976c06cd1bf47803cf]
<FromGitter>
<j8r> there is a max memory limit IIRC
<FromGitter>
<j8r> how many the program did use in memory?
<yxhuvud>
There is not a max memory limit, but the GC complains if you allocate too much at once
<FromGitter>
<bararchy> well, it does say OOM and then crashes XD
<FromGitter>
<bararchy> @j8r the program used around 3Gb
<FromGitter>
<yxhuvud> out of memory can happen if you try to allocate a large contigous chunk too, though.
<jhass>
@ondreian: What's your OS? How did you install Crystal? This error means Crystal cannot find its standard library in CRYSTAL_PATH. Does it work on a shell outside vscode? What's crystal env showing there?
<FromGitter>
<RespiteSage> To add additional credence to @ondreian, this happens to me on the laptop I'm not currently on (similar setup, except Ubuntu).
<FromGitter>
<RespiteSage> Maybe it's a bug with `/home/benjamin/`. :P
<FromGitter>
<jwaldrip> The legacy crystal shards is a very basic search layer on top of github. You will find the newer sites provide much more info.
alexherbo2 has quit [Ping timeout: 258 seconds]
<raz>
yea i saw them and all they do is put more clicks between me and github
<jhass>
ondrein: RespiteSage: So we changed a couple of things around CRYSTAL_PATH in 0.35/0.35.1, it might very well be related to that, probably changed some detail the vscode extension relied on, though I don't quite see why it would. Unfortunately I cannot debug as I have no such setup myself
<FromGitter>
<RespiteSage> A'ight. I'll have to look at it soon on my other laptop to see if I can shed any light on it.
<FromGitter>
<bararchy> ahh seems I'm making too many Fibers `Cannot allocate new fiber stack: Cannot allocate memory (RuntimeError)`
<FromGitter>
<ondreian> Thanks for the idea on where to debug, greatly appreciate you narrowing the space there
FromGitter has quit [Ping timeout: 240 seconds]
oprypin has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
oprypin has joined #crystal-lang
FromGitter has quit [Read error: Connection reset by peer]
oprypin_ has joined #crystal-lang
oprypin has quit [Read error: Connection reset by peer]
<FromGitter>
<Blacksmoke16> thats for a normal program, compiler might be a bit diff :shrug:
<oprypin>
first time i find docker personally useful to me
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<Blacksmoke16> ofc would want to add your other flags, like `--release`
alexherbo2 has joined #crystal-lang
<f1refly>
oprypin: way too lazy for that. I'll just hand in the ruby version
<f1refly>
Which doesn't mean that I won't create it in crystal for fun
<f1refly>
which brings me to my new problem: How do I initialize an array with a bunch of sub-arrays? When I do Array(Array(String)).new(n, Array(String.new)) the reference to the array is always the same in all positions
<f1refly>
How can I tell crystal that I want a new array every time?
<FromGitter>
<Blacksmoke16> then like `SomeType.new bizz`
rocx has joined #crystal-lang
<FromGitter>
<asterite> do you know the return type of that call? you can capture the given object behind a proc
<FromGitter>
<wyhaines> The return type is itself actually not important. It is itself just going to invoke another method with the object that's passed into it. ⏎ ⏎ The mechanism is just so that a client library can expose a hook to it's user. The client library doesn't care what's done with the data that it's passing via the `#call`. It's responsibility ends when it does that. ⏎ ⏎ I think I see what you mean about
<f1refly>
Whats the easiest way to tell crystal to pass an array by reference when put into a method call? Wrapping it into a class?
postmodern has joined #crystal-lang
<FromGitter>
<Blacksmoke16> Arrays are passed by reference by default
<f1refly>
Uhm
<FromGitter>
<Blacksmoke16> So should just work
<f1refly>
Then my code is beyond broken
<f1refly>
nvm then
<FromGitter>
<wyhaines> Wrapping in a proc works. Thanks for that insight @asterite !
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter>
<asterite> Cool! I actually thought about it right now :-) ⏎ I think in other languages you would use an interface... a proc is not that nice because it captures the object in a closure, and that allocates memory... but I guess it's not that bad either
sz0 has joined #crystal-lang
sagax has joined #crystal-lang
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 272 seconds]
<FromGitter>
<scriptmaster> Hi, (I am new to Crystal), I am trying to create a redis module: dylib/.so file. how do I import a C-header file and write some functions. Better yet, here is the 600+ lines of pure C code, I am trying to port to crystal: https://github.com/filipecosta90/list_extend
oddp has quit [Ping timeout: 260 seconds]
<FromGitter>
<Blacksmoke16> heres a concurrency question
<FromGitter>
<Blacksmoke16> i need to make n requests to get data for each ID
<FromGitter>
<Blacksmoke16> then iterate over that data, and make n more requests
<FromGitter>
<Blacksmoke16> however the data will most likely be duplicated , so i wont need to do a request for *every* data object
<FromGitter>
<Blacksmoke16> actually nvm, i can just create an array of ids to lookup, call `.uniq` on it and then spawn fibers to actually do the requests, versus doing the deup logic in the fiber