ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Crystal 0.23.1 | Fund Crystal's development: | GH: | Docs: | API: | Gitter:
A124 has quit [Quit: '']
A124 has joined #crystal-lang
solarlune is now known as solarluneAFK
<FromGitter> <iamonkara> Any idea if Crystal has or plans to support Erlang style Supervisors ?? ⏎ This would be a killer feature and for me at least would be a no brainer to move from RoR to Crystal instead of RoR to Elixir
wes[phi] has joined #crystal-lang
wes[phi] has quit [Ping timeout: 240 seconds]
<FromGitter> <faustinoaq> @iamonkara Someone already commented this in a disqus comment and in reddit and now here 😅 ⏎ ⏎ I think core developers are using Erlang at Manas, so maybe They already took some ideas from Erlang. ⏎ ⏎ But as far I know They are thinking in something similar to Guild in Ruby 3. Also currently we are using CSP model for concurrency. [
<FromGitter> ... l-lang/crystal?at=59bb247eb59d55b823f9c932]
<FromGitter> <iamonkara> @faustinoaq u caught me red handed with reddit/disqus 😟 thanks for the reply though
<FromGitter> <faustinoaq> don't worry 😉
<FromGitter> <bigDaddyS1oth> Hey all, got a challenge for you all: rewrite tmuxinator in crystal
elbuki has quit [Quit: - A hand crafted IRC client]
elbuki has joined #crystal-lang
elbuki has left #crystal-lang [#crystal-lang]
<FromGitter> <fridgerator> eeesh
<FromGitter> <faustinoaq> I was reading this ⏎ ⏎ What would happen if we make almost all types mandatory in Crystal with just a bit of type inference? ⏎ ⏎ It would allow to compile programs faster ? []
<crystal-gh> [crystal] icyleaf closed pull request #4814: HTTP::Response: set default cookie domain (
<FromGitter> <opensas> I was wondering the same, perhaps with just the public types (return value and input params of every public method) would be enough to compile every source file independently, and allow for incremental compilation. More over, the compiler could warn you when there's a missing typ preventing it from doing incremental compilation. That way you would only need to define types if you need/want to compile faster.
greengriminal has quit [Quit: Leaving]
<FromGitter> <ansarizafar> Mandatory types is a great idea.
snsei has joined #crystal-lang
solarluneAFK is now known as SolarLune
hightower4 has joined #crystal-lang
DissonantGuile has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
baweaver is now known as baweaver_away
rohitpaulk has joined #crystal-lang
alex`` has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
alex`` has quit [Client Quit]
rohitpaulk has joined #crystal-lang
baweaver_away is now known as baweaver
Papierkorb_ has joined #crystal-lang
<Papierkorb_> Ohayo ~
snsei has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
<Groogy_> Morning! o/
Groogy has quit [Disconnected by services]
Groogy_ is now known as Groogy
Groogy2 has joined #crystal-lang
<FromGitter> <sdogruyol> Morning everyone
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <faustinoaq> Morning :)
<FromGitter> <faustinoaq> I was thinking that I did more answers than questions in AMA last week. 😅
ShalokShalom has quit [Ping timeout: 252 seconds]
<FromGitter> <sdogruyol> that's great @faustinoaq
ShalokShalom has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <faustinoaq> 👍
rohitpaulk has joined #crystal-lang
alex`` has joined #crystal-lang
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
<FromGitter> <krypton97> Morning :)
DTZUZO has quit [Ping timeout: 252 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <marin117> hi :D
<FromGitter> <crisward> Trying to trigger something on a bunch on listeners. Can anyone see anything wrong with this thanks.
<FromGitter> <crisward> Apart from the horrible indenting 😉
<FromGitter> <sdogruyol> it seems ok
bmcginty has quit [Ping timeout: 240 seconds]
bmcginty has joined #crystal-lang
ShalokShalom has quit [Read error: Connection reset by peer]
<Groogy> @faustinoaq AMA? Link?
<Groogy> Error 503 first byte timeout
<Groogy> :(
<Groogy> huh wat on that page
<Groogy> if you remove the last / then it works
<FromGitter> <faustinoaq> It's works well here
<FromGitter> <faustinoaq> Hey someone knows if exist some way to rename symbols across project
<FromGitter> <faustinoaq> something like
ShalokShalom has joined #crystal-lang
<Groogy> ow yeah I should write an issue on the VSCode plugin that I've been meaning to for a long time
<Groogy> need to just figure out exactly how the bug happens
<Groogy> (intendation gets fucked by something, not 100% sure what)
<FromGitter> <faustinoaq> Groogy, you mean this issue 👉
<Groogy> yeah
<Groogy> that is probably it
<Groogy> it drives me so insane XD
<Groogy> Also on > I want Windows support, but I agree with Doug. I think after 1.0, more people will join to Crystal community and do Windows port easier.
<Groogy> I think 1.0 should not be announced before Windows support is somewhat done because you only get one first impression. And knowing the internet, even if Windows support ocmes a month later the idea will already be stuck for a long time following as "the language that don't support Windows"
<FromGitter> <faustinoaq> Yeah, I agree, but I don't know how much work is needed to support Windows ;)
<Papierkorb_> Nice. My awful bag of words processor script runs (with minimal changes) thrice as fast as the ruby version.
rohitpaulk has quit [Ping timeout: 248 seconds]
<hightower4> ++
SolarLune has quit [Quit: Leaving]
ShalokShalom_ has joined #crystal-lang
ShalokShalom has quit [Ping timeout: 248 seconds]
<FromGitter> <bararchy> Papierkorb_ bag of words you say ? Normalizing data for a classifier ? ;)
<Papierkorb_> Yup. Gotta clean that thing a "bit" more though I guess. I'll learn how lol.
<FromGitter> <bararchy> If its open on github , let me know ,I might be able to help a bit
<Papierkorb_> Ain't exactly classified, though I guess our customers wouldn't be fazed by me putting it up there :P
<Papierkorb_> AI is pretty new to me. Always wanted to do something with it, but never knew what to do, so I never really learned it
<Papierkorb_> If you can recommend any blogs or so, I'm all ears
<FromGitter> <bararchy> Maybe it will give you a few ideas
<FromGitter> <bararchy> What is it you are trying to classify ? Categories ? Spam ?
<Papierkorb_> Categories
<FromGitter> <bararchy> Also , this is a really good one in ruby
<Papierkorb_> Basically, I have a fair amount of ecommerce data, and want to fiddle with it. Classification is a big one. The data is already category-tagged too. Have about >60M records available.
<FromGitter> <bararchy> What do you want to classify it by ?
<FromGitter> <bararchy> If its already categorised
<Papierkorb_> Well basically, I want to have a classifier I can give a search term, and it then tells me which category/ies it fits best
<FromGitter> <bararchy> So a bayes classifier is the best , you will need to teach it on current data (which you have a good amount of) and let it learn what data goes to what category , then it should be able to make the decision it self for new data
<crystal-gh> [crystal] RX14 closed pull request #4945: GC.enable: raise if GC is not disabled (master...bug/gc-enable)
<Papierkorb_> bararchy, sounds good. Will try that :)
<FromGitter> <bararchy> Good luck , ping me if you need any advice :)
<Papierkorb_> Unrelated to that, Say I collect data when I do an action in my smart house (when I open windows, ...). How could I build it that when the software detects a pattern of me doing an action?
<Papierkorb_> Like "Korb opens the window on Monday to Thursday at 5pm, but on friday at 4pm"
<FromGitter> <bararchy> Neural network , its the best approach to non-liner classifying and pattern detection
sija has joined #crystal-lang
<FromGitter> <bararchy> Papierkorb_ as in , day 1 you brought a bottle of water , day 2 you brought 2 bottles , day 3 etc.. This is statistics and a liner growth even us simple humans can recognize the pattern , but when its day 1 brought 2 bottles , day 2 no battles , day 3 brought 6 bottles , etc... We need a neural network to cluster the data and try to find a pattern
sija has quit [Client Quit]
<travis-ci> crystal-lang/crystal#6013227 (master - GC.enable: raise if GC is not disabled (#4945)): The build passed.
<DeBot_> (GC.enable: raise if GC is not disabled)
<FromGitter> <bararchy> For this specific example (smart house) I would use unsupervised learning , maybe GNG or other algorithm for data clusterrning , its basically a class of problems named "user behavior analysis" , it is used to find human patterns
<FromGitter> <Qwerp-Derp> I feel like every time I bring up an issue it's been dealt with already (that's a good thing, not a bad thing :D)
<Papierkorb_> input "blue green working shoes" -> `Home & Garden > Kitchen & Dining > Tableware > Drinkware` ... nailed it.
<RX14> well if you ask daniel ricciardo...
<Groogy> have an event this weekend so I get no crystal coding done :(
<Groogy> I'll have to settle with just looking at whatever you guys link here
<FromGitter> <sdogruyol> @RX14 who's that?
<Papierkorb_> that football player?
<Papierkorb_> or was that some other dude?
<FromGitter> <sdogruyol> watching asterite doing awesome work is also great @Groogy :)
<FromGitter> <sdogruyol> OT Aur still doesn't have LLVM 5.0 on extra...
<RX14> Papierkorb_, formula 1 driver who drinks from his shoes on the podium
<Groogy> yeah really nice he fixed the GC issue
<FromGitter> <sdogruyol> @RX14 that's gross :/
<RX14> lol
<Papierkorb_> Well, let's hope there's enough alcohol to kill anything in that shoe that may live lol
<FromGitter> <ekremkaraca> Hey guys, I'm the one who was created some screencasts about Crystal language. I've recognized that there's huge visit from here, gitter. I'd like to thank you all!
<FromGitter> <ekremkaraca> Especially my friend, @sdogruyol!
<FromGitter> <sdogruyol> hey @ekremkaraca welcome
<FromGitter> <sdogruyol> we have some crowd here 😄
<Groogy> Need English TL though :/
<FromGitter> <ekremkaraca> Thanks so much again. Hope there will be English 🙏
<crystal-gh> [crystal] RX14 closed pull request #4972: debug: don't set end_location at function exit (master...bug/debug-end-location)
<Groogy> awesome!
<FromGitter> <ekremkaraca> I mean, screencasts in English
rohitpaulk has joined #crystal-lang
<FromGitter> <sdogruyol> Cool 💯
<FromGitter> <bararchy> @ekremkaraca thanks for spreading the Crystal religion further ;)
<FromGitter> <bararchy> Eng version would be really appreciated
<FromGitter> <zyriuse75> hi everyone
<FromGitter> <sdogruyol> We have a strong community in Turkey
<FromGitter> <sdogruyol> 😉
<FromGitter> <zyriuse75> i've a question i fork the doc repository and i would want to push on my fork and not on the master how i can do that ?
<FromGitter> <zyriuse75> i already create my feature
<FromGitter> <sdogruyol> add your fork remote
<FromGitter> <sdogruyol> ```git remote add my-fork```
<FromGitter> <sdogruyol> and then push to it
<FromGitter> <sdogruyol> ```git push my-fork your-branch```
<FromGitter> <zyriuse75> thanks Serdar
<FromGitter> <zyriuse75> i started to translate the doc in French
<FromGitter> <sdogruyol> @zyriuse75 that's great
<FromGitter> <sdogruyol> meanwhile I guess you can ask @ysbaddaden since he's also French :)
<FromGitter> <zyriuse75> aah a compadres !!
<FromGitter> <ekremkaraca> @bararchy thanks so much! that's why we are here.
<travis-ci> crystal-lang/crystal#c0cac8d (master - debug: don't set end_location at function exit (#4972)): The build passed.
<DeBot_> (debug: don't set end_location at function exit)
<FromGitter> <zyriuse75> sorry but i dont understand why i cant see mu push on my fork ?
<Papierkorb_> mh?
<Papierkorb_> exts, "this"?
<FromGitter> <sdogruyol> why not?
<FromGitter> <exts> dynamic controllers, but this seems really hacky at a second look
<FromGitter> <exts> mmm time to shake off my and test something
LastWhisper____ has joined #crystal-lang
snsei has joined #crystal-lang
thews has quit [Ping timeout: 240 seconds]
thews has joined #crystal-lang
<crystal-gh> [crystal] bcardiff closed pull request #4962: Make Tuple and NamedTuples .types to return tuples of metaclasses (master...fix/tuple-types)
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <ekremkaraca> Hi again, in my free time, I made a Crystal screencast in English. It's short introductory video:
<FromGitter> <ekremkaraca> Thanks for your feedback!
mark_66 has quit [Quit: Leaving.]
<FromGitter> <sdogruyol> @ekremkaraca 👍 👏
mark_66 has joined #crystal-lang
<FromGitter> <ekremkaraca> I may begin a new series depending on your feedback, I know there are some pronunciation issues.
<FromGitter> <ekremkaraca> That's the thing I'm worrying about :(
Papierkorb_ has quit [Quit: Konversation terminated!]
<FromGitter> <sdogruyol> @ekremkaraca how about removing your face from the screencast
<FromGitter> <sdogruyol> that's a bit distracting tbh
<travis-ci> crystal-lang/crystal#4b1e14f (master - Merge pull request #4962 from bcardiff/fix/tuple-types): The build passed.
<DeBot_> (Make Tuple and NamedTuples .types to return tuples of metaclasses)
<FromGitter> <ekremkaraca> @sdogruyol no problem
<FromGitter> <ekremkaraca> It would be helpful for my oldie laptop, it might consume less CPU
rohitpaulk has joined #crystal-lang
ShalokShalom_ is now known as ShalokShalom
<crystal-gh> [crystal] asterite opened pull request #4976: Codegen: don't incorrectly share metadata across llvm modules (master...bug/4973-incorrect-debug-code)
wes[phi] has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
wes[phi] has quit [Ping timeout: 255 seconds]
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <jwaldrip> Adding yaml core schema to the basic parser. Anyone know why `alias YAML::Type = alias Type = String | Hash(Type, Type) | Array(Type) | Nil` contains a hash of `Type => Type`?
<FromGitter> <jwaldrip> and why not `String => Type`
<Papierkorb> If YAML supports it, why not?
<FromGitter> <asterite> In YAML you can have any type as a key
<FromGitter> <jwaldrip> Really?
<FromGitter> <jwaldrip> I did not know that...
<FromGitter> <jwaldrip> trying in ruby, one sec
<FromGitter> <asterite> Me neither, until I implemented the initial code :-)
<FromGitter> <asterite>
<FromGitter> <jwaldrip> sure enough: ruby -r "yaml" -e 'puts YAML.load(%{[a]: b})'
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] RX14 closed pull request #4974: Don't find type parameter T of generic type that's not the current type (master...bug/4460-fix-generic-type-bug)
<FromGitter> <jwaldrip> what is the `?`
<FromGitter> <asterite> It probably means what comes next is a key of a mapping
<FromGitter> <jwaldrip> gotcha
<FromGitter> <asterite> "A question mark and space (“? ”) indicate a complex mapping key"
<FromGitter> <asterite> From
<FromGitter> <asterite> (I'm also learning :-D)
<FromGitter> <jwaldrip> So when I make `alias Type = Bool | Int64 | Float64 | Time | String | Nil | Hash(Type, Type) | Array(Type)`
<FromGitter> <jwaldrip> the spec gives me a strange error, trying to trace it down
<FromGitter> <jwaldrip> `doc[0].raw == doc.raw` gives me...
<FromGitter> <jwaldrip> parses recursive sequenceInvalid memory access (signal 11) at address 0x7fff4f224ff8
<FromGitter> <jwaldrip> from this spec:
<FromGitter> <jwaldrip> ```code paste, see link``` []
<FromGitter> <jwaldrip> had to change `be` to `eq` since `be` does not work with `Value`types
<FromGitter> <asterite> Maybe a bug in crystal
<FromGitter> <asterite> Or probably stack overflow
<FromGitter> <asterite> if you are comparing a recursive structure
<FromGitter> <asterite> I would just change it to check that doc[0] is the same (be) as doc, or something like that
<FromGitter> <asterite> Though, I *think* parsing recursive structures is not supported at all by YAML.parse
<FromGitter> <jwaldrip> ah which is probably why the eq doesnt work
<FromGitter> <asterite> Oh, parsing alias and recursive stuff is supported
<FromGitter> <jwaldrip> I cannot use `be` because the union contains both `Value` and reference types.
<FromGitter> <asterite> Yes, ideally Array#==(other) should check for recursiveness, like in Ruby
<FromGitter> <asterite> Same goes for Hash
<FromGitter> <jwaldrip> Ah, so right now Crystal does not?
<FromGitter> <asterite> Nope
<FromGitter> <jwaldrip> hmmm. so im blocked then...
rohitpaulk has quit [Ping timeout: 264 seconds]
<FromGitter> <jwaldrip> unless you think there is another way to do the recurssive tests for yaml
<FromGitter> <jwaldrip> tests pass if I comment those two out...
<FromGitter> <asterite> be(doc[0]
<FromGitter> <asterite> or something like that
<travis-ci> crystal-lang/crystal#3e68043 (master - Don't find type parameter T of current type in superclass. Fixes #4604): The build was broken.
<DeBot_> (cast from Nil to Crystal::GenericInstanceType+ failed)
<crystal-gh> [crystal] asterite pushed 1 new commit to master:
<crystal-gh> crystal/master b5484e4 Ary Borenszweig: Codegen: don't incorrectly share metadata across llvm modules
olbat[m]1 has joined #crystal-lang
olbat[m] has quit [Ping timeout: 246 seconds]
raz has quit [Ping timeout: 246 seconds]
raz has joined #crystal-lang
<travis-ci> crystal-lang/crystal#3e68043 (master - Don't find type parameter T of current type in superclass. Fixes #4604): The build passed.
<DeBot_> (cast from Nil to Crystal::GenericInstanceType+ failed)
<FromGitter> <jwaldrip> NICE, that works... thanks
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] bcardiff opened pull request #4977: Refactor: Remove unused argument in debug_type_cache (master...refactor/debug_type_cache)
snsei has quit [Remote host closed the connection]
<crystal-gh> [crystal] bcardiff closed pull request #4977: Refactor: Remove unused argument in debug_type_cache (master...refactor/debug_type_cache)
rohitpaulk has quit [Ping timeout: 248 seconds]
claudiuinberlin has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<travis-ci> crystal-lang/crystal#cd03b6f (master - Refactor: Remove unused argument in debug_type_cache #4976 (#4977)): The build passed.
<DeBot_> (Codegen: don't incorrectly share metadata across llvm modules) | (Refactor: Remove unused argument in debug_type_cache)
<FromGitter> <bararchy> @ekremkaraca Cool, thanks for Eng version
rohitpaulk has quit [Ping timeout: 255 seconds]
alex`` has quit [Ping timeout: 248 seconds]
<FromGitter> <crisward> How do you send a ping from a web socket connection?
<FromGitter> <crisward> The docs are here
<FromGitter> <crisward> but it doesn't seem to be working, so I'm guessing I'm doing something wrong
<FromGitter> <crisward> Or maybe nginx doesn't proxy pings?
<FromGitter> <faustinoaq> @asterite I'm thinking in a javascript backend for Crystal [0] or maybe a transpiler to Javascript (see: crow (, Do I need to restrict some concept of Crystal and modify all codegen phase ? I think I can reuse the lexer and parser. I'm inspired by Nim and ElixirScript, WDYT ? ⏎ ⏎ [0] -
<FromGitter> <faustinoaq> Opal is a good reference too
<crystal-gh> [crystal] asterite opened pull request #4978: String: optimize gsub and tr for ascii char and single byte string (master...perf/optimize-gsub-and-tr)
<FromGitter> <asterite> It seems like a huge and very difficult task. I don't know how you'll handle lib calls, for example. Or fibers and context switch. Or the GC. I also think typescript, flow or elm are better suited for javascript
<FromGitter> <sandelius> evening from Sweden!
<FromGitter> <faustinoaq> Ok, Thanks for your advice, I enjoy TypeScript, so I think Crystal for backend is good as is. Maybe in the future we can compile Crystal to WebAssembly instead. :)
<FromGitter> <bararchy> Woot, we need to add crystal to current languges ->
<FromGitter> <ekremkaraca> Hey guys, I decided to make some Crystal screencasts in English, but I'm unsure what topics I should select and which order I should follow. Here I've prepared a list of topics, I'll be so glad if you help me to choose topics and sort them:
<FromGitter> <ekremkaraca> @bararchy wikipedia was blocked in Turkey :(
<FromGitter> <bararchy> Oo
<FromGitter> <bararchy> Sorry :\
<FromGitter> <ekremkaraca> @bararchy no problem, hope it will be unblocked soon :)
<FromGitter> <bararchy> @ekremkaraca you should add "variable assginments" , and maybe "classes and objects" ?
<FromGitter> <ekremkaraca> I've opened both English & Turkish articles in wikipedia
<FromGitter> <ekremkaraca> sorry, started
<FromGitter> <eliasjpr> @eliasjpr ⏎ Anyone has an idea on how to start a java -jar process in the background with Crystal? ⏎ I am using there any way to add
<FromGitter> <ekremkaraca> @bararchy I did it, thanks
<FromGitter> <bararchy> @eliasjpr keep in mind, argument (`-jar`) should come in as a 2nd argument
<FromGitter> <bararchy> `"/path/to/java", "-jar blabla")`
<FromGitter> <eliasjpr> gotcha let me try it again
<FromGitter> <bararchy> ```code paste, see link```
<FromGitter> <eliasjpr> sot what I am trying to do is to run the process in the background
<FromGitter> <eliasjpr> something like ⏎ ⏎ ```spawn do ⏎ channel.send ⏎ end ⏎ status = channel.receive``` []
blassin has joined #crystal-lang
<blassin> got a problem using CrSFML, not sure if it's my local libs
<blassin> any help appreciated
<blassin> oprypin: not sure if I should open an issue...
raz has quit [Changing host]
raz has joined #crystal-lang
<oprypin> blassin, i don't have anything to say other than please follow the instructions correctly :(
<oprypin> blassin, did you ever run `make install` for voidcsfml?
<blassin> *sigh* ok, will have a look. I had it working, but reinstalled Fedora and the backup doesn't seem to be working
<blassin> yes
<blassin> here's my ldconfig -v | grep sfml:
<oprypin> blassin, well that's the problem, probably
<blassin> I tried the other method, also didn't work
<blassin> I'll go over it again, sorry anyway
<oprypin> shouldn't have given a choice in the instructions
<oprypin> blassin, please don't install voidcsfml globally, just remove it if at all possible
<blassin> OK
<oprypin> eliasjpr, ok i think you can do that, what's the problem?
<FromGitter> <eliasjpr> Im getting the following error ⏎ ⏎ ```code paste, see link``` []
<oprypin> eliasjpr, error from doing what?
<FromGitter> <eliasjpr> but if I run the command with system it work but it gets attached to the current process
<FromGitter> <eliasjpr> ` "java", args: SELENIUM_COMMAND, shell: true, error:true, output: true).wait`
<oprypin> dont use shell
<oprypin> and what is SELENIUM_COMMAND
<FromGitter> <eliasjpr> ```code paste, see link``` []
<oprypin> just remove the `.join(' ')` and it might actually work
<oprypin> (and remove shell too)
<FromGitter> <eliasjpr> okay the process ran and it booted but it seems to be attached to the current process or is just waiting for it to terminate, I would like to just start the process in the backgroun and shutting down when needed
<oprypin> eliasjpr, well you might expect that if you run `.wait`
<FromGitter> <eliasjpr> gotcha,
<oprypin> did you use a fiber like originaly intended?
<FromGitter> <eliasjpr> yes
<oprypin> ok let's see
<FromGitter> <eliasjpr> one sec Im trying it
<oprypin> eliasjpr, works for me
<oprypin> eliasjpr, works for me
<oprypin> hah gitter doesnt care, actually highlighed "correctly"
<FromGitter> <eliasjpr> k
<FromGitter> <eliasjpr> looking at it
<FromGitter> <eliasjpr> whats exit_code ?
<blassin> oprypin: fixed it, thanks for nudging me in the right direction
<oprypin> blassin, np. sorry for the complicated setup :(
<blassin> is there a better way to do easy-to-share binaries?
<oprypin> sharing binaries works only in DLL hell
<blassin> could I just copy the voidcsfml .so files to my repo?
<blassin> then I would only need SFML 2.4 installed - right?
<oprypin> blassin, then you'd only need SFML compiled by the same compiler that's used now
<oprypin> it's highly unlikely to work on another system
<blassin> crap
<blassin> ok thanks
<oprypin> when i mean same i mean same version
<oprypin> but what's more likely to work is compiling sfml yourself, then compiling voidcsfml on it, and shipping all of those files
<blassin> I see
<blassin> well, thanks again!
blassin has quit [Quit: Page closed]
claudiuinberlin has quit [Quit: Textual IRC Client:]
wes[phi] has joined #crystal-lang
wes[phi] has quit [Ping timeout: 248 seconds]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ShalokShalom has quit [Ping timeout: 248 seconds]
<Papierkorb> apart from the quote .. what is it saying?
<oprypin> can't go without mentioning top reddit comment
wes[phi] has joined #crystal-lang
<FromGitter> <drujensen> `production` is a relative term. If you work for nasa or a hospital, you will have a different standard for `production` than say a small startup company trying to find a first customer. The former, you should get fired, the latter you should be promoted. Most of us are somewhere in between the two extremes and trying to find a safe place to use such an awesome language/tool.
<FromGitter> <crisward> @drujensen couldn't agree more. As the writer of the article, I'm very surprised what happened. I didn't post it to reddit or anywhere else. One of my colleagues in the office tweeted it.
<Papierkorb> I wouldn't advise to use Crystal in production yet. But that mainly stems from the fact that there are things that may blow up, which would reflect badly on the project. As long the developers know of the risks it's fine though. Oh, and I too use the occasional Crystal script @ work.
<Papierkorb> Though those whiny comments on reddit .. oh well. /r/programming in a nutshell.
<FromGitter> <crisward> We're mainly creating marketing websites for small companies. Nothing too demanding.
<Papierkorb> Yes, and on top of that, you're part of the community and know of the involved risks. You wouldn't run around for years saying that Crystal is awful cause you hit a hiccup in the current state. And thus, I applaud your investment into the project!
SolarLune has joined #crystal-lang
<FromGitter> <drujensen> same here 😄
<FromGitter> <crisward> There are more than a few hiccups discoverable in any language, even the very well established ones. The only real danger for crystal is it doesn't reach its full potential.
<FromGitter> <wwselleck> Is there a way to use Kemal in a non-global way? Something like ⏎ ⏎ ```app = ⏎ app.get('/', Handler)``` []
<FromGitter> <crisward> I believe there is a pull request open for that
<FromGitter> <crisward> You use express in the past?
<FromGitter> <wwselleck> yep
<FromGitter> <crisward> Globals aren't quite as bad in crystal / ruby as you can wrap stuff in modules for name spacing. But I also like it more when methods aren't made global.
<FromGitter> <crisward> Also done a lot with node.
<FromGitter> <wwselleck> That PR seems to have stalled :(
<FromGitter> <crisward> Performance issues I seem to remember
<FromGitter> <wwselleck> can the block given to the methods (get, post, etc) be a HTTP::Handler? Like ⏎ ⏎ ```get '/'``` []
<FromGitter> <wwselleck> the function definiton makes me think it has to be a block, but that may just be me misunderstanding crystal
<FromGitter> <crisward> You're right it's a block
<FromGitter> <wwselleck> blargh :\
<FromGitter> <crisward> You can pass blocks around, sort of. Bit like callbacks.
<FromGitter> <wwselleck> you happen to know why? considering you can define middleware as a HTTP::Handler, I don't see why you couldnt do the same for the routes
jhpratt has joined #crystal-lang
jhpratt has left #crystal-lang [#crystal-lang]
<FromGitter> <crisward> I'm pretty sure the router is middleware, when it matches one of your passed in routes, it calls your block
<FromGitter> <crisward> If you just want to separate your routes and handlers you can do...
<FromGitter> <wwselleck> so what if I wanted to do nested routes? ⏎ ⏎ ```get '/api' do |env| ⏎ get '/users' ... ⏎ get '/posts' ... ⏎ end``` []
<FromGitter> <crisward> Kemal doesn't do that.
<FromGitter> <wwselleck> I suppose that's not the end of the world, i coudl probably just make a wrapper class that does that
<FromGitter> <wwselleck> well actually, maybe middelware could be used for that
<FromGitter> <crisward> In my app I've wrapped kemals routes in a module which exposes the routes with a permission handler and only calls the callback if they have the permission. Otherwise it returns 401 if they need to login or 403 if they're logged in without permission. Works well. You could do something similar.
<FromGitter> <wwselleck> Is ur app public by any chance?
<FromGitter> <faustinoaq> @wwselleck you cn try toro (
<FromGitter> <crisward> Sorry no, but I can share a bit..
<FromGitter> <wwselleck> @faustinoaq seems interesting, but really bare bones. Plus community fracturing :\
<FromGitter> <crisward> ```code paste, see link``` []
<FromGitter> <crisward> So my routes are like `Api.get "/duocms/api/users", "users_all", ->all(Ctx)`
<FromGitter> <faustinoaq> @wwselleck Well, Also you can also check Amber ( isn't as simple as Kemal but is really easy to use generators for auth, blogs, crud, models, etc, Amber include some tools for frontend too. In fact the creator of Kemal @sdogruyol is part of Amber community too 😉
<FromGitter> <crisward> Amber looks promising... looking forward to see it develop.
<FromGitter> <crisward> Had roll most of my own stuff when I started this last year.
<FromGitter> <crisward> Above all is just a proc to a method. Ctx is an alias of server context ie, `alias Ctx = HTTP::Server::Context`
<FromGitter> <wwselleck> Amber looks really interesting. I'm generally not a huge fan of mega-frameworks for apps that are more or less just REST APIs, but I might give it a shot.
<FromGitter> <crisward> What I like about this is it forces every route to have a permission. We have a permission called everyone.
<FromGitter> <crisward> I'm the same, I like smaller stuff, hence why I use kemal.
<FromGitter> <crisward> There is also is you want really small.
<FromGitter> <crisward>
<FromGitter> <faustinoaq> Yeah, Amber is still on heavy development 😅 but They are moving at speed of light ( 😄 ⏎ ⏎ Also I have to quote here than Amber was Kemalyst before, and Kemalyst was heavily inspired by Kemal.
<FromGitter> <crisward> I believe Kemal was originally based on something the core devs did before they realise they were stretching themselves too thin.
<FromGitter> <crisward> So is Amber going to be Crystal's Rails I wonder?
wes[phi] has quit [Ping timeout: 248 seconds]
<FromGitter> <crisward> It'll be interesting to see if they decide on a js view layer + json api, instead of the classic html crud app.
<FromGitter> <crisward> @wwselleck How did you find out about Crystal?
<FromGitter> <mverzilli> Kemal was a fork from a Sinatra clone Ary, Brian and Waj wrote at Manas, which was named Frank
<FromGitter> <faustinoaq> Yeah, Kemal was based on Frank ( ⏎ ⏎ > So is Amber going to be Crystal's Rails I wonder? ⏎ ⏎ I hope Amber to be more than Rails, currently Amber is inspired by Phoenix too. ... []
<FromGitter> <faustinoaq> Amber was a Kemalyst fork, Kemalyst was a Kemal fork , Kemal was a Frank fork. 😄 ⏎ ⏎ So, We are all reusing and collaborating together ✨