<FromGitter>
<jwaldrip> I really wish crystal had a single communication platform rather than this IRC <-> gitter bridge
<Papierkorb>
Yeah I'd love to see gitter gone too, but oh well
<FromGitter>
<jwaldrip> well... i dont know if IRC is the right platform either IMHO.
<FromGitter>
<jwaldrip> I personally like the direction Golang went with slack.
<FromGitter>
<elorest> Over all I like gitter. Linux client doesn’t really work though.
<FromGitter>
<elorest> Slack is the worst lol
<FromGitter>
<jwaldrip> the gitter client on mac is broken too...
<Papierkorb>
Pretty simple: I won't join that gitter stuff
<FromGitter>
<elorest> @jwaldrip I use gitter client on mac all the time.
<Papierkorb>
And neither would I join a Slack channel or whatever else group IM is hip right now
<FromGitter>
<jwaldrip> code blocks mess up for me
<FromGitter>
<jwaldrip> Unless you use IRC cloud... its just a very old very featureless platform.
<FromGitter>
<elorest> Hmmm I’ve found code blocks to work much better than in slack. Also the history limit without paying tons of money is a deal kill for most open source projects.
<FromGitter>
<jwaldrip> I like the ability to search... and I like the integrations in slack.
<Papierkorb>
jwaldrip, feature-less? I call that "no bullshit"
<FromGitter>
<jwaldrip> @elorest I agree with the formatting... but something is messed up with them at the moment. A long code block blocks my input block.
<FromGitter>
<elorest> I’ve used slack since 2013 and while I like it I really think something like discordapp is probably better.
<FromGitter>
<jwaldrip> discordapp is great... but geared towards gamers.
<FromGitter>
<elorest> Yeah but it’s search and history is nice, and code blocks look good.
<FromGitter>
<elorest> Overall I’m pretty happy with gitter though.
<FromGitter>
<jwaldrip> They have made some performance improvements to the latest slack... but I agree. I like gitter... just not as stable as slack.
<Papierkorb>
Those code blocks alone would make me not want to join. Such a waste of space, it's spam for everyone else, and simply awful in a lively channel
<FromGitter>
<jwaldrip> Also just out of my normal workflow.
<FromGitter>
<jwaldrip> I use slack everywhere.
<FromGitter>
<elorest> Yeah. Me too but I’m probably in gitter more these last few months… logging back into all my slack channels is such a pain...
<FromGitter>
<elorest> Almost makes me miss the skype days.
<Papierkorb>
Slack doesn't allow you to monitor multiple channels across "servers" at once?
<Papierkorb>
In a single 'window' that is
<FromGitter>
<jwaldrip> If slack was more like discord I think it would be great. Having to join multiple teams does suck.
<FromGitter>
<elorest> Nope...
<Papierkorb>
How is that acceptable?
<FromGitter>
<jwaldrip> What do you mean by monitor?
<Papierkorb>
That's the epitome of "mobile-first" development
<FromGitter>
<jwaldrip> I mean you get notifications
<Papierkorb>
As in: Modal-everything crap, with no opportunity of doing this fancy "multitasking" that has been the rage since .. Win95 at least
<FromGitter>
<elorest> We expirimented with using discord at work… Only thing I didn’t like about it was instead of `@alias <first last>` it uses `gamernumber#alias`
<FromGitter>
<jwaldrip> Ya thats a bummer.
<FromGitter>
<jwaldrip> I thought gitter had a real chance... but I think things have gone downhill since the aquisition.
<FromGitter>
<elorest> So unless you force everyone to use their actual name as an alias it’s not very useful for work situations.
<FromGitter>
<jwaldrip> Papierkorb: I have a love hate relationship with IRC... most channels are full of people who aren't actually helpful. And the need to stay online all the time to re-engage in a conversation sucks... or you just have to pay for a service to "keep you online"
<FromGitter>
<jwaldrip> If IRC had the ability to keep some server side state, then I would be much happier.
<Papierkorb>
jwaldrip, you can use any throw away 'shell enabled' server to host a bnc. They go as low as 1€/Month if you don't have one anyway
<FromGitter>
<jwaldrip> I know. I have used one...
<FromGitter>
<jwaldrip> But again... then it just shows me online, when I am not... giving people the facade that the room has more active people then are actually active.
<Papierkorb>
Also as helper, it's also about time management. I don't want to have to "scroll up" for miles just so that no one barks at me for "not reading the whole thing".
<FromGitter>
<jwaldrip> IRC is old... and yes it does work in some situations... but I think there are better technologies... my only argument is to simple have the crystal community pick one.
<Papierkorb>
jwaldrip, you can set yourself as 'away'
<FromGitter>
<jwaldrip> I know...
<Papierkorb>
jwaldrip, IRC is old, but really, what is actually wrong with it?
<Papierkorb>
It is simple, which is a good thing. And it respects its user, be that a helpee, helper, or random offtopic gossip chat
<Papierkorb>
Respect not in the "privacy" sense, but in a time-, and space management sense
<FromGitter>
<jwaldrip> depends on the server and channel.
<FromGitter>
<jwaldrip> IMHO
<Papierkorb>
Which things like Slack nor Gitter do at all, in fact, they're the polar opposite, making them hugely unuseful for the setting of a development help channel
<FromGitter>
<jwaldrip> Sure... I can agree to that.
<FromGitter>
<jwaldrip> My point was simply that crystal should have ONE
<FromGitter>
<jwaldrip> not many
<FromGitter>
<jwaldrip> I would gladly join in on the IRC room if that was the only choice.
<Papierkorb>
Also not having "real accounts" is a good thing. I don't like it a single bit how in gitter I *have* to log in using Github or whatever. That it shows the real name. What's up with that? Since when are names that important?
<Papierkorb>
jwaldrip, on Github I made the choice
<Papierkorb>
That's a difference. I put my name there knowing that it would be publicly displayed
<Papierkorb>
When I login to Gitter with github, it never asked me if that's okay, if that's what I want
<FromGitter>
<jwaldrip> I know... im just saying... there is no reason to hide
<Papierkorb>
Answer is: I don't want that.
<FromGitter>
<jwaldrip> I certainly dont hide
<Papierkorb>
There is no reason to show either.
<FromGitter>
<jwaldrip> True... just saying... I dont care much
<FromGitter>
<jwaldrip> either way... would just want one.
<Papierkorb>
And it's the individuals personal right to decide on the data that is publicly displayed. There are tons of kids out there who're getting started out. They'll mess up. Their nickname will be ruined. Who cares? Choose a new one. Real name? Tough luck.
<FromGitter>
<drosehn> It's really tough to come up with a new chat system which would work for everyone. The same that it's hard to come up with a new language which works for everyone. :)
<FromGitter>
<elorest> Yeah
<FromGitter>
<drosehn> I was around before IRC was a thing, and I don't much like it. Some of the guys at my college wrote alternatives to IRC (which you've probably never heard of) which fixed the things that annoyed us the most about IRC.
<Papierkorb>
There are those systems no one uses, and those everyone complains about.
<FromGitter>
<drosehn> I use gitter via Opera on my Mac, and it's okay. It's a little flakey, but not too bad. I use the separate client for Slack (instead of using a web-browser), and that's okay too. Not exactly what I'd really like, but it's okay.
<FromGitter>
<elorest> Biggest problem with the gitter client on mac for me is it pretty much halfs my battery life.
<Papierkorb>
Those "desktop clients" are web browsers too, probably with worse sandboxing than in a 'real' browser
<FromGitter>
<drosehn> The nice thing about gitter for crystal is that it shows the github-activity in the column on the right. Sometimes that's useful.
[sky][she513 has joined #crystal-lang
<[sky][she513>
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ https://www.youtube.com/watch?v=--jYqzJErTI LRH IS LIVE NOW!! CALL 415-349-5666 #LRH EFNETehepjjsq: bmcginty foxbot oprypin ua asterite jeromegn binBASH txdv z64 jfontan pleiosaur shelvacu Majost hmans lvmbdv raz DeBot_ justinmcp olbat yopp thew
<Papierkorb>
There's a script kiddie going rampant atm across multiple IRC networks it seems
<Papierkorb>
(Nothing that a github account creation bot to spam gitter/slack/whatever channels could really prevent)
<Papierkorb>
Seem to come in from TOR..?
maggie has joined #crystal-lang
<raz>
chan mode +r keeps the bots out usually
<Papierkorb>
#ruby is +r atm temporarily
maggie has quit [Client Quit]
<jsn->
some local ops could script their clients to do an autokick on colors
astronavt has quit [Remote host closed the connection]
astronavt has joined #crystal-lang
sotrhraven has quit [Quit: sotrhraven]
rohitpaulk has joined #crystal-lang
thomas has left #crystal-lang [#crystal-lang]
rohitpaulk has quit [Ping timeout: 272 seconds]
astronavt has quit [Remote host closed the connection]
astronavt has joined #crystal-lang
astronavt has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Client Quit]
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
<crystal-gh>
[crystal] willcosgrove opened pull request #5399: Add guard clause to Deque#rotate! (master...deque-rotate-patch) https://git.io/vb6Ka
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
<FromGitter>
<jwaldrip> IS there a way to forward a macro block to another macro?
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 256 seconds]
ashirase has quit [Ping timeout: 264 seconds]
ashirase has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 272 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter>
<jwaldrip> I have been working pretty tirelessly on a new Crystal router called Orion... it's has many of the great features you would expect from the rails router. I would love for people to take the beta for a spin before I cut the final release. ⏎ https://github.com/obsidian/orion
<FromGitter>
<jwaldrip> Ill probably post again in the morning... but thanks to anyone who gives it a spin.
baweaver has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
alex`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter>
<bararchy> damn.... what happened here lol
mark_66 has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
<foxxx0>
how do i initialize an empty array that could contain both Strings or Int32?
<foxxx0>
params = [] of String...?
<FromGitter>
<matrixbot> `vegai` params = [] of String | Int32
<FromGitter>
<bew> about your discussion earlier about gitter, IRC, etc... I prefer gitter for the simple reason that it works everywhere (desktop/phone), and doing the same for IRC is another story..
<FromGitter>
<bew> almost outofthebose
<Papierkorb>
Not to mention that I could send you to various gitter.im internal pages, abuse an XSS, and grab your credentials or change your settings. Or really the same for any page. How can you be blamed, you just clicked a simple link?
<FromGitter>
<bew> outofthebox*
<FromGitter>
<matrixbot> `vegai` Benoit de Chezelles (Gitter): you should check out matrix and riot :)
<Papierkorb>
Mh? There are web IRC clients, the recent ones are pretty reasonable
<Papierkorb>
No you should not.
<Papierkorb>
Matrixbot should be banned.
<Papierkorb>
> [13:33] <FromGitter> <matrixbot> `vegai` Benoit de Chezelles (Gitter): you should check out matrix and riot :)
<Papierkorb>
Is how it comes through IRC. That's complete shit.
<FromGitter>
<matrixbot> `vegai` looks fine here. Perhaps you should stop using gitter ;)
<FromGitter>
<bew> vegai, call me @bew not the full name ^^
<FromGitter>
<matrixbot> `vegai` heh, right. Your nick doesn't flow through all the bridges, I guess
<Papierkorb>
Why doesn't this matrix stuff speak proper IRC or gitter?
<Papierkorb>
Why on earth did they have to create *yet another* IM protocol that needs to be bridged?
<Papierkorb>
So now we have Jabber but in bad?
<FromGitter>
<matrixbot> `vegai` well, those are good questions
<Papierkorb>
I mean it's not hard to do proper bridging without crappy bridge bots.
<FromGitter>
<matrixbot> `vegai` this is much better than Jabber, though
<Papierkorb>
They're K.O. arguments against Matrix.
vegai has joined #crystal-lang
<livcd>
and jabber is not that good either
<FromGitter>
<extremety1989> is Riot.io build with crystal as backend ?
<Papierkorb>
What's so wrong with it?
<FromGitter>
<matrixbot> `vegai` perhaps it's just marketing, but Matrix is already wildly more successful than Jabber ever was
<Papierkorb>
Jabber always .. just worked? They're federated, so you can easily talk globally and do everything you'd ever need. With some modern extensions it also gets usable on mobile
<FromGitter>
<matrixbot> `vegai` based on the number of users et al
<Papierkorb>
Huh?
<FromGitter>
<matrixbot> `vegai` I would've much preferred somebody fix an existing protocol instead of creating a new one as well, but that didn't seem to happen
<Papierkorb>
Jabber is federated/distributed, how do you want to count the users?
<Papierkorb>
Just to mention, Facebook and Google used Jabber for a long time
<Papierkorb>
So that are .. how many users? Beyond two billion?
<FromGitter>
<matrixbot> `vegai` right, and the largest public Jabber channel is where?
<Papierkorb>
Channel?
<FromGitter>
<matrixbot> `vegai` does it have more than 10k people?
<vegai>
I agree that matrixbot looks pretty damned ugly in IRC, though
<Papierkorb>
You do realize that Jabber could be bridged properly over to IRC and friends? How companies use it internally?
<FromGitter>
<matrixbot> `vegai` do you really think I don't know that?
<Papierkorb>
Apparently
<Papierkorb>
Your argument is simply none
<FromGitter>
<matrixbot> `vegai` did I insult you? Sorry if I did
<FromGitter>
<matrixbot> `vegai` you seem a bit angry
vegai has left #crystal-lang [#crystal-lang]
<Papierkorb>
Even Whatsapp was (is?) based on a Jabber derivate
<Papierkorb>
No. I asked for what's wrong with Jabber.
<Papierkorb>
Matrix is not as successful as Jabber "ever was"
<FromGitter>
<matrixbot> `vegai` Right. What's wrong with Jabber is that it failed
<FromGitter>
<matrixbot> `vegai` nobody is using it
<Papierkorb>
vergai, when you state something, I expect that you can prove it.
<FromGitter>
<matrixbot> `vegai` I'm not sure if it's because of technical reasons or what
<Papierkorb>
As I said, billions have used it for many years without knowing
<FromGitter>
<matrixbot> `vegai` yes, you did say that
rohitpaulk has quit [Ping timeout: 272 seconds]
<Papierkorb>
The issue isn't with Jabber, it's that it's too compatible. Companies want you to use their shoddy "Apps", not simple Pidgin (or whatever you like)
<FromGitter>
<matrixbot> `vegai` yeah, I followed Jabber from its very beginning
<FromGitter>
<matrixbot> `vegai` it looked like the perfect fix for every piece of crap that was floating around the time
<FromGitter>
<matrixbot> `vegai` except IRC
<FromGitter>
<matrixbot> `vegai` quick stats on which I base my "matrix is winning" argument
<FromGitter>
<matrixbot> `vegai` the 10 largest public channels on matrix.org each have more than 2k participants, with the largest one having over 10k
<Papierkorb>
Let's wait a decade
<FromGitter>
<matrixbot> `vegai` in a decade nothing has gone away and there are N new networks? :)
<FromGitter>
<matrixbot> `vegai` perhaps we could make millions making bridges between them all
<Papierkorb>
Did you mean "Multi-Protocol Messenger"?
<FromGitter>
<matrixbot> `vegai` huh? :)
<Papierkorb>
Client-side 'bridging' has been done for many years. Pidgin is still being developed .. anyone remembers Trillian? On the server side, Jabber does/did this as well
<FromGitter>
<matrixbot> `vegai` do you know what happened with Jabber that made open-source projects stick with IRC instead of moving their public channels over?
<Papierkorb>
The protocol isn't much important. The Client is. Having a WebUI is fine, as long I'm not forced to use it. Electron "desktop apps" are even worse
<FromGitter>
<matrixbot> `vegai` did they just never target large channels and thus never implemented support for them
<FromGitter>
<matrixbot> `vegai` no arguments there. The lack of clients for Matrix is a big problem
<Papierkorb>
Jabber does support multi-user channels, but for what I used it, it was always a 1on1 chat
<Papierkorb>
And as more technical people go: Don't fix what works. Why switch from your $Solution if it has been working for you, maybe for many years?
<Papierkorb>
I never saw the need to even check for dev communities in Jabber channels. I had IRC which works great for me, why switch
<livcd>
I used irc and a bunch of proprietary apps like whatsapp,kakao,telegram?
<livcd>
that said i like kakao the most...though i guess it does not have a web interface
<Papierkorb>
...There are too many mobile messengers around.
<livcd>
honestly it would bother me more if there would be only 1 :)
<Papierkorb>
A few is good and "normal". But come on, there are tens of them, and everyone uses a different one
<livcd>
but why ...not?
<Papierkorb>
mh?
<livcd>
think about it...every bigger nation out there especially in Asia has a differently working ecosystem
<Papierkorb>
Sure it makes sense, but even in my local circle there are at least 4 in use
<Papierkorb>
lukeholder, compiler stabilized, windows is underway, multithreading is nowhere in sight
<livcd>
Skype because it was the one that was in use, Skype for business because ..eh, irc for obvious reasons and hipchat to to replace irc
<FromGitter>
<lukeholder> thanks @Papierkorb, thanks for the great work everyone. Wish I could contribute but it would all be over my head. Thanks for all your work core team!
<livcd>
but there's always a group here and there that cannot let go of their beloved app
<livcd>
though i hope we settle on skype for business and hipchat
<Papierkorb>
lukeholder, don't feel afraid! There are plenty things to do for everyone on every skill level. The compiler, sure, but the stdlib offers tons of improvement opportunities too
<FromGitter>
<lukeholder> @Papierkorb is there a list of stdlib improvement opportunities?
<FromGitter>
<lukeholder> Because I am lazy to look, is the stdlib written in crystal?
<FromGitter>
<bew> yes
<Papierkorb>
There's not a precise list, no. You can check the Github issue tracker, which hosts issues both on stdlib and compiler, so you need to dig around. Apart from that, docs are always a hot topic
<Papierkorb>
lukeholder, Crystal is completely self hosted in compiler and stdlib
<FromGitter>
<lukeholder> @Papierkorb cool, will check it out
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
<livcd>
uh just saw on reddit someone mentioning that Crystal's string processing is slower than Ruby's
<Papierkorb>
There's an open issue that `"foo" + bar` is faster than `"foo#{bar}"`
mark_66 has quit [Remote host closed the connection]
<FromGitter>
<lukeholder> Crystal recommends not using a `property foo : String` ?
<Papierkorb>
That page is about initialize, not property
<Papierkorb>
And I highly recommend typing your getters/setters/properties to help the reader of your code
<FromGitter>
<lukeholder> Think the docs page should retitle those subheadings to `Using an explicit type annotation` `Not using an explicit type annotation`. They are written like declarative instructions.
<FromGitter>
<lukeholder> Both of which are contradictory
<notramo>
The problem occurs under Elvish and BASH, but not under Zsh.
<notramo>
Is it a problem with Crystal, or with the other programs?
<FromGitter>
<bew> yes it is a known problem
<notramo>
Is it only under Linux?
<notramo>
What does cause it?
<FromGitter>
<bew> we set the input/outputs of the terminal to be non-blocking
<notramo>
How can it be solved?
<FromGitter>
<bew> there should be a fix in the next release, if you want to check, you can compile crystal from master
<notramo>
My machine isn't enough strong to compile the compiler. When will approximately be released the next version?
<Papierkorb>
notramo: work-around on your end is executing the `reset` program (or shell builtin) to fix your TTy. You can also open a new terminal window. Third option is configuring your shell to fix these after returning from a program (No idea if bash can do that)
<Papierkorb>
The last option fixes the issue in the general case forever.
<Papierkorb>
notramo: The next version should come out this week (the fix bew mentioned should be in it?)
<notramo>
Papierkorb: 'reset' don't solve the problem.
<FromGitter>
<bew> "the fix" I'm talking about is #5017 was in 0.24.0 iirc, so should be available when 0.24.1 is out
<FromGitter>
<bew> maybe you could add `{STDIN, STDOUT, STDERR}.each(&.blocking=(true))` at the end of your programs as a workaround, but this won't fix the crystal compiler. Or maybe you can try to make a simple binary that does just that, that you run after a crystal program to cleanup until the next release
rohitpaulk has joined #crystal-lang
<notramo>
@bew, I created a file with `{STDIN, STDOUT, STDERR}.each(&.blocking=(true))` in it. If I run `crystal block.cr`, it fixes the terminal, but if I compile it, the binary don't fix the terminal.
<notramo>
Why doesn't the binary work?
<FromGitter>
<drosehn> As noted in #2713 , add the statement `STDIN.blocking = true if STDIN.class != IO` to your crystal program. The only reason for the `if ...` part is that you can then have the same line in both crystal and ruby, without either one complaining.
<FromGitter>
<drosehn> The crystal compiler is itself a crystal program, so you'd want some other program which would reset blocking after running the compiler. I happen to have a very trivial program (of my own) written in crystal which does this.
<FromGitter>
<drosehn> You only need to set `blocking = true` for STDIN.
<FromGitter>
<drosehn> (or at least, that's all I have ever needed to fix this)
<notramo>
@drosehn, did you created a separate binary for this?
<FromGitter>
<bew> Ah maybe STDIN is enough
<notramo>
@bew, why doesn't your code work, when compiled?
<notramo>
If I run `crystal eval "{STDIN, STDOUT, STDERR}.each(&.blocking=(true))"`
<notramo>
it fixes the terminal
<notramo>
but if I compile it into a binary, it doesn't work.
<FromGitter>
<RX14> /help
<FromGitter>
<RX14> oops
<RX14>
I banned matrixbot from gitter
<RX14>
people who use matrix bridges can use IRC
<FromGitter>
<drosehn> I happen to have a simple binary which was `compiled by crystal 0.23.1` and which has the `STDIN = true` fix in it. So I run that after running the compiler, and it works. The simple program that I have is actually for something else, but if I run it without supplying any parameters then it just exits without doing anything (except that it happens to fix STDIN).
claudiuinberlin has joined #crystal-lang
snsei has joined #crystal-lang
<FromGitter>
<drosehn> If I recall the fix in #5017, I suspect there might need to be some fine-tuning to it as we get more experience with using it.
<oprypin>
indeed one can still use Matrix by connecting it through IRC
aroaminggeek is now known as aroaminggeek[awa
<FromGitter>
<jwaldrip> I have been working pretty tirelessly on a new Crystal router called Orion. It has many of the great features you would expect from the rails router. I would love for people to take the beta for a spin before I cut the final release. ⏎ https://github.com/obsidian/orion
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
<FromGitter>
<picatz> @jwaldrip Just perusing the documentation in the README and I am very impressed by your work, per usual! Thank you! 👏 ✨
<FromGitter>
<jwaldrip> Thanks @picatz. Excited to start using it in the real world with a revamped crystalshards.org near the beginning of the year.
<FromGitter>
<picatz> I look forward to it too! Hopefully I can find a nice use for Orion for one of my personal projects. :)
aroaminggeek[awa is now known as aroaminggeek
aroaminggeek is now known as aroaminggeek[awa
sz0 has joined #crystal-lang
<FromGitter>
<picatz> Slowly figuring out how to write my own packet parser with Crystal
<FromGitter>
<bew> @jwaldrip looks really nice
<FromGitter>
<bew> In your example for custom constraints, the custom struct/class doesn't include `Orion::Constraint` isn't it what you meant in the description above?
<FromGitter>
<bew> Also, is it possible to use another router in a scope?
bazaar_ has quit [Quit: Reconnecting]
bazaar has joined #crystal-lang
<FromGitter>
<paulcsmith> @jwaldrip Wow that is a nice README :D
<FromGitter>
<paulcsmith> I'm curious, are the routes order dependent?
<FromGitter>
<jwaldrip> @paulcsmith: That is something I borrowed from the original radix implementation... but given the fact that I match on multiple routes, this may not matter as much and could be removed.
<FromGitter>
<jwaldrip> Right now order is static, named, glob
<alex``>
I need Marshal to store Hash to file
<alex``>
and load old value
<FromGitter>
<jwaldrip> Why not just use YAML or JSON to marshal the hash?
<FromGitter>
<picatz> @jwaldrip beat me to it 😂
<FromGitter>
<jwaldrip> You can do that by defining an object mapping.
<alex``>
and Pathname for the mtime
<FromGitter>
<jwaldrip> You should just use `File` for that.
<FromGitter>
<paulcsmith> @jwaldrip That's very cool. I wrote a very simple router for Lucky and one requirement is that static parts must be matched first regardless of order since routes are added in the class and not in a routes file: https://luckyframework.org/guides/actions-and-routing/#routing
<alex``>
Oki
<FromGitter>
<paulcsmith> So yours might work. But it also seems to do quite a bit. have you considered extracting just the part that matches a path to a callback/object?
<alex``>
So for storing to file, convert the Hash to YAML or JSON then write to file?
<alex``>
and back for reading
<FromGitter>
<jwaldrip> @paulcsmith ... If you think that the order is confusing, I can either remove the ordering clause.
<FromGitter>
<jwaldrip> @paulcsmith: orion uses a sister project called oak for the tree implementation... which should have what you need. https://github.com/obsidian/oak
<FromGitter>
<picatz> I've been meaning to write up my experiences writing a binding to the LibPcap API in crystal ( which was really good, thanks to the community ).
aroaminggeek[awa is now known as aroaminggeek
aroaminggeek is now known as aroaminggeek[awa
aroaminggeek[awa is now known as aroaminggeek
aroaminggeek is now known as aroaminggeek[awa
<FromGitter>
<elorest> @jwaldrip You should make that a priority. :)
<FromGitter>
<elorest> @picatz Thanks I'll fix that now.
<FromGitter>
<picatz> 👍 No worries, anytime!
<FromGitter>
<jwaldrip> It's behind Crystalshards.org and Crystaldocs.org at the moment.
<oprypin>
what is Crystaldocs.org
<FromGitter>
<jwaldrip> it "will" be a site in which you can instantly get the generated docs for any crystal project.
<FromGitter>
<jwaldrip> ... that is on github
<FromGitter>
<picatz> Neat :metal:
<oprypin>
that's nice, just dont forget about that arbitrary code execution thing
<FromGitter>
<jwaldrip> ....?
<FromGitter>
<picatz> Yeah. I automatically thought I could add some malicious JS in my docs to be honest.
<FromGitter>
<straight-shoota> I don't think that's actually such a huge issue. You can run the generator in an isolated environment like all the CI pipelines work. It shouldn't need any access to external resources. Just take a directory with a crystal project and save the generated docs files.
alex`` has joined #crystal-lang
<FromGitter>
<straight-shoota> If the docs generator does not do enough to avoid embedding Javascript, you can just filter out any javascript in the generated doc files (except those needed for the docs browser, but that's really just "strip all and then add some specific ones"). Besides that it's just hosting static HTML files.
<FromGitter>
<jwaldrip> @straight-shoota thats what I was thinking. I am going to run the docs once in an isolated docker container... and store the result.
<FromGitter>
<straight-shoota> I don't mean to take security lightly, it's a serious issue of course. But it can be done.
<FromGitter>
<jwaldrip> So not as worried about the running of the docs script... but will definitely look into filtering out XSS after generation.
<FromGitter>
<straight-shoota> You could also use the generated JSON docs to generate custom HTML pages.
<FromGitter>
<straight-shoota> Instead of the standard template used by the compiler. That way you can easily strip out *any* embedded javascript while inserting customizations like a meta navigation.
<FromGitter>
<jwaldrip> Where is the JSON?
alex`` has quit [Quit: WeeChat 2.0]
<FromGitter>
<jwaldrip> I would love the json
danielpclark has joined #crystal-lang
aroaminggeek[awa is now known as aroaminggeek
<FromGitter>
<straight-shoota> it will be automatically gnerateed by `crystal docs` with `0.24.1` release. File name is `docs/index.json`
<FromGitter>
<straight-shoota> So could be anytime soon, hopefully.
<FromGitter>
<straight-shoota> But you can just check out the 0.24.1 tag and compile it yourself to get working on it.
snsei has joined #crystal-lang
<FromGitter>
<mverzilli> yes, we're getting closer, sorry for the delays... @RX14 made some cool enhancements to the release toolchain and we've been working since we tagged 0.24.1 to make sure it can build from the previous official release (0.23.1) and all artifacts are under the crystal-lang org
<FromGitter>
<mverzilli> I know 0.24 has been a pain in the neck, but hopefully 0.25 will be much simpler
<FromGitter>
<straight-shoota> I'm sure it will pay off in the long run 👍