ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.22.0 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<shelvacu> I could've sworn I remembered a project for converting C header files to crystal lib declarations but I can't find it.
<shelvacu> Anybody know of such a thing?
<shelvacu> Thanks
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
snsei_ has quit [Ping timeout: 255 seconds]
duckqlz has left #crystal-lang [#crystal-lang]
ragmaanir has joined #crystal-lang
<ragmaanir> in postgres: how do i pass an array to a parameter. eg in: "select * from users where id in $1"
<FromGitter> <fridgerator> using crystal-pg ?
<FromGitter> <fridgerator> `where in ($1, $2, $3, $4)`
<ragmaanir> yes, crystal-pg. but what if i want to pass in a dynamic array?
<FromGitter> <drujensen> you could convert it to a string using ` “select * from users where id in ($1)”, array.join(“,”)`
<ragmaanir> but if i join it it will be a string
<FromGitter> <fridgerator> could write a method that builds the `$1, $2, $3` string based on the length of the array, then pass the array as the second parameter
<ragmaanir> "WHERE id = ANY($1::INT[])" gives the same error. not sure what the correct syntax would look like.
<FromGitter> <drujensen> hhmm, you might need to go with @fridgerator idea
<ragmaanir> yeah, i guess. thank you guys
<ragmaanir> ok, i got it to work: "WHERE id = ANY($1::INT[])", but i had to wrap my array in another array. i guess the first time the array was interpreted as multiple parameters instead of as an array.
<FromGitter> <drujensen> :+1:
ragmaanir has quit [Quit: Leaving]
_whitelogger has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
<crystal-gh> [crystal] icyleaf opened pull request #4496: Markdown support mulit blockquotes (master...markdown-support-mulit-blockquotes) https://git.io/vHuyV
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest35264
yogg-saron has joined #crystal-lang
Guest35264 has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven is now known as Guest39608
Guest39608 has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snsei_ has quit [Remote host closed the connection]
yogg-saron has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 268 seconds]
splitty__ has joined #crystal-lang
splitty___ has joined #crystal-lang
splitty_ has quit [Ping timeout: 255 seconds]
splitty__ has quit [Ping timeout: 246 seconds]
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] mverzilli closed pull request #4280: Fixed #4278: String#underscore with digit (master...fix/string/underscore-with-digit) https://git.io/vSyaA
<crystal-gh> [crystal] mverzilli closed pull request #4281: Fix: String#underscore with non-letter char #4278 (master...fix-string-underscore-with-numbers) https://git.io/vSyxY
rohitpaulk has quit [Remote host closed the connection]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<travis-ci> crystal-lang/crystal#da48f82 (master - Fixed #4278: String#underscore with digit (#4280)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/238741679
<DeBot> https://github.com/crystal-lang/crystal/issues/4278 (Strange output of String#underscore with strings of uppercased letters and numbers) | https://github.com/crystal-lang/crystal/pull/4280 (Fixed #4278: String#underscore with digit)
snsei has joined #crystal-lang
yogg-saron has joined #crystal-lang
yogg-saron has quit [Client Quit]
yogg-saron has joined #crystal-lang
<crystal-gh> [crystal] mverzilli closed pull request #4430: Add new `?~` (boolean `=~`) operator. (master...boolean-equal-tilde-operator) https://git.io/vHvDb
LastWhisper____ has joined #crystal-lang
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] mverzilli closed pull request #4426: Add warnings to MD5 and SHA1 hash documentation (master...feature/digest-doc-fix) https://git.io/v9h9h
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/vHzRo
<crystal-gh> crystal/master e7caa7d Akzhan Abdulin: Documentation for OpenSSL::HMAC class. (#4434)
<crystal-gh> [crystal] mverzilli closed pull request #4260: Add OpenSSL::DigestIO to wrap an IO while calculating a digest (master...feature/digest_io) https://git.io/vSKJP
<crystal-gh> crystal/master 2c8fead Chris Hobbs: Add limits to HTTP request parsing (#4428)
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/vHz0I
<RX14> I really hate that you need to buy ISO standards to read them
<travis-ci> crystal-lang/crystal#b8f1504 (master - Add warnings to MD5 and SHA1 hash documentation (#4426)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/238775544
<DeBot> https://github.com/crystal-lang/crystal/pull/4426 (Add warnings to MD5 and SHA1 hash documentation)
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/vHz24
<crystal-gh> crystal/master cc16950 TSUYUSATO Kitsune: Makefile: add 'clean_crystal' target (#4268)...
<FromGitter> <molovo> I’ve got a question for the core Crystal team. Would you be interested in some help triaging issues? I’ve found a few that have been open for a while, with a fix having been merged into master but for whatever reason the issue didn’t get closed automatically. Might help to reduce the size of that list a little bit
<RX14> if you leave a comment on the issues the core team will close them
<FromGitter> <molovo> :thumbsup:
<FromGitter> <mverzilli> definitely, that would be super appreciated :pray:
<travis-ci> crystal-lang/crystal#e7caa7d (master - Documentation for OpenSSL::HMAC class. (#4434)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/238776219
<DeBot> https://github.com/crystal-lang/crystal/pull/4434 (Documentation for OpenSSL::HMAC class.)
<travis-ci> crystal-lang/crystal#66ac243 (master - Add OpenSSL::DigestIO to wrap an IO while calculating a digest (#4260)): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/238776644
<DeBot> https://github.com/crystal-lang/crystal/pull/4260 (Add OpenSSL::DigestIO to wrap an IO while calculating a digest)
<travis-ci> crystal-lang/crystal#2c8fead (master - Add limits to HTTP request parsing (#4428)): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/238777225
<DeBot> https://github.com/crystal-lang/crystal/pull/4428 (Add limits to HTTP request parsing)
<FromGitter> <rena1234> hello, i'm doing a homework for university in what i have to discourse about Crystal. My doubt is if Crystal has primitive types. Thanks
<FromGitter> <eliasjpr> Hello Everyone(@all), ⏎ ⏎ First I would like to apologize for taking this channel as a tool to reach out to the Crystal community. ⏎ ⏎ With no further due, I would like to invite you and people from the Crystal community to collaborate with us on Amber, we started this project with the goal to consolidate community efforts into one cohesive web framework that has a complete toolset for developing
<FromGitter> ... and prototyping web applications, while laveraging on the benefits that the Crystal Language has to offer, we have already made some significant progress and we would like for you to experiment and share your thoughts, findings, and engage with us on this effort. We have recently deploy ambercr.io running on Amber, setup guide docs ... [https://gitter.im/crystal-lang/crystal?at=59319524ca6d4ae80cd5a1ae]
<FromGitter> <eliasjpr> http://www.ambercr.io
snsei has quit [Remote host closed the connection]
<RX14> @eliasjpr the getting started link of the website doesn't do anything.
<FromGitter> <mverzilli> Hey @eliasjpr don't apologize, this is great!
<FromGitter> <mverzilli> excited to see where it goes :)
<FromGitter> <eliasjpr> Thank you @mverzilli
<FromGitter> <eliasjpr> Yes still working on it :) hence why we are asking for help
<FromGitter> <mverzilli> @rena1234 there are primitive types, see: https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/program.cr#L116
<FromGitter> <drujensen> Hi @eliasjpr I’m sure you are aware I’ve been working on Kemalyst for a couple years trying to come up with a Rails alternative. Kemal is focused on the Sinatra approach. Can you tell us where you see Amber is focused? How much overlap with Kemal or Kemalyst? Just wondering if we should combine efforts or is there enough differences that it would make sense to work separately.
<FromGitter> <drujensen> Kemal’s goals are Fast, Effective, Simple. Kemalyst’s goals are to provide an easy transition for Rails developers to move to Crystal. What would you say are your goals for Amber?
<FromGitter> <fridgerator> IMO Amber is more like Phoenix than Rails, but the Amber team is trying to use the best parts of other frameworks. @eliasjpr Can answer those questions better than me though. I have mostly contributed to the websockets implementation.
<FromGitter> <fridgerator> There is no overlap with Kemal.
<FromGitter> <drujensen> Looking at it there is quite a bit of overlap with Kemalyst. Lots of similar ideas.
<FromGitter> <drujensen> The routing is quite different though. Definitely Phoenix like
<FromGitter> <drujensen> actually, its not that different after all
<FromGitter> <drujensen> the plugs are just http::handlers
<FromGitter> <elorest> I would say that routing is more like Phoenix and the controllers are more like rails.
<FromGitter> <drujensen> right, its interesting
<FromGitter> <drujensen> I like the pipeline concept. I was trying to do something similar with defining an array of handlers per route
<FromGitter> <drujensen> so can a route have different plugs?
<FromGitter> <eliasjpr> @drujensen we are no trying to recreate rails we are combining features from multiple frameworks to what works best for developer. For instance one of the discussions that was raised recently in our channel was MVC vs MVP we opted to support both approaches since this is a matter of preference who's using the framework
<FromGitter> <elorest> routes belong to pipes that have different plugs/pipelines. Unlike kemalyst which allows for you to chain handlers before or after the controller. The controller is the end and routes can be defined within pipes that have different plugs.
<FromGitter> <drujensen> aahh, gotcha
<FromGitter> <drujensen> @eliasjpr I love the work your doing. it looks great! I am wondering if I should drop Kemalyst and start contributing to Amber instead
<FromGitter> <drujensen> maybe we can take some of the features and move them over?
<FromGitter> <elorest> I’ve contributed to and am familiar with the stack of both projects. Honestly they’re both really cool. Personally I like the way we do controllers better though versus your more hanami like approach.
<FromGitter> <drujensen> right, we talked about that
<FromGitter> <eliasjpr> We will welcome you with open arms :) and definitely it would be of great value to crystal community to have one concrete effort in matters of web frameworks
<FromGitter> <drujensen> I’ve spent a couple years on Kemalyst and feel like I would be losing a child
<FromGitter> <elorest> You’re already on the maintainer list for https://github.com/Amber-Crystal/amber_cmd
<FromGitter> <elorest> It’s like merging children lol
<FromGitter> <drujensen> but it may be worth it so Crystal doens’t get too fractured like oohh, js? :-)
<FromGitter> <eliasjpr> You shouldn't let's contribute bi directionally and let's see where we head if we feel the paths are similar then we can consider a git merge :)
<FromGitter> <bararchy> @drosehn go for it , put your style in there and your fingerprint in another great project :)
<FromGitter> <elorest> I think it would be awesome to merge but it’s a little unfair to you because you’ve been working on it a lot longer. :/
<FromGitter> <drujensen> ok, I will take a hard look at it. Do you guys have a generator for the rails guys?
<FromGitter> <drujensen> `kgen init app blog`
<FromGitter> <fridgerator> I personally dont see a problem with multiple projects solving the same problem, per se. Most languages have dozens of web frameworks. IMO there should be multiple choices, and the community should decide the best one.
<FromGitter> <eliasjpr> @drujensen 'amber new blog'
<FromGitter> <elorest> I feel like MERB merging with Rails in 2011 was great for ruby and the rails.
<FromGitter> <fridgerator> Not talking about you specifically @drujensen , I've just seen other complains about too many web frameworks
<FromGitter> <eliasjpr> There is a lot of unmaintain crystal web framework code on github
<FromGitter> <eliasjpr> That is discouraging and confusing initially it made me think that all of those are just prototypes
<FromGitter> <drujensen> Amethyst comes to mind
<FromGitter> <drujensen> the whole reason I started Kemalyst
<FromGitter> <elorest> For me everytime improve something on amber I feel obligated to do it in kemalyst as well… wouldn’t mind combining for that reason.
<FromGitter> <drujensen> @elorest I know you like the controllers but you prefer the ORM in kemalyst
<FromGitter> <elorest> I realized while setting up the amber command line that kgen didn’t generate routes correctly for controllers. So I fixed it in both.
<FromGitter> <elorest> @drujensen yep.
<FromGitter> <eliasjpr> Yes @elorest is a big fan of the ORM
<FromGitter> <eliasjpr> I am too but I also incline to Crecto :)
<FromGitter> <drujensen> so what do you guys think of having the ability to have handlers after the routes?
<FromGitter> <faultyserver> I'd like to see a solution where the end user can pick the ORM separate from the framework
<FromGitter> <drujensen> the websocket is a perfect example of where you want to upgrade your socket
<FromGitter> <drujensen> @faultyserver I tend to like choices made for me
<FromGitter> <drujensen> my wife does that at home as well
<FromGitter> <eliasjpr> @jon that's what we are trying to differentiate
<FromGitter> <drujensen> huge rails fan because i can take any rails dev and they know the drill
<FromGitter> <drujensen> it may not be the best framework, but its convention over configuration makes my life easier
<FromGitter> <eliasjpr> And that's our though provide a common wrappers so that you can pick what you like
<FromGitter> <faultyserver> That's definitely a plus for having a default, but it's similar to something like ERB/HAML
<FromGitter> <drujensen> right, that’s true
<FromGitter> <faultyserver> you can easily add haml to a Rails project by just including the gem. I think defaulting to some native ORM is fine, but the ability to switch seems appealing
<FromGitter> <drujensen> but its ECR/Slang for kemalyst
<FromGitter> <elorest> I’m planning on adding and option for either crecto or graniteORM to the generators for both kemalyst and amber.
<FromGitter> <drujensen> yeah, we have discussed having crecto added to kemalyst
<FromGitter> <drujensen> as an option
<FromGitter> <drujensen> for those folk that like that approach
<FromGitter> <elorest> I’m not the biggest fan of handlers after actions… personally I would handle that by just having a handler before it that does something after call_next.
<FromGitter> <drujensen> well, actions are actually handlers. what about mounting multiple routers to a single pipeline
<FromGitter> <drujensen> so it can check down one router and if that returns a 404, it can go down another one?
<FromGitter> <drujensen> chaining routers
<FromGitter> <faultyserver> I'm partial to the phoenix's style, where each router (scope, really) can choose the pipeline it uses: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5931a66b6549436c7d0da5a3]
<FromGitter> <elorest> Yeah we’re looking up the route at the beginning so that we can choose the pipeline.
<FromGitter> <drujensen> I see. Haven’t played with phoenix enough
<FromGitter> <drujensen> can you add a shard that has its own pipeline?
<FromGitter> <drujensen> SideKiq UI comes to mind
<FromGitter> <drujensen> /sidekiq
<FromGitter> <faultyserver> I also really like the Toro/Cuba/Roda (https://github.com/soveran/toro#toro) style of routing, but that seems like more of a total overhaul and doesn't match any other big-framework's paradigm
<FromGitter> <elorest> If it doesn’t work I’m sure we could make it with a few changes… That’s why we need you.
<FromGitter> <drujensen> will rails developers get it?
<FromGitter> <elorest> Maybe just join our team for bit and keep kemalyst. At the very least working in this system might give you some good ideas for kemalyst.
<FromGitter> <drujensen> I think I agree with @faultyserver
<FromGitter> <eliasjpr> we can support the pipelines and just regular handlers array
<FromGitter> <drujensen> ok. love it. I will finish up a couple things on Kemalyst and then look at putting it on hold
<FromGitter> <eliasjpr> you define a pipeline in amber as ⏎ ⏎ ```pipeline :web, ‘/api’ do ⏎ # Your handlers ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5931a78d31f589c64f6b0702]
<FromGitter> <drujensen> nice! I think I really like that. It’s way better than trying to define an array of handlers
<FromGitter> <drujensen> the way i was trying to do it
<FromGitter> <drujensen> The final goal to me is make Crystal a viable alternative to Ruby/Rails
<FromGitter> <drujensen> I created Crack which is a standard way of creating HTTP::Handlers
<FromGitter> <eliasjpr> Your routes then can be defines as: ⏎ ⏎ ```routes :web, ‘/api’ do ⏎ get ‘/index’, YourController, :index ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5931a8a9f31c8ced0cf9098a]
<FromGitter> <elorest> That’s also my goal. Not only an alternative to Rails though but also to Go, and Elixir.
<FromGitter> <drujensen> Rack like… @eliasjpr We may want to see about merging the handlers and have a common set
<FromGitter> <drujensen> @elorest definitely!
<FromGitter> <elorest> Although to be fair many of the Go and Elixir people came from Rails because they needed something faster… Not that elixir is that much faster. :(
<FromGitter> <drujensen> we may be late to the party, be I think ruby dev’s will fall in love with Crystal like I did
<FromGitter> <drujensen> and embrace OOP again
<FromGitter> <elorest> I think and hope so. I’m presenting on Crystal at another cities ruby meetup this month.
<FromGitter> <drujensen> nice!
<FromGitter> <elorest> I’ve presented at 3 big ruby dev companies in the last 3 weeks as well.
<FromGitter> <elorest> By big I mean like 60 developers lol
<FromGitter> <drujensen> I have presented to my company and Ruby Meetup in OC
<FromGitter> <drujensen> with lots of ooohhh, and aaaahh.
<FromGitter> <faultyserver> I'm trying to pitch Crystal to my company (a consulting agency). There's real interest, but a real concern about being able to hand off a project and not strand our clients with projects that no one else can really support.
<FromGitter> <faultyserver> Not that Crystal is *hard* to support, it's just so new and un-adopted that no one else would openly say they support it
<FromGitter> <bigtunacan> @faultyserver That just means that business is locked in for the future ;)
<FromGitter> <faultyserver> exactly!
<FromGitter> <drujensen> @faultyserver right! That is the big risk. I think the pitch is “you can take any Rails Dev and they should be up in running in a couple weeks."
<FromGitter> <eliasjpr> :point_up: :+1:
<FromGitter> <elorest> To be fair Rails was always preached as being able to be handed off and have anyone else work on it. But in reality most teams still want to rewrite lol. And if they can get passed other people’s ways of solving not traditional challenges they could probably use a crystal app about as easily.
<FromGitter> <faultyserver> That's how I've been framing it. We're mainly a rails shop (+ Elixir as of late), so it's not a hard sell
<FromGitter> <bigtunacan> I'm a bit late to the discussion here; I didn't quite follow what is Amber's support like for standard handlers?
<FromGitter> <drujensen> looks like you can just `plug` a standard handler in
<FromGitter> <drujensen> into a pipeline
<FromGitter> <eliasjpr> You can create your own handlers and plug then in a pipeline
<FromGitter> <elorest> I was talking to a team who has a 2 year old fairly large Elixir app and they were telling me how they’re running into all sorts of code debt issues and weird crappy work arounds that they thought they were avoiding by using a functional language...
<FromGitter> <elorest> they almost ran into more of them because there aren’t people with 12 years of expirience in avoiding and dealing with common pitfalls like in rails.
<FromGitter> <faultyserver> @elorest definitely, it's just a hard thing to tell a client "we're going to use this language/framework that no one else around here has even heard of. Trust us, it'll be great"
<FromGitter> <faultyserver> That reminded me of this article: http://www.gamasutra.com/view/news/169296/Indepth_Functional_programming_in_C.php
<FromGitter> <elorest> I did it with rails back in 2005 and the turn around time made it all worth it for them...
<FromGitter> <bigtunacan> @faultyserver In all seriousness; it's a bit of question of what the client is concerned about.
<FromGitter> <elorest> Plus JS is huge right now and they’re always telling clients they’re going to use a new framework that hasn’t even been written yet :)
<FromGitter> <bigtunacan> Some clients want you to develop a project in X => WordPress, Rails, Django, other... because they have someone else that can support it later or they heard it is good.
<FromGitter> <elorest> @faultyserver I love that that article you shared ends in `.php`
<FromGitter> <bigtunacan> Other clients just want you to build something and they don't know/care so long as it gets done and works.
<FromGitter> <bigtunacan> Their priorities are get it done fast/cheap/other.
<FromGitter> <faultyserver> Sadly, we have a decent amount of the former right now. Kind of just waiting for a more care-free client to use as an opportunity
<FromGitter> <elorest> Yeah I guess I tend to just nod and then write something impressive over the weekend and try to convince them again on monday.
<FromGitter> <elorest> It usually works for me.
<FromGitter> <bigtunacan> This is an approach I have taken in the past (successfully).
<FromGitter> <bigtunacan> I can do this project for you in @framework="Your Choice" for $X
<FromGitter> <elorest> Nobody was ok with rails back in 2005 but I sold a lot of clients on it.
<FromGitter> <bigtunacan> or I can do this project for you in @framework="My Choice" for $Y
<FromGitter> <bigtunacan> Where $Y is a significant markdown
<FromGitter> <elorest> Rails was a bit easier though because it allowed me to finish half of a month long java project in 2 days. Which was a pretty easy sell.
<FromGitter> <bigtunacan> Also, $Y is what I would normally charge.
<FromGitter> <elorest> Speed is also a feature though.
<FromGitter> <bigtunacan> @elorest But you would have made more money then doing it in Java ;)
<FromGitter> <elorest> I once told a php company that was trying to find a local to manage their off shore team that my php rate was 250/h. I left expecting never to hear from them again. Turns out they took it to the board and decided to go ahead with it. They called me up a few days later and I had to find a way to tactfully get out of it.
<FromGitter> <bigtunacan> Yeah; similarly I had a client go with $X where it was double by normal rate because they wanted Java.
<FromGitter> <bigtunacan> I took the money because I'm a sellout :(
<FromGitter> <faultyserver> you'd have to pay me like 5x my normal to get me to write Java
<FromGitter> <faultyserver> I left early and have no intention of going back
<FromGitter> <elorest> I wrote java for 3 years and actually thought I liked it. I’d never go back for almost anything though
<FromGitter> <faultyserver> funny how that works, sometimes
<FromGitter> <bigtunacan> I loved Java when I first starting working with it.
<FromGitter> <faultyserver> you get in with a dead-set mind that it will be terrible. Then after a while, complacency sets in and you actually *feel* productive
<FromGitter> <bigtunacan> Before then I had done nothing but C/C++ on multi million line code bases
<FromGitter> <elorest> I used to tell everyone how awesome JSP was. I worked on this huge app where pretty much everything was embedded jsp code… All view based logic.
<FromGitter> <bigtunacan> Dealing with memory management and DLL hell
<FromGitter> <elorest> What memory?
<FromGitter> <elorest> I never had any left.
<FromGitter> <faultyserver> dll's are great when they *aren't* core parts of the system
<FromGitter> <elorest> There are starting to be some decent c++ web frameworks I’ve noticed.
<FromGitter> <ltran> my company is swapping ruby for java :| they cant "find engs"
<FromGitter> <faultyserver> C++ web dev is strange
<FromGitter> <bigtunacan> They could if they would pay more or allow remote employees
<FromGitter> <elorest> Really? They do know that oracle owns java right?
<FromGitter> <faultyserver> I've done some server-side web stuff like APIs in it, but I wouldn't ever think of doing something with views
<FromGitter> <faultyserver> idk why, honestly
<FromGitter> <elorest> As soon as they become big Oracle could sue them for modifing a library :P
<FromGitter> <ltran> haha, ya they dont want remote emp, so i said, well start paying more o_O. kind of talking to a wall atm
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #crystal-lang
LastWhisper____ has quit [Client Quit]
LastWhisper____ has joined #crystal-lang
<FromGitter> <bararchy> @ltran we got the same issue only with C# instead of Java ... Can't find programmer so they are trying to rape C# to Linux via mono ... Worst debug session I had in my life
<FromGitter> <elorest> Seriously they should a least try a small project in crystal. Can’t be worse than java.
yogg-saron has joined #crystal-lang
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <bigtunacan> There was a comment on here earlier about a lot of the frameworks on the awesome list not having been updated in a long time(essentially dead projects).
<FromGitter> <bigtunacan> I found that to be an issue to as a Crystal n00b
<FromGitter> <ltran> @bararchy ? C#? Typo?
<FromGitter> <delef> Where is I can find docs for &->?
<FromGitter> <delef> get "/", &->MainController.show(Env)
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <faultyserver> I don't know if there are docs that directly mention it
<FromGitter> <faultyserver> basically, `&` in an argument list converts the following expression into the block argument for the call.
<FromGitter> <faultyserver> and `->` defines an inline `Proc`
<FromGitter> <faultyserver> so doing `&->` takes the proc that gets made and uses it as the block argument for the call
<FromGitter> <faultyserver> normally, this is done like `&->(){ |arg| puts arg }` do define a new proc inline
<FromGitter> <faultyserver> but, replacing everything after the arrow with a method (`MainController.show(Env)` in your example), just takes that method and treats it as the proc, rather than building a new one to wrap the method
<FromGitter> <faultyserver> and you need to specify the types of the arguments to avoid ambiguity and whatnot (there's a longer explanation that I don't fully remember)
<FromGitter> <faultyserver> Essentially, your example could be re-written like so: ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5931cdac31f589c64f6baec6]
<FromGitter> <faultyserver> the advantage to using `&->` syntax is that you avoid creating the intermediate proc, though iirc, that often gets optimized out anyway, so it's mainly a stylistic thing
<FromGitter> <faultyserver> Ah, I found it in the gitbook: https://crystal-lang.org/docs/syntax_and_semantics/literals/proc.html#from-methods
<FromGitter> <faultyserver> The important addition here is just the `&` at the beginning that turns the proc into a block argument
splitty_ has joined #crystal-lang
splitty___ has quit [Read error: Connection reset by peer]
splitty_ has quit [Ping timeout: 240 seconds]
splitty_ has joined #crystal-lang
<FromGitter> <sdogruyol> @faultyserver yep that's a good way
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
onionhammer1 has joined #crystal-lang
onionhammer has quit [Ping timeout: 260 seconds]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Raimondi has quit [Write error: Broken pipe]
Raimondi has joined #crystal-lang
duckqlz has joined #crystal-lang