<FromGitter>
<codenoid> is .includes need to close ?
<FromGitter>
<codenoid> wait, i'll try with ()
<FromGitter>
<codenoid> :sparkles:
<FromGitter>
<johnjansen> thats what you need
<FromGitter>
<codenoid> better with `` File.extname(dbfile) == ".txt" `` sir ^^
ragmaanir has quit [Quit: Leaving]
<FromGitter>
<Ragmaanir> hi, i got a problem here (description inside): https://carc.in/#/r/29x2
<FromGitter>
<johnjansen> @codenoid sure, if thats what you are trying to do, then use extname, the original code didnt either stipulate a requirement or an intention, it was simply a “why doesnt this work” … which was because of the lack of `()` in that case
<FromGitter>
<johnjansen> everyone is happy to help, but try to state your problem in a clear and concise way such that anyone can assist you
<FromGitter>
<codenoid> ok sir ^^
<FromGitter>
<johnjansen> oh and you dont need to call everone sir ;-) we are all equal
Orbixx has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
Orbixx has quit [Quit: leaving]
<FromGitter>
<codenoid> why every i run my compiled crystal app in other computer, i got this error ⏎ `` ` ⏎ ./client: error while loading shared libraries: libgc.so.2: cannot open shared object file: No such file or directory ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5955c4cfc101bc4e3a367a8d]
<FromGitter>
<codenoid> why every i run my compiled crystal app in other computer, i got this error ⏎ ``./client: error while loading shared libraries: libgc.so.2: cannot open shared object file: No such file or directory``
<FromGitter>
<codenoid> apt update > install ⏎ than ``Crystal 0.22.0 [3c71228] (2017-04-20) LLVM 3.5.0 `` in my computer ⏎ and ``Crystal 0.23.0 [3c3d3e2] (2017-06-28) LLVM 3.8.1 `` in my vps ⏎ :worried: [https://gitter.im/crystal-lang/crystal?at=5955c9fc5a1ab55f643d01b3]
<FromGitter>
<codenoid> `` Err:20 https://dist.crystal-lang.org/apt crystal InRelease ⏎ The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4EBAC6667697DD2 ``
hako has joined #crystal-lang
hako has quit [Ping timeout: 268 seconds]
Raimondi has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
hako has joined #crystal-lang
hako has quit [Ping timeout: 240 seconds]
hako has joined #crystal-lang
hako has quit [Read error: Connection reset by peer]
hako has joined #crystal-lang
hako has quit [Read error: Connection reset by peer]
hako has joined #crystal-lang
<FromGitter>
<schoening> Ugh.. why did I have to watch a few videos on cpu cache misses.. Now I feel bad about using oop :p
<FromGitter>
<schoening> @Papierkorb btw I was able to embed lua in c. Was a fun exercise.
<FromGitter>
<codenoid> still stuck with gcc on my ubuntu vps, and my stackoverflow question limit reached
<FromGitter>
<schoening> is it a bad idea to have an object have a property that is a struct?
<FromGitter>
<schoening> instead of that struct being a class I mean
<FromGitter>
<sdogruyol> Nope
<FromGitter>
<sdogruyol> If it's immutable it's okay
<FromGitter>
<schoening> Ahhh ok because of passing it.
<FromGitter>
<schoening> I was just asking because it says structs are kept on the stack. So idk. seems like when I have a thousand objects all with structs that the stack would be filled up?
<FromGitter>
<sdogruyol> Nope
<FromGitter>
<sdogruyol> Structs are better than classes for performance
hightower4 has quit [Ping timeout: 260 seconds]
<hightower2>
Can anyone explain why? From the text looks like structs are passed by value, and I don't understand how passing by value can be faster than passing a pointer?
<FromGitter>
<schoening> cool ty @sdogruyol
<crystal-gh>
[crystal] MakeNowJust opened pull request #4638: init: add TODO doc-comment for generated module (master...fix/crystal-init/todo-comment-for-doc) https://git.io/vQ4ie
hightower4 has joined #crystal-lang
<FromGitter>
<sdogruyol> `Stack is used for static memory allocation and Heap for dynamic memory allocation, both stored in the computer's RAM . Variables allocated on the stack are stored directly to the memory and access to this memory is very fast, and it's allocation is dealt with when the program is compiled.` @hightower2
<hightower2>
sdogruyol: right, but when you pass by value, the value needs to be copied/allocated?
<FromGitter>
<sdogruyol> it's at compile time
<FromGitter>
<sdogruyol> in the end it's a static memory allocation
<FromGitter>
<codenoid> @elorest hi sir, i just upload my code, but my readme.md file wasnt updated ;) ⏎ https://github.com/codenoid/ficha
<FromGitter>
<codenoid> +1 feature, server - client, like ssh, static secret key, storage, sqlite and text plain, with encrypted value
<FromGitter>
<codenoid> and it wasnt 100% finish to make a new version :smile: :+1:
fmcevoy has joined #crystal-lang
flaviodesousa has joined #crystal-lang
hightower3 has joined #crystal-lang
hightower2 has quit [Read error: Connection reset by peer]
<hightower3>
Hey, I want to define a function like: def myfunc( variable, value), and when this executes I want to compare value of @variable with value. Am I right in thinking that since there is no #send, the only way to do this is to switch( variable) and 'case' each possible value?
<FromGitter>
<Ragmaanir> can anybody help me with this problem: https://carc.in/#/r/29x2 ? i need to specify the type of a instance variable because it is initialized lazily. but the type is determined by a macro and it looks like i cannot put that type in "@a : T". The only way to solve this might be to use a macro that delegates to `run` i think.
snsei has joined #crystal-lang
balduin has quit [Ping timeout: 240 seconds]
hightower2 has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
<FromGitter>
<bew> @bararchy you could use `my_array.map(&.to_u)` then the compiler will automatically call `Array#to_unsafe` which will pass a pointer to the fun
<FromGitter>
<bew> Notice that the array you pass to the fun may be collected by the GC, you should save it in user-land until the array's not needed
<FromGitter>
<bew> s/user/crystal
snsei has quit [Remote host closed the connection]
<crystal-gh>
[crystal] MakeNowJust opened pull request #4641: Makefile: fix to work 'make help' when using Makefile.local (master...fix/makefile/help-work-when-use-makefile-local) https://git.io/vQBqY
snsei has joined #crystal-lang
snsei has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
<FromGitter>
<Ragmaanir> btw anyone tried out visual studio with crystal? how is it? any suggestions for plugins?
<FromGitter>
<sdogruyol> VS Code
<FromGitter>
<sdogruyol> @faustinoaq s plugin is great
<FromGitter>
<faustinoaq> Hi crystal community!, new version of Scry (Language Server Protocol for Crystal) is here :point_right: https://github.com/kofno/scry
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
balduin has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
<FromGitter>
<straight-shoota> I might checkout VS code soon ;)
Nouv has quit [Quit: Nouv]
<FromGitter>
<faustinoaq> :smile: Remember to turn on the features on your settings.json, because They're disabled by default (some performance issues, I have a old machine :sweat_smile: )
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<FromGitter>
<mgarciaisaia> :wave: Hi everyone! Trying to fix up all the mess that came with the release :)
<FromGitter>
<mgarciaisaia> I know very little about GPG, so if anyone feels you could help me get an insight of how to solve the issue, please don't be shy
<FromGitter>
<mgarciaisaia> The Debian release was made with a brand new subkey of the GPG key that has been used up until 0.22.0. I really hoped that the subkey, being generated by the master one, would be equally trusted - but it seems it isn't. Last night I've `gpg --export`ed the pubkey an published it to keys.gnupg.net, just in case, but it doesn't seem to be enough. ⏎ Am I missing something?
<FromGitter>
<drosehn> I'm afraid that I have such a limited and vague understanding of GPG that I'd be more likely to send you in the wrong direction.
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
<FromGitter>
<elorest> @mgarciaisaia Thanks. If I have any insights I’ll let you know.
<FromGitter>
<elorest> @straight-shoota Yeah that looks like the same issue. Thanks
<FromGitter>
<mgarciaisaia> We'll *eventually* make Travis honor the picked Crystal version, too - but, for now, the Debian repo only contains the latest Crystal version, so you couldn't install a past version even if you wanted to.
sz0 has joined #crystal-lang
snsei has joined #crystal-lang
hightower2 has joined #crystal-lang
tilpner_ has joined #crystal-lang
tilpner has quit [Quit: :wq]
tilpner_ is now known as tilpner
ChickeNES has quit [Ping timeout: 240 seconds]
ChickeNES has joined #crystal-lang
Renich has quit [Quit: Renich]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snsei has quit [Read error: Connection reset by peer]
snsei has joined #crystal-lang
balduin has quit [Ping timeout: 246 seconds]
snsei has quit [Remote host closed the connection]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
balduin has joined #crystal-lang
<crystal-gh>
[crystal] asterite opened pull request #4649: Fix #4639: Macro lookup from included module broken (master...fix/4639-macro-lookup-from-included-module) https://git.io/vQROW
<FromGitter>
<hyanmandian> Hey guys, I trying to use travis for CI, but i receive some errors...
<FromGitter>
<bararchy> How comes ⏎ a = Array(Float32).new(5, 0.1_f32)
<FromGitter>
<hyanmandian> I found a issue opens on github, but without answers
<FromGitter>
<hyanmandian> Has anyone ever experienced this?
<FromGitter>
<straight-shoota> see posts above
<FromGitter>
<hyanmandian> HAHAHA nice... I have not seen it :( Thanks!
<oprypin>
good idea, that's what i think it wants - a preallocated buffer
<FromGitter>
<bararchy> Interesting :)
<FromGitter>
<bararchy> Ok, so the issue is that The lib will create the array , so I can't use the array build or slice, I only get a pointer to the first member, I do know how long the array is, can I use that to enumerate values ?
<FromGitter>
<bararchy> or something ?
<FromGitter>
<bararchy> Is there a Pointer.next or something haha
<oprypin>
bararchy, ... have you even used this library in C?
<FromGitter>
<bararchy> Nope, Used the binding in Ruby, now trying to port to Crystal
<FromGitter>
<bararchy> but I got the full docs
<FromGitter>
<bararchy> it's just that I don't have too much expirenace in C and low level memory\pointer play
<oprypin>
please show an example of usage of this
<FromGitter>
<straight-shoota> this should handle the case where you get a pointer and size: `Slice.new(pointer, size).to_a`
<FromGitter>
<bararchy> I'll add it to the libs needed list
<FromGitter>
<johnjansen> make sure you let the FANN author know, it should be in crystalshards.xyz already … its not really ‘needed’ anymore, since you have done it already ;-) excellent work
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]