ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Crystal 0.23.1 | Fund Crystal's development: | GH: | Docs: | API: | Gitter:
Poeticode has quit [Changing host]
Poeticode has joined #crystal-lang
<FromGitter> <bitmappergit> ```code paste, see link``` []
<FromGitter> <jwaldrip> Hey, anyone available to help with some YAML PR I am working on. I am trying to find out how the `YAML::PullParser` translates into calling the right args on `LibYAML.yaml_scalar_event_initialize`.
gewo has quit [Ping timeout: 246 seconds]
gewo has joined #crystal-lang
rohitpaulk has joined #crystal-lang
snsei has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <johnjansen> on a similar note, anyone like to give me a hint about how to best serialize something like a logger or an http server instance i.e. i want to hijack YAML.mapping and use it for config, instantiating a Logger or HTTP::Server when the config for the app is loaded … i know there are other solutions, im just pondering this one
<FromGitter> <sdogruyol> Morning everyone
<FromGitter> <johnjansen> morning @sdogruyol
<FromGitter> <johnjansen> i think that i might be “everyone” at the moment
<FromGitter> <sdogruyol> Hey @johnjansen how are you
<FromGitter> <johnjansen> great … reverse proxy worked almost immediately … now just reorganizing and getting it all configurable etc
<FromGitter> <johnjansen> weighing up my options
<FromGitter> <sdogruyol> wow, amazing
<FromGitter> <sdogruyol> wild guess but you're getting virtual hosts from config?
<FromGitter> <johnjansen> all sorts actually … a little like the following is the thought right now ⏎ ⏎ ```code paste, see link``` []
<FromGitter> <sdogruyol> better
<FromGitter> <sdogruyol> wish we had unix socket support in http server
<FromGitter> <johnjansen> hmmm
<FromGitter> <sdogruyol> tcp is an overhead here
<FromGitter> <johnjansen> thats getting a bit deeper than i have been thus far ;-)
rohitpaulk has quit [Ping timeout: 240 seconds]
<Renich[m]> o/
<FromGitter> <johnjansen> anyone got something more useful about the `YAML::PullParser` than the API docs or the Source code
<Renich[m]> johnjansen:
<Renich[m]> I like that
rohitpaulk has joined #crystal-lang
<FromGitter> <johnjansen> yeah ive been looking at that, going in circles a little, wanting to hijack a mapping to turn the following YAML ⏎ ⏎ ```logger: ⏎ level: WARN ⏎ directory: logs``` ⏎ ⏎ into a `Logger` instance … []
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <bararchy> It's great to see Ary active again :)
rohitpaulk has joined #crystal-lang
<FromGitter> <renich> @johnjansen this kind of works:
<FromGitter> <renich> but I totally suck at this, hehe
<FromGitter> <renich> You could define "path" as a full path; like /var/log/myapp/my.log
Renich[m] is now known as Renich
<FromGitter> <johnjansen> @renich you can do things like this but its totally ass backwards
<Renich> cool
<FromGitter> <johnjansen> im looking for something akin to a hook on the back of the from_yaml
<FromGitter> <johnjansen> ok thats me for the night … anyone who sees this and has an answer please PM me with it ;-) cheers
alex`` has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9]
<oprypin> RX14, what happened here? seems like either some comments are missing or out of place
DTZUZO_ has quit [Ping timeout: 248 seconds]
alex`` has joined #crystal-lang
<FromGitter> <sdogruyol> someone deleted
mark_66 has joined #crystal-lang
<FromGitter> <crisward> I've got a Room class I'm using with websockets. On this class I have a method which sends a payload to everyone in the room. However I'm getting a `Closed stream (IO::Error)` So I'm guessing my check for a closed socket is incorrect. ⏎ ⏎ ```code paste, see link``` []
<FromGitter> <crisward> Any ideas?
snsei has quit [Remote host closed the connection]
<FromGitter> <crisward> Should I just be wrapping it in a begin / rescue instead ?
<FromGitter> <crisward> do I need to assign socket.closed? to a local variable first?
<FromGitter> <sdogruyol> @crisward you better remove the socket on the
<FromGitter> <sdogruyol> on_close event
<FromGitter> <sdogruyol> I think there's no way to check if a socket is closed other than the event
<FromGitter> <bew> The process about knowing if a socket is closed or not involve a read or write operation. You can't know if it's closed without reading from or writing to it. `Socket#closed?` is only useful when it has already been closed, and you want to check if it's already closed or not, so it won't mess up. But keep in mind that it needs to fail once before you know it's closed..
<FromGitter> <sdogruyol> that sound a bit unintuitive
<FromGitter> <crisward> I do remove the socket on the closed event. When I add a socket to a room, I do ⏎ ⏎ ```socket.on_close do ⏎ remove socket # remove on leaveend``` []
<FromGitter> <sdogruyol> hmm that's unexpected then
<FromGitter> <sdogruyol> how about using a begin .. rescue in your broadcast
<FromGitter> <crisward> the above remove method, pops it off the array of sockets I'm storing. Perhaps there are times when on_close is not fired?
<FromGitter> <bew> Yeah but it's how sockets works
<FromGitter> <sdogruyol> yes there are
<FromGitter> <sdogruyol> for example when the connection is gone in the middle e.g
<FromGitter> <sdogruyol> that
<FromGitter> <sdogruyol> that's why there are some ping / pong / heartbeat mechanisms to check if a socket is alive
<FromGitter> <crisward> I think I'll add a begin rescue. Do you think I should remove the socket from the array in the rescue, or can it recover without reconnecting?
<FromGitter> <sdogruyol> I don
<FromGitter> <sdogruyol> ughh i hate this new keyboard, sorry
<FromGitter> <sdogruyol> i dont think it can recover
<FromGitter> <crisward> OK, I'll remove it. Thanks.
<FromGitter> <sdogruyol> It's better to be a bit defensive 😄
<FromGitter> <crisward> what about this ⏎ ⏎ ```code paste, see link``` []
<FromGitter> <sdogruyol> why not just remove socket in rescue
<FromGitter> <crisward> I'm worried another error type may remove the socket. Not sure what that could be, but I'm presuming socket.closed? will return true if the state has changed since I tried to send the message.
<FromGitter> <sdogruyol> I'm unsure of socket.closed? but it
<FromGitter> <sdogruyol> but it's your call 💃
<FromGitter> <crisward> I'll give the above a go, if it doesn't fix the error, I'll remove the if block. BTW this is only happening on our live site, can't recreate the issue locally. We have lots of people go to the site on mobile. Android seems to keep sockets open when in standby, and these are kept open for hours.
<crystal-gh> [crystal] RX14 closed pull request #4696: improved error message in raise_not_initialized_in_all_initialize (master...feature/better_not_initialized_message)
<FromGitter> <sdogruyol> yeah browsers you know...
<FromGitter> <jose-rodrigues> Hello guys. ⏎ ⏎ I'm having a behaviour with crystal that I don't understand. ⏎ This code: ⏎ ... []
<FromGitter> <sdogruyol> @jose-rodrigues it
<FromGitter> <sdogruyol> it's because b doesn't have a nil
<FromGitter> <sdogruyol> that
<FromGitter> <sdogruyol> that's why it cant be inferred as Parameters
<travis-ci> crystal-lang/crystal#af825b7 (master - improved error message in raise_not_initialized_in_all_initialize (#4696)): The build passed.
<FromGitter> <jose-rodrigues> Thanks. ⏎ ⏎ But in this case why this works? ⏎ ⏎ ```code paste, see link``` []
<FromGitter> <sdogruyol> @jose-rodrigues it's because you are not assigning a new variable 👍
<FromGitter> <sdogruyol> so there's no inference going on
<FromGitter> <bew> what's the easiest way to pass a function pointer to a binding, without the context data? (the function is defined as `fun function; ...; end`)
<FromGitter> <sdogruyol> hey @RX14 nice way to start a day with a merge 💯
<FromGitter> <jose-rodrigues> @sdogruyol still not understand. ⏎ ⏎ if I change the code of `meth1` to: ⏎ ⏎ ```code paste, see link``` ... []
<FromGitter> <sdogruyol> but you're passing a options with Hash(Symbol, String | Int32
<FromGitter> <sdogruyol> and then you try to add a nil
<FromGitter> <sdogruyol> that wont work
snsei has joined #crystal-lang
<FromGitter> <bew> @sdogruyol don't forget: his method has a restriction on the type of the arguement
<FromGitter> <bew> I'm not sure why his second snippet works though
<travis-ci> crystal-lang/crystal#af825b7 (master - improved error message in raise_not_initialized_in_all_initialize (#4696)): The build passed.
<FromGitter> <sdogruyol> yeah there
<FromGitter> <sdogruyol> ughh this keyboard...
<travis-ci> crystal-lang/crystal#af825b7 (master - improved error message in raise_not_initialized_in_all_initialize (#4696)): The build passed.
<FromGitter> <sdogruyol> there's the restriction
snsei has quit [Ping timeout: 276 seconds]
<crystal-gh> [crystal] ysbaddaden closed pull request #4654: Format: refactor 'asm' formatting (master...fix/crystal-format/4625-asm-refactor)
<crystal-gh> [crystal] ysbaddaden closed pull request #4698: Format: raise an error if unclosed paren is found on finish (master...fix/crystal-format/error-if-paren-count-1-more)
<crystal-gh> [crystal] ysbaddaden closed pull request #4747: Display type when inspecting numbers (master...feature/show-int-type)
<crystal-gh> [crystal] ysbaddaden pushed 1 new commit to master:
<crystal-gh> crystal/master a0f31a5 Oleh Prypin: Remove '$0' special syntax
<crystal-gh> [crystal] ysbaddaden closed pull request #4846: Remove dead line of code (master...pointer-useless-loc)
rohitpaulk has quit [Ping timeout: 255 seconds]
Ven has joined #crystal-lang
Ven is now known as Guest37379
<travis-ci> crystal-lang/crystal#72f729b (master - Format: refactor 'asm' formatting): The build passed.
<RX14> @sdogruyol ysbaddaden seems to have had a better start then haha
<FromGitter> <bew> 5 PR merged x)
<travis-ci> crystal-lang/crystal#72f729b (master - Format: refactor 'asm' formatting): The build passed.
<FromGitter> <bew> @RX14 did you take a look at my update on #4614 ?
<RX14> yes
<travis-ci> crystal-lang/crystal#72f729b (master - Format: refactor 'asm' formatting): The build passed.
<travis-ci> crystal-lang/crystal#372481f (master - Format: raise an error if @paren_count > 0 on finish): The build passed.
<FromGitter> <bew> thanks!
<travis-ci> crystal-lang/crystal#372481f (master - Format: raise an error if @paren_count > 0 on finish): The build passed.
<travis-ci> crystal-lang/crystal#a4a5ab8 (master - Display type when inspecting numbers): The build passed.
<FromGitter> <sdogruyol> Merge fest 👏 🔥
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] RX14 opened pull request #4847: Don't show compiler bug message on invalid target machine (master...feature/bugfix/unsupported-arch-error)
<travis-ci> crystal-lang/crystal#a0f31a5 (master - Remove '$0' special syntax): The build passed.
<crystal-gh> [crystal] RX14 closed pull request #4706: Allow `JSON::Builder#field` to accept non-scalar values. (
<jokke> :P
<crystal-gh> [crystal] RX14 closed pull request #4697: Format: fix to format NamedTuple with trailing comma (master...fix/crystal-format/4685-named-tuple-trailing-comma)
<travis-ci> crystal-lang/crystal#a4a5ab8 (master - Display type when inspecting numbers): The build passed.
Guest37379 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <crisward> @sdogruyol is `env.params.body` not a hash? I want to call .to_json on it, but I'm getting an error.
<FromGitter> <sdogruyol> it's
<FromGitter> <sdogruyol> whats your error
<FromGitter> <crisward> ```code paste, see link``` []
<travis-ci> crystal-lang/crystal#a0f31a5 (master - Remove '$0' special syntax): The build passed.
<FromGitter> <crisward> Looks like is evaluated on request, so I'll have to iterate over them, and push them onto a hash I think.
<travis-ci> crystal-lang/crystal#a0f31a5 (master - Remove '$0' special syntax): The build passed.
<travis-ci> crystal-lang/crystal#371276c (master - Remove dead line of code): The build passed.
<travis-ci> crystal-lang/crystal#371276c (master - Remove dead line of code): The build passed.
bmcginty has quit [Ping timeout: 240 seconds]
bmcginty has joined #crystal-lang
<FromGitter> <bew> @crisward or add the needed method:
<FromGitter> <crisward> `env.params.body.as_h` maybe
alex-edf has joined #crystal-lang
<alex-edf> Hi
<FromGitter> <bew> There is a hash under the hood: but it's not public, and giving access to it would break the private-ness.
<alex-edf> Is there a way to tap in tuple when defining method?, like in Haskell
<FromGitter> <bew> I'm not sure what you mean, do you have an example?
<alex-edf> fst3 (a,_,_) = a
<alex-edf> f (a,_,_) = a
<alex-edf> thr3 (_,_,c) = c
<alex-edf> snd3 (_,b,_) = b
<alex-edf> oups
<alex-edf> excuse me for that
<travis-ci> crystal-lang/crystal#371276c (master - Remove dead line of code): The build passed.
<FromGitter> <bew> is it the example?
<FromGitter> <krypton97> Just curi
<FromGitter> <krypton97> Curious, what were you using haskrll for?
<FromGitter> <krypton97> Haskell*
<FromGitter> <krypton97> Aslo provide an pseudo code
<FromGitter> <krypton97> ,,a,, lol
<FromGitter> <bararchy> Is there a way to use Crystal without GC ? As in manually clean stuff out ?
<jokke> bararchy not atm
<FromGitter> <bew> :/
<jokke> barachy: i have a minimal stdlib on my todo list which wouldn't use a gc
<jokke> barachy: for bare metal?
<Papierkorb> bararchy, that's no fun to use at all btw. Crystal isn't built for that, and it shows.
<alex-edf> krypton97: I just started learning Haskell and see that in function def
<alex-edf> I don't think there is an equivalent
snsei has joined #crystal-lang
<alex-edf> there is |(a,b)| tapping in .each list, but that's not the same thing
<alex-edf> no way to do that in method def
<alex-edf> |(a,_,c,_)|
<FromGitter> <bararchy> Papierkorb could be :) just playing around ATM.
<travis-ci> crystal-lang/crystal#c932ced (master - Allow `JSON::Builder#field` to accept non-scalar values. (#4706)): The build passed.
<alex-edf> so we could do `foo tuple` and just tapping in the interesting parts
<FromGitter> <bararchy> jokke yeha , embedded
<RX14> alex-edf, just recieve the suple and deconstruct it in the first line
<RX14> using foo, bar, baz = tuple
<RX14> it takes up 1 line extra space but is much more readable
<alex-edf> looks reasonable
<FromGitter> <bararchy> BTW , someone know if we got NTLM support in HTTP::Client ?
snsei has quit [Ping timeout: 255 seconds]
<travis-ci> crystal-lang/crystal#e3763f6 (master - Format: fix to format NamedTuple with trailing comma (#4697)): The build passed.
office_boy has joined #crystal-lang
<travis-ci> crystal-lang/crystal#c932ced (master - Allow `JSON::Builder#field` to accept non-scalar values. (#4706)): The build passed.
<office_boy> How can I invoke a macro so that it declares a method to be part of a module, rather than the global scope?
<Groogy> Morning!
<Groogy> office_boy you invoke the macro inside the module
<Groogy> the macro will expand the code where you use it
<FromGitter> <bew> Hi Groogy!
<office_boy> Thanks Groogy, got it :)
<travis-ci> crystal-lang/crystal#c932ced (master - Allow `JSON::Builder#field` to accept non-scalar values. (#4706)): The build passed.
<Groogy> though it still has to be same kind of code as if you weren't using a macro, so if you want the method to be available to call you have to do def self.method_name
<office_boy> Also, is there a way to give a macro parameter a default value, the way you would do: def method(param="default"), for example
hightower2 has joined #crystal-lang
<FromGitter> <bew> as in `macro hey(param = "default")` ?
<office_boy> Yes, can you do that?
<FromGitter> <bew> did you tried?
<office_boy> Good question, should have probably tried. Just did and it works :P soz
<FromGitter> <bew> ;)
Groogy has quit [Quit: WeeChat 1.9]
<FromGitter> <faustinoaq> > Is there a way to use Crystal without GC ? As in manually clean stuff out ? ⏎ ⏎ @bararchy Then, What is `GC.disable` for? ⏎ ⏎ Also, Would be posible to customize `fun main` and prelude to *not* load GC? []
<FromGitter> <bew> @faustinoaq you can always use your own prelude file, and redefine `main`
<FromGitter> <bew> about `GC.disable` it's just the garbage collector that doesn't run iirc, so it'll fill up the memory, but you still don't have control on it I think
<FromGitter> <faustinoaq> @bew Thanks you, so, Can I remove `GC.init`? 👇 ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ What would happen? 😅 []
<travis-ci> crystal-lang/crystal#e3763f6 (master - Format: fix to format NamedTuple with trailing comma (#4697)): The build passed.
alex-edf has quit [Ping timeout: 240 seconds]
<FromGitter> <bew> @faustinoaq you'll enter the 4th dimension probably 😆
<FromGitter> <bew> What would happen? I think that any allocation will fail/raise/crash
office_boy has quit []
<FromGitter> <faustinoaq> 😆 So Still would be possible to use Stack memory? I mean `StaticArray`, `fun`, `struct`etc
<FromGitter> <bew> I you don't try to allocate anything, yes
<jokke> barachy: i thought of hacking something together using newlib nano
<Papierkorb> faustinoaq, you can use all memory, including heap, you just have to use a memory allocator manually (LibC.malloc is fine). The part where it comes crashing down is that almost everything in the stdlib will gladly allocate memory (which you can override, no biggie), but will rely on the GC (which you don't have) to release that memory later on. And that's the part where writing code becomes un-fun, Crystal was created with the assumption
<Papierkorb> of automatic memory management.
<Papierkorb> Sorry, wrong window
<FromGitter> <bew> ?
<Papierkorb> Even with wrong focus *inside* the irc window. Great. Nevermind >_>
<FromGitter> <bew> ahah ^^
w-p has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 246 seconds]
DTZUZO_ has joined #crystal-lang
zaiste has joined #crystal-lang
zaiste has quit [Client Quit]
zaiste has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
zaiste has quit [Quit: Textual IRC Client:]
zaiste has joined #crystal-lang
<crystal-gh> [crystal] RX14 closed pull request #4843: YAML | JSON.mapping presence: true option. (master...json-yaml-key-presence-option)
hightower2 has quit [Read error: Connection reset by peer]
<FromGitter> <bararchy> I'm thinking about adding an NTLM api, would it make sens to PR it to STD or as external shard ?
<FromGitter> <bararchy> I think that HTTP::Client might one to use it
<FromGitter> <bararchy> @sdogruyol Do you happen to have a need for NTLM auth for Kemal ?
<FromGitter> <sdogruyol> unfortunately
<travis-ci> crystal-lang/crystal#43c52d3 (master - YAML and JSON.mapping presence: true option (#4843)): The build passed.
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> XD
Philpax has quit [Ping timeout: 246 seconds]
Philpax has joined #crystal-lang
<FromGitter> <codenoid> my boss tell me to write cr application to py because cr wasnt support multi threading yet
<FromGitter> <bew> -_-
<FromGitter> <bew> `-_-`
<FromGitter> <sdogruyol> python is also single threaded and has gil lol
<FromGitter> <bew> cr with fibers is way better than python with "threads"
<FromGitter> <sdogruyol> indeed
<FromGitter> <codenoid> idk, he is pythonholic
<FromGitter> <fridgerator> <- also currently having to write a flask application, would much rather use crystal but its not an option right now
<FromGitter> <bew> you could ask him a program, and you bench it in python, then in crystal, show hom the results, and let him decide!
<FromGitter> <sdogruyol> I'd be happy to hear the reason though @fridgerator
<FromGitter> <fridgerator> The main purpose is to read netcdf files
<FromGitter> <fridgerator> for which there currently isn't a crystal lib, other than one I tried to start :
<FromGitter> <sdogruyol> oh makes sense
<FromGitter> <fridgerator> i'm not a huge python fan, so this is painful, lol
Philpax has quit [Ping timeout: 255 seconds]
<FromGitter> <jwaldrip> Can I cast a C union to one of its underlying types... for example, the following does not work... ⏎ ⏎ `````` []
<FromGitter> <jwaldrip> @asterite @RX14 ?
<FromGitter> <bew> why not use `` ? (never tried)
<RX14> @jwaldrip no don't you access unions by member
<RX14> like @bew said
<RX14> that's how you use unions
<Papierkorb> sizeof in macro would be so nice
<FromGitter> <jwaldrip> Cant call style, its not on every type in the union
<FromGitter> <jwaldrip> ```code paste, see link``` []
<FromGitter> <jwaldrip> I need to access the underlying method, but I cannot
<FromGitter> <bew> you forgot `scalar` between `data` & `style`..
<FromGitter> <bew> (the name of the field in the union)
<FromGitter> <jwaldrip> BOOM
<FromGitter> <jwaldrip> awesome, thank you
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
<FromGitter> <krypton97> Who's running in production here? I need a tip
<FromGitter> <sdogruyol> shoot me
<FromGitter> <krypton97> Does changing the backend language make the css loads faster?
<FromGitter> <krypton97> We're using node.js now and css is delaied with like 1 seconds after the html has loadeed
<FromGitter> <krypton97> delayed*
<FromGitter> <sdogruyol> uhm now that's mostly related to cdn if you arent on local server
<Papierkorb> Erm, you're not using node.js to serve static files, or do you?
<FromGitter> <krypton97> It's kinda annoying, I don't wanna use the spinner
<FromGitter> <sdogruyol> or than that the static file server can make a difference unless you're using reverse proxy
<FromGitter> <krypton97> I do use node js
<Papierkorb> For serving assets?
<FromGitter> <sdogruyol> using node for static files is no good
<FromGitter> <krypton97> check here
<FromGitter> <krypton97>
<Papierkorb> Yeah no wonder it's dog slow in that case. Use NGINX. Thank us later.
<FromGitter> <krypton97> you can see there's an delay
<FromGitter> <sdogruyol> yeah nginx bids well
<FromGitter> <krypton97> Will nginx fix that?
<RX14> you can try it
<FromGitter> <sdogruyol> sure
<RX14> and it'll be the right thing to do
<FromGitter> <krypton97> or switching to crystal will fix
<RX14> even if it doesn't help perf
linuksz has joined #crystal-lang
<FromGitter> <sdogruyol> nginx is the go to tool for static files, reverse proxy e.g
<RX14> don't use crystal it doesn't do caching properly
<RX14> (yet)
<FromGitter> <krypton97> oh ok
<Papierkorb> krypton97, exposing node.js to the user is *always* the wrong thing to do
<RX14> I'm considering making a PR which is essentially a helper for serving static files
<FromGitter> <sdogruyol> Kemal does some good caching though @RX14
<FromGitter> <krypton97> there's also fasthttp in golang that I have worked with it
<Papierkorb> Replace nodejs with any other backend server like rails, or crystal
<linuksz> how can i read a character from standard input?
<FromGitter> <sdogruyol> have you tried kemal yet @krypton97
<RX14> i need to implement range header parsing and such
<FromGitter> <krypton97> Ok, for the frontend stuffs I've tried all I can do with cdn, direct linking with style, but no inline css
<Papierkorb> krypton97, and the delay also stems from you not sending the correct caching headers
<FromGitter> <sdogruyol> Have you checked Kemal source there's partly working ranges @RX14
<FromGitter> <krypton97> Haven't used kemal yet
<FromGitter> <krypton97> Will css inline style help?
<Papierkorb> Please no.
<FromGitter> <sdogruyol> nope
<FromGitter> <sdogruyol> dont do that
<RX14> yeah but that uses a regex
<RX14> and it only supports 1 range
<RX14> doesn't deal with overlap, etc
<FromGitter> <sdogruyol> yeah partly
mark_66 has quit [Remote host closed the connection]
<FromGitter> <krypton97> Ok, the only options I got left is switchign the backend or adding nginx
<FromGitter> <sdogruyol> you're aiming for full spec?
<RX14> of course
<FromGitter> <krypton97> Anyway, there might be another issue that slows it
<FromGitter> <sdogruyol> that'd be lovely
<vegai> how would people generally feel about supporting only clang?
<RX14> i wouldn't be heppy unless i supported the whole RFC
<FromGitter> <krypton97> or nvm
<RX14> vegai, for what? the linker?
<FromGitter> <sdogruyol> @vegai its ok
<vegai> RX14: I suppose that's the only part that crystal needs?
<RX14> yes
<RX14> it might be using lld for the lniker
<RX14> but it's likely not
<Papierkorb> vegai: "Only clang" for what?
<Papierkorb> Oh there
<RX14> and no, we can't possibly force the installation of clang everywhere we need to link
<RX14> why would we go so far as only supporting clang when we don't even know the problem yet
<RX14> we only know of 1 workaround: use clang
<RX14> which is a hint at the problem
<vegai> I guess a better way to do this would be to understand why gcc doesn't work, yes ;)
<RX14> exactly
<Papierkorb> Is your gcc installation outdated?
<RX14> an even better way would be to use a linker directly
<RX14> not sure of the downsides to that though
<vegai> Papierkorb: I don't think so, this is Debian sid
<RX14> it might not be better
<vegai> gcc-7.1.0
<Papierkorb> Which would most likely introduce funny problems with linking to c libs one never even heard of RX14
<RX14> why?
<RX14> we don't pass c files to the lniker
<Papierkorb> Wouldn't surprise me, really
<vegai> 14:54 < RX14> and no, we can't possibly force the installation of clang everywhere we need to link
<RX14> cc mostly passes the args through
<vegai> we can force the installation of gcc, then? :)
<RX14> no
<RX14> we require *a* cc
<RX14> not gcc
<vegai> indeed
<RX14> not clang
<RX14> a cc
<vegai> I could try to dig into this if I had a clue what to do
<RX14> i'm sure noones tried it but tcc might even work
<Papierkorb> Though `gcc` is a fair guess on a linux system for the most part
<RX14> ^
<vegai> well, Debian doesn't have it, neither does Arch
<vegai> in the base install, that is
<Papierkorb> Developers don't have the bare-minimum base install
<Papierkorb> Heck, it's part of the "base development" package group, whatever it's called
<vegai> yes, there it is on both distros
<vegai> build-essential on debian, base-devel on Arch :)
<Papierkorb> Which is what developers have, because they need it to do anything at all
<vegai> that is true
<Papierkorb> I mean you even need libgc on top of that
<vegai> one stackoverflow article mentioned a possibility that library dependencies could be in the wrong order, which might cause a linking by gcc to fail
<Papierkorb> yup
<vegai> can I make the process more verbose somehow, so I could see all the things that get called
<vegai> "make crystal" that is
<RX14> copy the compiler command from make crystal
<RX14> add -v
<RX14> it prints the cc command
<RX14> you might want to try --single-module
<RX14> or actually just stick --cross-compile on
<RX14> that's the easiest way to get the lniker command
<RX14> it's not exactly the way the linker is used without --cross-compile
<RX14> but if it reproduces then it's enough
<vegai> umm...
<linuksz> how can i read a character from stdin?
<Papierkorb> linuksz: unicode character, or single byte?
<linuksz> unicode char
<Papierkorb> IO#read_char
<vegai> RX14: is it interesting that the build succeeds with --cross-compile?
<RX14> yes
<RX14> but perhaps not surprising
<linuksz> Papierkorb: and which io should i invoke the read_char method?
<Papierkorb> linuksz: STDIN
<linuksz> so STDIN.read_char ?
<Papierkorb> yes.
<linuksz> thanks.
<vegai> RX14: --verbose reveals that -lffi is not on the command line in the call to cc
<vegai> neither in the call to clang, though
<RX14> well why would it be
<RX14> and what requires it
<vegai> dunno, the original error message contains this
<vegai> //usr/lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line
<vegai> hence me making blind observations
<RX14> soo
<vegai> yeah...
<RX14> libffi is getting in there
<RX14> most likely from the llvm-config invocation
<RX14> or someone's pkg-config
<FromGitter> <Val> @vegai #1269 #3721 #4829 or #4825 related may be
<FromGitter> <Val> @vegai try `--link-flags='-lffi'`, it worked for me (see )
greenbigfrog has quit [Quit: The server of my BNC just shutdown or got killed!!!]
<vegai> Val: okay
<vegai> Val: yeah, that works too
<FromGitter> <Val> This bug is very annoying
<FromGitter> <sdogruyol> lffi lol
<vegai> why does a linking started by clang not need it?
<vegai> what's funny about it? :)
<FromGitter> <Val> My colleagues keep using Go because of this :-/
<RX14> if that's the reason they give it's probably more that they don't really want to
<RX14> it's 1 compiler flag
<FromGitter> <Val> I think so =)
<FromGitter> <Val> The `--link-flags` should be documented here :o)
<FromGitter> <bitmappergit> it was suprisingly easy to learn the basics of crystal
DTZUZO_ is now known as DTZUZO
linuksz has quit [Ping timeout: 268 seconds]
<FromGitter> <sdogruyol> @bitmappergit glad to hear that
<vegai> so, do you have any idea what should be done about the linking issue?
<vegai> seems like it's also holding up the CI
<FromGitter> <jasdeepsingh> hey everyone! just a few days back I published my very first Crystal shard: ⏎ It's in it's early stages, but i've laid down a roadmap for the project. Any feedback, good or bad is welcomed. ⏎ Hoping to contribute more packages. ⏎ ⏎ PS: Enjoying working with Crystal. []
<vegai> I mean, I can happily live with just using clang, I have no relationship to gcc :)
<vegai> I'd be even fine with not supporting gcc at all
tatey has quit [Quit: ZNC -]
tatey has joined #crystal-lang
<Papierkorb> bitmappergit, have a look at `#loop`, `Int#downto`, possibly `pp` and also `Enumerable#map`.
<Papierkorb> bitmappergit, it's unecessary to explicitly write the type of an array literal that is not empty, like on line 25
<FromGitter> <bitmappergit> i know
<FromGitter> <bitmappergit> originally it was empty
<FromGitter> <bitmappergit> well not that one
<FromGitter> <bitmappergit> but 1 and 2 were
snsei has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <bitmappergit> how do i set a variable's type
<Papierkorb> The notation is in general: `NAME : TYPE = VALUE`, while the `: TYPE` part mostly optional is
<Papierkorb> Though you only really need that for class and instance variables, method arguments if you want (rarely: need), block arguments. It's highly unusual to type local variable in that way.
<FromGitter> <bitmappergit> no it's just i was getting a buffer overflow i think
<FromGitter> <bitmappergit> couldn't tell cause output was getting cut off
rohitpaulk has joined #crystal-lang
linuksz has joined #crystal-lang
linuksz has quit [Quit: Leaving.]
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium]
nikkkk has joined #crystal-lang
nikkkk has quit [Client Quit]
greenbigfrog has joined #crystal-lang
<crystal-gh> [crystal] RX14 closed pull request #4614: On macro run error: show status, stdout and stderr (
sz0 has quit [Quit: Connection closed for inactivity]
relaxbox has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> why is there no description to `downto` in devdocs
<Renich> o/
<travis-ci> crystal-lang/crystal#5accf4e (master - On macro run error, show status, stdout and stderr): The build passed.
<FromGitter> <LuckyChicken91_twitter> nope
<vegai> LuckyChicken91_twitter: because nobody wrote docs for it :)
<FromGitter> <LuckyChicken91_twitter> okay do you maybe know what downto does?
<vegai> probably more or less the same what ruby's does
<FromGitter> <bew> @LuckyChicken91_twitter
<FromGitter> <LuckyChicken91_twitter> oh now i understand
<FromGitter> <LuckyChicken91_twitter> its just counting up
<vegai> or.. down?
<FromGitter> <bew> counting up with `upto`, counting down with `downto`
<vegai> aye
<vegai> I suppose it would be an "easy" task to write docs for all the methods
<FromGitter> <LuckyChicken91_twitter> yes this is logical
<crystal-gh> [crystal] bew opened pull request #4850: Fix macro run error for multi-line outputs (master...fix-multi-line-output-for-macro-run-errors)
<travis-ci> crystal-lang/crystal#5accf4e (master - On macro run error, show status, stdout and stderr): The build passed.
Renich has left #crystal-lang ["User left"]
zaiste has quit [Quit: Textual IRC Client:]
<crystal-gh> [crystal] bew opened pull request #4851: Beautify ECR errors (master...clean-ecr-error)
rohitpaulk has quit [Remote host closed the connection]
<vegai> is omnibus-crystal the thing that builds all the binary releases?
<vegai> is it still active? Seems like it has a couple fresh issues but the latest commit to master is year old
<FromGitter> <straight-shoota> yes
<FromGitter> <bitmappergit> i'm getting this Error in type must be Int64, not Int32 ⏎ ⏎ n : Int64 = 2
<FromGitter> <bew> `2`'s type is `Int32`, if you want it to be an `Int64` you can write `2_i64` (or `2i64`)
<FromGitter> <bew> @straight-shoota what kind of comment did you meant for #4851 ? like a `# comment`?
<crystal-gh> [crystal] RX14 closed pull request #4850: Fix macro run error for multi-line outputs (master...fix-multi-line-output-for-macro-run-errors)
w-p has joined #crystal-lang
<travis-ci> crystal-lang/crystal#6278e34 (master - Fix macro run error for multi-line outputs (#4850)): The build passed.
<FromGitter> <LuckyChicken91_twitter> What happens if im using `Int64` on an 32 Bit Computer?
<watzon> It should just be a little slower, right guys?
imusingnotepad has joined #crystal-lang
<imusingnotepad> how could I define an Int16 integer variable?
<FromGitter> <bew> `42_i16` or `42i16`
<imusingnotepad> why do i need to write this and not directly "Int16"?
chova has joined #crystal-lang
relaxbox has quit []
relaxbox has joined #crystal-lang
<imusingnotepad> wait.. why is this so buggy? if im entering "myinteger = 1 | 42i16 ; puts myinteger" then im getting 43!
<FromGitter> <bew> `|` is the binary OR operator, I think you meant to use `||`, the logic OR operator
<imusingnotepad> i just wanted to define a 16bit integer
<oprypin> i have no dea what was meant because it doesnt make sense either way
<FromGitter> <bew> true
<FromGitter> <bew> imusingnotepad, what language do you come from? JS?
<imusingnotepad> ehw yes
nikkkk has joined #crystal-lang
<watzon> And he's using notepad
nikkkk has quit [Client Quit]
<watzon> Lol
<FromGitter> <bew> ok, to define an Int16, just write `myinteger = 42_i16`
<FromGitter> <bew> this will define `myinteger` as an In16, containing the value 42
<imusingnotepad> oooh
<imusingnotepad> but where are the 86 bits?
<FromGitter> <krypton97> I started with js too
<oprypin> imusingnotepad, sorry, 86?
<FromGitter> <krypton97> well, c++ if I take school in consideration
<imusingnotepad> yes
<oprypin> there was never such a thing
<watzon> Where, pray tell, did you get 86 from?
<imusingnotepad> but theres x32, x64 and x86
<watzon> Nooooo lol
<watzon> 32 bit = x86
<watzon> For the 32-bit generation of this architecture that is also referred to as "x86"
<imusingnotepad> wat?!
<travis-ci> crystal-lang/crystal#6278e34 (master - Fix macro run error for multi-line outputs (#4850)): The build passed.
<watzon> Says it right there in the article
<imusingnotepad> really? 86 bit are just meaning 32 bit? i always thinked our technolegy is so good that we are alrady having 86 bit computers
<watzon> It's not 86 bit is the thing, it's the x86 architecture
<FromGitter> <bew> where in the wikipedia page did you see 86 beeing associated with 'bits'
<oprypin> wikipedia is an afterthought
<imusingnotepad> okay when will we probaly have a higher bit computers than 64?
<watzon> x86 is a legacy naming from the 8086 microprocessor
<oprypin> imusingnotepad, there's no advantage to it.
<watzon> Yeah the only benefit I could see would be for extreme floating point precision
<travis-ci> crystal-lang/crystal#6278e34 (master - Fix macro run error for multi-line outputs (#4850)): The build passed.
<imusingnotepad> wow there are already 512-bit computers
<oprypin> i dont think that's accurate
<watzon> There are, however, quantum computers
<watzon> Try to wrap your head around that one
<imusingnotepad> but why cant i define an 128-bit then? just because crystal isnt supporting it?
<watzon> Almost no language supports it
<watzon> And very few processors exist that support it
<oprypin> imusingnotepad, yes, just because crystal does not choose to do a fake integer type that does not have actual support from the CPU
<watzon> There would be no point in doing so
<oprypin> i have no idea where you're going with all this
<watzon> Nor I
<imusingnotepad> all this is very new for me
<imusingnotepad> i was always in the 8 16 32 64 bit world. But now i know that there are already other bits
Groogy has joined #crystal-lang
<oprypin> look, you were always in the 52 bit world in javascript
<Groogy> Hiya!
<imusingnotepad> I think 512 bit will be the default on every computer in year 2089 or something
<watzon> Lol
<oprypin> sigh
<Groogy> lol why would we need that much memory
<Groogy> I mean 64bit is not even that new, just the need for it become a thing now
<oprypin> many still say 32 bit is all u need
<watzon> In reality it is for most applications
<Groogy> Our games still run on 1GB
<Groogy> or well around there
<watzon> The way I think of it is the more bits you have the better the floating point precision
<oprypin> Groogy, haha no
<watzon> And you don't really need more precision than 64 bits provides usually
<Groogy> wwll it is probably closer to 1.5GB
<Groogy> large address aware though if our modders do crazy stuff
<imusingnotepad> is somewhere a list where i can see how much for example in an 8bit fits?
<Groogy> 256 different states
<FromGitter> <drujensen> all i need is my 8bit arduino and i’m good. ;-)
<watzon> imusingnotepad: what do you mean?
<oprypin> imusingnotepad,
<oprypin> well yeah wiki link is bette
<FromGitter> <LuckyChicken91_twitter> ooh thank you!
<watzon> 8 bits is everything from 0 to 255 or `0b11111111`
<Groogy> also dang it @drujensen, somehow my brain thought arduino was some kind of cappucino and now I want coffee
<FromGitter> <bew> Groogy x)
<watzon> 8 ones for 8 bits
<FromGitter> <drujensen> haha
<Groogy> oprypin I don't work at CD Project Red :P I didn't mean all games, I meant specifically the ones I've worked on
<oprypin> k
<imusingnotepad> im finding it cool that its still possible to program 8bit games or something
<watzon> 32 bits goes all the way to 4,294,967,295
<watzon> and 64 to 18,446,744,073,709,552,000
<Groogy> huh can you tell the compiler to only do 8bit pointers?
<watzon> I also find this kinda cool, but I also started with JavaScript and then moved on to bigger and better things
<oprypin> Groogy, uh wut no?
<Groogy> no was refering to imusingnotepad and didn't think that is possible
<oprypin> memory addresses almost never use low integers because they're reserved
<Groogy> I mean you can choose to write all the integers in 8bit and so on but you will still have a larger memory address range than in 8bit systems
imusingnotepad has quit [Quit: Page closed]
<watzon> Looks like imusingnotepad is done with us
<Groogy> aw :(
<watzon> I wish Crystal was stable already. I'm starting a rather large project for a client and I would love nothing more than to use it
<FromGitter> <mgarciaisaia> Yeah, I'm not *that* sure that's an issue
<Papierkorb> ah man, I missed all the fun
<watzon> Yeah you did
<watzon> 86 bits of fun
<Groogy> did I miss something?
<FromGitter> <mgarciaisaia> Given that: 1) you're not forced to upgrade to the latest Crystal; 2) breaking changes arent *that* big; and 3) the compiler *really* helps you notice what's to be fixed
<Groogy> for me I just want full-fledged windows support :(
<watzon> Unfortunately it is an issue with the client though. I'd normally just use it anyway, but he doesn't want me to
<watzon> So alas, JavaScript it is :'(
<FromGitter> <mgarciaisaia> It's not 1.0-stable yet, but calling it "alpha stage" is just us being *really* conservative
<watzon> How fad do you think we are from 1.0? I know there's still quite a bit to do
<watzon> far*
<Groogy> mgarciaisaia do you work on it?
<Groogy> also do someone know how the linkage happens with shared libraries?
<Papierkorb> watzon: "quite a bit to do" sounds like the most reasonable estimate to give
<Groogy> I am trying to figure out how it manages to link correctly with OpenGL when it shouldn't
<Groogy> are methods resolved on first usage?
<Groogy> or on launch?
<Papierkorb> At compile time
<Papierkorb> and likely virtuals at run-time for overloading, no idea
<watzon> mgarciaisaia: you work for humanas, right?
<oprypin> Papierkorb, there's actually little happening at compile time
<Groogy> Yeah thought so
<oprypin> at least at runtime it needs to find the library file and look up the function in the symbol table
<FromGitter> <mgarciaisaia> *Humanas* sounds a great name :)
<FromGitter> <mgarciaisaia> I work at Manas, yeap
<Groogy> only way I can explain why the symbols don't need to be reloaded is because it is resolved after I create the OpengL 4.5 context
<oprypin> but there's at least something happening at compile time
<watzon> I knew I got it wrong lol
<Papierkorb> oprypin: that's what the loader does, nothing much Crystal does
<watzon> Manas*
<FromGitter> <mgarciaisaia> I'm the one to blame for the issues with 0.23.0 ^_^
<watzon> If you guys ever want to hire a gringo my wife and I would love to come down to Argentina ;)
<watzon> Lol
alex`` has quit [Quit: WeeChat 1.9]
<FromGitter> <mgarciaisaia> More than happy to host you if you want to come :)
<FromGitter> <mgarciaisaia> As for the job, we're currently looking for devs, so shoot a CV at :)
<watzon> Her spanish is much better than mine. I speak better Portuguese :D
<FromGitter> <mgarciaisaia> Don't think our ugly pesos will make a gringo happy, but you can try :)
<watzon> Hahahaha
w-p has quit [Ping timeout: 240 seconds]
<Groogy> for curiousity I checked for a career page on but alas nothing :P
<Groogy> do love the actual coffee meter on the site
<watzon> I've checked for that as well
<FromGitter> <mgarciaisaia> 😹 It's *really* hidden in our Staff page... which is hidden already
<Groogy> ah lol the "put your picture here" button?
<FromGitter> <mgarciaisaia> :)
<oprypin> but that's still just a contact email
<FromGitter> <mgarciaisaia> We did a nice looking site, but there are a couple of basic things we haven't added yet `¯\_(ツ)_/¯`
<watzon> Pretty sure I wouldn't have a hard time convincing my wife to move
<FromGitter> <bew> Crystal => 2951 hours, nice!
<watzon> She loves South America
<Groogy> you gotta sell yourself more for the potential hires :P
<watzon> Groogy: are you guys using Crystal?
<Groogy> no
<watzon> For shame ;p
<Groogy> Crystal is just my hobby, would be impossible to convince people to switch
<Groogy> I am just happy I finally managed to make us move to Git
<Groogy> from subversion
<watzon> Hahaha. Oh I remember having to do that. I had to start from scratch though...
<Groogy> took me 4 years of nagging ;D
<watzon> With Salesforce
<watzon> shudders
<Groogy> oh hey Papierkorb you were the one that wanted to use the logo together with another right?
<Groogy> did you get an answer on that?
<oprypin> Groogy, it most likely was the Qt logo
<oprypin> someone else was talking about Crystal logo but i dont think it was anything in partiuclar
<oprypin> and the answer is here anyway
alex`` has joined #crystal-lang
<watzon> Ooh me likey
<oprypin> i get so triggered every time i open a page's source and the headings don't have anchor ids
<watzon> That'll make things easier when I get around to starting a Crystal tutorial series on my YouTube channel
<FromGitter> <mgarciaisaia> So I've built LLVM 4.0.1 on the usual Centos VMs (the ones at omnibus-crystal), and, whenever I try to use *that* LLVM to build the Crystal compiler in Debian 7, it fails horribly:
<FromGitter> <bew> oprypin yeah me too, no way to share specific information..
<FromGitter> <mgarciaisaia> LLVM required upgrading `gcc` version, which in Centos could be done via the `devtoolset`s things they have. I've used the newer gcc 4.8-something to build LLVM, and then succeeded compiling Crystal in that same Centos but with the stock, older gcc 4.3
<oprypin> mgarciaisaia, i have nothing helpful to say but i'm not surprised by this. so is there any good reason to not use LLVM compiled for the same OS you're using it on?
<FromGitter> <bew> wow gcc is old there, I have v7.1.1
<FromGitter> <mgarciaisaia> I think the idea is that it's only arch-dependent, so it shouldn't matter which distro you've compiled in - that's how we have been doing this since I'm aware of the process
<FromGitter> <mgarciaisaia> Besides that, Debian has a gcc 4.4 I think, so it can't build LLVM 4.0.1 - and if I upgraded gcc for building Crystal, it would depend on a newer libstdc, so it won't work on stock Debian 7's (like what happened with 0.23.0)
<oprypin> why is g++ involved here, again?
<FromGitter> <bew> I think he meant libc, not libstdc
<oprypin> this looks like trying to compile (at least a part of) LLVM with GCC
<FromGitter> <mgarciaisaia> @oprypin that's a good question - the failing command is a `g++` one
<FromGitter> <mgarciaisaia> It's trying to compile `src/llvm/ext/llvm_ext.o`
<Papierkorb> Groogy: Didn't ask as I scratched the idea. Figured that besides Manas I'd also need to contact Digia for Qt. Doesn't sound worth the hassle for now.
<oprypin> Papierkorb, you know what is worth the hassle?
<Papierkorb> Telling you what new stuff works today?
<Papierkorb> C++ template instantiation for sequential containers, aka, std::vector, QList, QVector
<oprypin> Papierkorb, no you know what i want
<Groogy> what interesting things are you talking about Papierkorb?
<Groogy> C/C++ wrapper or something for Crystal?
<Papierkorb> on a more serious note, it's not far off for a public preview. However, tomorrow I won't have much time, neither sunday. Still have to post-process some photos I took (models are waiting). Maybe Monday or Tuesday
<Papierkorb> Groogy: Qt bindings for Crystal, the generator could (and will?) be taught some more tricks for more general C/C++ libs though
<oprypin> Papierkorb, yeah just make it complicated enough so i dont understand it, and wait until i dont have time
chova has quit [Ping timeout: 260 seconds]
<oprypin> mgarciaisaia, I think it's just code that does not support this compiler anymore, simply enough
<oprypin> i'm curious why this llvm_ext is not shipped across platforms the same way, the same claims should apply to it
<FromGitter> <bew> when I do `my_array += [1, 2]` will it create a new array? or will it add the second to the first one?
<oprypin> bew, create a new array
<FromGitter> <bew> hmm ok, 'll use #concat then, thanks
<FromGitter> <johnjansen> on that topic … wouldnt any change create a new array and replace the old one?
<oprypin> no
<FromGitter> <johnjansen> k
<FromGitter> <johnjansen> good to know
<oprypin> well there are some technical details
<oprypin> of course the underlying buffer could get recreated at any time
<FromGitter> <mgarciaisaia> LLVM was compiled in Centos with gcc4.8.2. I *could* compile Crystal in Centos with gcc 4.4.7, but fails on Debian with gcc 4.7.2
<FromGitter> <johnjansen> thats more what i was thinking … i probably worded it badly
<FromGitter> <mgarciaisaia> So it's a version in the middle the one that's failing
<oprypin> mgarciaisaia, this is not about what you compile LLVM with, it's about what you compile these with
<FromGitter> <mgarciaisaia> Those are (trying to get) compiled with gcc 4.4.7 (works) and 4.7.2 (fails)
<oprypin> johnjansen but it doesnt have to be every change, u can have an array of size 9 capacity 16 and add 5 items to it - no recreation
<oprypin> oh huh, then I'm probably wrong
<FromGitter> <mgarciaisaia> *Oh* I'm lying to you! I think the build process uses the newer GCC for Crystal itself, too. So *that* makes sense. I'll try that.
<oprypin> mgarciaisaia, but in any case, doesn't it make more sense to build llvm_ext on the same system that llvm is built on
<FromGitter> <bew> note: lying is conscious I think, if you didn't know you were wrong, you weren't lying
<FromGitter> <mgarciaisaia> @oprypin mmm... I'm don't know *that much* about that. For a starter, that llvm_ext is on Crystal's repo, not even in omnibus-crystal. So, it may be a totally abitrary decision, but I should check first if there's any good reason why that's compiled with the compiler itself instead of LLVM
<FromGitter> <mgarciaisaia> I'm trying to build on Centos with gcc 4.7.2 (the same that Debian uses). If this fails, it's because of the compiler, yeap
<oprypin> no if this fails then that doesnt explain anything
<oprypin> if you compile almost the same codebase with the same compiler it shouldn't fail on a different system
<oprypin> oh wait, I totally misunderstood again
<oprypin> you are correct
<FromGitter> <mgarciaisaia> :)
<FromGitter> <jwaldrip> So YAML exposes. Should YAML::ANY aloud to be any type ⏎ ⏎ ```enum ScalarStyle ⏎ ANY ⏎ end``` []
<oprypin> ?
<FromGitter> <mgarciaisaia> 🎉 It failed with gcc 4.7.2 in Centos - so the issue is gcc compat
<FromGitter> <mgarciaisaia> Don't have a single clue regarding *how* to bypass that, but at least it's consistent
<Papierkorb> oprypin: I can't know your time constraints. In terms of complexity, this project is a complexity monster by its very definition. I already have some rules in place (documented, even) to "combat" it. Though these docs are something I push beyond the initial TP release. Quality is king. I can't write good docs right off the bat, so that's postponed. Feature-wise, there's a bug in the subclassing stuff. After the current feature, and that,
<Papierkorb> I'll add a bunch of classes to the configuration (Though with each new class, things get easier, as the generation simply got more robust). And then it's time for the TP. In terms of PR-able things, there are big amounts of possible things, ranging from simple to hard. Don't misread simple as "boring". For the actual code generation, one requires solid C++ knowledge - For the clang backend tool, for the generated C++ code, and overall.
<Papierkorb> The Crystal wrapper is more about converting things back and forth, though this is considering the age of the project in a good place already I think. With the TP feature-set, focus will shift more on the Crystal-side, there's actually something really important to do - If you know about LibEvent's ins and outs.
relaxbox has quit [Ping timeout: 240 seconds]
<oprypin> Papierkorb, there's one metric for complexity that I have - the amount of code. to me personally, no amount of documentation can compensate for it
<oprypin> do you not understand that it is extremely hard for someone to understand the logic of the whole setup when the core parts are interspersed with newer features
<oprypin> by core i don't mean in terms of separating code into parts, just in terms of what came first
<oprypin> for someone who follows from the start and understands the evolution, documentation is not needed
<oprypin> all i ask is code in any state from its earliest states
<Papierkorb> Sure it's hard to get into a large codebase. However, I'm here and you can indeed ask what's going on. In fact, you should. I'll take note and, while responding, will later on write more about these parts. Hopefully, that'll help not only you, but also others
<oprypin> i cannot work that way
<oprypin> Papierkorb, for what reason are you unable to take the folder with code you currently have and dump it somewhere?
hightower has joined #crystal-lang
<Papierkorb> For the reason that I worked hard, over a decade, to get to a state where I take pride in my code, and only release/deliver when I know that it's a show-case of my current abilities, and I can proudly proclaim "This thing may not be perfect, but it's polished and meets a (for my understanding) high quality-level".
<oprypin> Papierkorb, share it privately? i won't judge
<FromGitter> <bitmappergit> ok
<FromGitter> <bitmappergit> i simplified the code
<oprypin> this is not a reason, nobody's going to tell you wow awesome project but in this first you had this thing, you suck
<oprypin> in this first commit*
<FromGitter> <bitmappergit> are you talking to me oprypin
<oprypin> nope
<FromGitter> <bitmappergit> ok
<Papierkorb> Privately? Sure. Lemme fix the current thing that just blew up (sometimes it's really whack-a-mole), then I'll /query you a zip dump
<FromGitter> <johnjansen> @bitmappergit what is that code for?
<FromGitter> <bitmappergit> collatz conjecture
<oprypin> thank you
<FromGitter> <bitmappergit> it goes thhrough all the possibilities
<oprypin> bitmappergit, those ` : Int64` are entirely redundant
<FromGitter> <bitmappergit> really?
<oprypin> also fun fact, it only recently became possible to write these restrictions for local variables
<FromGitter> <johnjansen> also, why the sleep just OOI
bew has joined #crystal-lang
bew has left #crystal-lang [#crystal-lang]
<FromGitter> <bitmappergit> it was running way too fast
<FromGitter> <bitmappergit> that's just to slow it down
<FromGitter> <johnjansen> not normally a complaint ;-)
<oprypin> ayy just run it in ruby
<FromGitter> <johnjansen> haha
bew has joined #crystal-lang
<FromGitter> <bitmappergit> this is why
<FromGitter> <bitmappergit>
<oprypin> i don't get it?
<FromGitter> <bitmappergit> 380mb text file after 5 seconds
<FromGitter> <bitmappergit> i'm piping the output to tee
<FromGitter> <bitmappergit> that's what happens without the sleep
<oprypin> well of course it's strange to put it all into a text file
<FromGitter> <bew> I'm wondering how you're gonna use this output, without any annotation on what are each numbers, etc
<oprypin> bew, the annotations are all there - number of iteration; sequence of numbers to arrive to something
<oprypin> but that doesnt make it useful
<FromGitter> <bew> I meant, in the generated file
<FromGitter> <bitmappergit> it's not supposed to be useful
<FromGitter> <bitmappergit> it's for fun
<oprypin> so don't write it to a file, problem solved
Philpax has joined #crystal-lang
<FromGitter> <bitmappergit> i was looking on the code golf stackexchange
<FromGitter> <bitmappergit> and i saw this crystal code
<FromGitter> <bitmappergit> c=/[aeiouy]/ ⏎ x,y,z=ARGV[0].partition /[^aeiouy]*#{c}*/ ⏎ k=z[0] ⏎ b=((i="pgtvkgbqrzdfs"=~/#{k}/)?"bcdfgkpqrstvz"[i]: k)+z[c] ⏎ p y+k+b*2 []
<FromGitter> <johnjansen> that might be ruby
hightower has quit [Read error: Connection reset by peer]
<FromGitter> <bitmappergit> no
hightower has joined #crystal-lang
<FromGitter> <johnjansen> what have i missed
<FromGitter> <bitmappergit> it's just really hard to understand
<FromGitter> <johnjansen> let me rephrase, that could be ruby
bew is now known as bew78
<oprypin> can confirm, runs on ruby
<oprypin> i actually cant find any way in crystal to use both ARGV and put the program in stdin
<oprypin> for ruby i did `ruby - coverage` and paste the program
<FromGitter> <mgarciaisaia> Nice to see this supporting Crystal - didn't knew it
<oprypin> mgarciaisaia, did earlier
<FromGitter> <mgarciaisaia> 💙
bew78 has left #crystal-lang ["Leaving"]
<Papierkorb> For the logs, d12195b4ab964b706ef13dbd71a60bcd94bb8d657d85ed918e48f2caf4492648 preview.tar.gz
bew78 has joined #crystal-lang
<FromGitter> <bew> awesome! (any way poor gitter users could get access to it?)
<Papierkorb> I simply posted the sha256 of the archive as timestamped proof of its origin. You know what linus once said? Let people mirror your stuff as backup? Thanks y'all.
<FromGitter> <bew> huh sorry but I don't get it
<Papierkorb> bew, also, no. It's a one-time thing. The public technical preview will be out in a few days at max however.
<FromGitter> <bew> oh, ok no prob' !
<Papierkorb> bew, posting the hashsum of that archive, before posting it to its recipient, acts for me as insurance, as proof of origin. I can proof that I'm the original author of the work. I can proof it by simply publicly sharing the link to the archive of that hashsum. This measure was never necessary in the past, and I hope that it will never be necessary to enact in the future.
<FromGitter> <bew> I see, neat :)
<Papierkorb> bew, The important bit of this thing is of course publicizing the hash to an audience. I just abused everyones eternal log for that. This is "Proof of Ownership" is pretty near in practice (and in theory, pretty far from) the blockchain network, where you do a "Proof of Work" (or other kinds) using a hash of similar style. In that case, the audience is the distributed network, and not some IRC channel ;) in any case, if I did pike your
<Papierkorb> interest a bit, I want to encourage you to learn more about it. It's a huge treasure trove of good ideas (and bad implementations).
<FromGitter> <bew> yeah I learned a bit on how blockchains actually works (for cryptocurrencies), but I never thought of other possible applications like this one. thanks for your details!
bew78 has quit [Quit: Leaving]
<FromGitter> <mgarciaisaia> We should probably just stop implementing things, and be happy enough knowing that *ideally* they work awesome
<Groogy> "Everything worked perfectly until QA added all the bugs"
<Papierkorb> Business could be so nice, the customers really stink though. We should get rid of them and their requests to save money.
<FromGitter> <johnjansen> Life would be great if only everyone would let me do whatever I want
alex`` has quit [Ping timeout: 255 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
Yxhuvud has quit [Remote host closed the connection]