<FromGitter>
<redcodefinal> the vest among us are the ones who don't post religious bullshit in a programming IRC
<FromGitter>
<johnjansen> personally i think crystal is a better choice
chatter has joined #crystal-lang
<chatter>
one letter read from book of allah amounts to one good deed and allah multiplies one good deed ten times
<chatter>
hearts get rusted as does
<FromGitter>
<johnjansen> quran is interpreted, and from this, slow as shit
<FromGitter>
<redcodefinal> @johnjansen lol
<FromGitter>
<johnjansen> quran also has a problem with base 10
<FromGitter>
<redcodefinal> are you saying the quran is like Ruby?
<chatter>
hearts get rusted as does iron with water to remove rust from heart recitation of quran and rememberance of death
<chatter>
heart is likened to a mirror
jotsobo has joined #crystal-lang
<FromGitter>
<redcodefinal> :eyes:
<FromGitter>
<johnjansen> no, Ruby has good docs, quran seems to be easily misunders
<FromGitter>
<redcodefinal> @johnjansen too true
<chatter>
when a person commits one sin a black dot sustains the heart
<FromGitter>
<johnjansen> quran also seems to have a faulty “sustain” method
<FromGitter>
<johnjansen> not sure it gets it
<chatter>
to accept islam say that i bear witness that there is no deity worthy of worship except allah and muhammad peace be upon him is his slave and messenger
<FromGitter>
<redcodefinal> The Quran's users tend to use ```select``` a lot
<FromGitter>
<johnjansen> only with permission though
<FromGitter>
<redcodefinal> ``````
<FromGitter>
<johnjansen> wow, that looks right
<FromGitter>
<johnjansen> only Allah can add you to sudoers
<FromGitter>
<redcodefinal> ``````
<FromGitter>
<johnjansen> haha
<FromGitter>
<johnjansen> allah must have given me permission to cry of laughter
<FromGitter>
<redcodefinal> :laughing:
<FromGitter>
<redcodefinal> ^ permitted by Allah
<FromGitter>
<johnjansen> also allah gave someone permission to ban him from irc, which is an interesting black hole like effect
johnjansen has quit [Quit: johnjansen]
<FromGitter>
<redcodefinal> finally
<FromGitter>
<redcodefinal> thank you Allah
<FromGitter>
<redcodefinal> praise be with him and his infinite shitposts
<FromGitter>
<johnjansen> oh sorry, Allah didnt give me permission to know who has that permission
<chatter>
all creation get together can not create one grain of rice
chatter has quit [Client Quit]
chatter has joined #crystal-lang
<chatter>
all humans get together can not make anybody hungry
<chatter>
all humans get together can not move sun one second up or down
<chatter>
we can not count the hair on our head
<chatter>
we can not count the rain drops
<chatter>
we can not count the particles of sand
<chatter>
medicine has no power to cure
<chatter>
two people take same medicine one passes away and one does not
<chatter>
degree has no power to give job
<chatter>
many people have degrees but do not have jobs
<chatter>
sustenance does not depend on effort
<chatter>
one person is working very much but is earning very less
chatter has quit [Client Quit]
chatter has joined #crystal-lang
<chatter>
other person is working very less but is earning very much
chatter has quit [Client Quit]
chatter has joined #crystal-lang
chatter has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<johnjansen>
Allah obviously lack sysops permissions though …
johnjansen has quit [Quit: johnjansen]
mgarciaisaia1 has joined #crystal-lang
mgarciaisaia has quit [Read error: Connection reset by peer]
hako_ has quit [Ping timeout: 268 seconds]
shawn42 has joined #crystal-lang
Philpax has quit [Ping timeout: 244 seconds]
Philpax has joined #crystal-lang
ruby has joined #crystal-lang
ruby is now known as Guest55550
Guest55550 has quit [Ping timeout: 248 seconds]
mgarciaisaia1 has quit [Quit: Leaving.]
pawnbox has joined #crystal-lang
greenbigfrog has quit [Quit: The server of my BNC just shutdown or got killed!!!]
greenbigfrog has joined #crystal-lang
ruby has joined #crystal-lang
ruby is now known as Guest33296
Guest33296 has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
jhass has quit [Ping timeout: 246 seconds]
jhass has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<BlaXpirit>
dang it :(
lacour has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 265 seconds]
pawnbox has joined #crystal-lang
jotsobo has quit [Quit: Page closed]
Philpax has quit [Ping timeout: 268 seconds]
<FromGitter>
<rishavs> anyone awake? I am trying to create a toy language and would love to know how Crystal was created. were the lexer and parser handwritten or did you guys use a dedicated tool? is it based on c/c++? i know the backend is LLVM but thats about it.
<BlaXpirit>
rishavs, lexer and parser were handwritten in Ruby. uses LLVM.
akwiatkowski has joined #crystal-lang
<FromGitter>
<rishavs> ah. did that make the work of rewriting the compiler in Crystal much easier, considering tat the syntax/semantics are similar?
<FromGitter>
<jots_twitter> thanks, will check it out. in ruby when whipping out a throwaway script, i use $globals but i don't think crystal has those.
mark_66 has joined #crystal-lang
<FromGitter>
<overnet> @jots_twitter @drosehn Thank you for trying to help me! The strings that I use are very short, they are a lot shorter than regexes that my system uses. So removing whitespaces will not give huge speed improvement. ⏎ I will give you another example: ⏎ keywords = [“bus tickets sale in London”, “train tickets sale in london”, ”, “train tickets sale in Manchester”, ”, “train tickets sale in New York”] ⏎
<FromGitter>
<jots_twitter> @overnet removing white space was not to make the string to match smaller, but more to standardize. i was trying to make your lookups be hash lookups, so if you had say 10K words in the middle part (or i suppose you could use the same technique for prefix suffix parts): it is a single hash lookup instead of 10K compares But perhaps that's not applicable to your app?
<FromGitter>
<overnet> Yes, I cannot apply this to my app
soveran has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Fichtenstein has joined #crystal-lang
soveran has quit [Remote host closed the connection]
gloscombe has joined #crystal-lang
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
pawnbox has quit [Ping timeout: 258 seconds]
kochev has joined #crystal-lang
pawnbox has joined #crystal-lang
<FromGitter>
<xdougx> Hello guys
Alexendoo has left #crystal-lang ["Leaving"]
pawnbox has quit [Remote host closed the connection]
<crystal-gh>
[crystal] asterite pushed 4 new commits to master: https://git.io/vX5zo
<crystal-gh>
crystal/master ca275a4 Ary Borenszweig: Fixed #3524: incorrect allowed cast between type and recursive type
<crystal-gh>
crystal/master 3170854 Ary Borenszweig: Fixed recursive alias restriction against another recursive alias
<crystal-gh>
crystal/master d705c41 Ary Borenszweig: Spec: minor enhancements...
pawnbox has joined #crystal-lang
kochev has quit [Remote host closed the connection]
<FromGitter>
<paulcsmith> Then I have `field` macro that I call that adds fields to a constant. The `setup_table` macro gets run at the end and sets up the initializer
<FromGitter>
<paulcsmith> Not sure this is the *best* way, but it is working so far and looks pretty nice IMO
<FromGitter>
<fridgerator> great, thank you!
jokke has quit [Remote host closed the connection]
mhib has joined #crystal-lang
jokke has joined #crystal-lang
<FromGitter>
<xdougx> Is someone working in some framework to the persistence layer? Ive found the active_record.cr, but i dont know if its mature yet
<FromGitter>
<johnjansen> nothing is mature yet @xdougx, the TODO for active_record.cr will give you hints as to whats yet to be done… ⏎ also look at a slightly different approach https://github.com/sdogruyol/tren
<FromGitter>
<xdougx> let me take a look in tren, @johnjansen
mark_66 has quit [Remote host closed the connection]
<FromGitter>
<xdougx> this is not what im looking for, ive worked in a project that used crystal-pg and i had made some basic functions. I need to create a shard for it and let people help me on it.
<FromGitter>
<johnjansen> you can certainly do that @xdougx and others here may point you in a different direction also … just be aware that there alot of timezones present, so its the weekend for some and the middle of the night for others :-)
<FromGitter>
<xdougx> hehehe true, im at GTM-2 here is 14:31 hehehe
<FromGitter>
<drosehn> @overnet Based on your brief description of the problem, I would not be using regex's for it.
<FromGitter>
<johnjansen> haha @drosehn precisely what i was thinking …
<FromGitter>
<xdougx> There is any recommendation for gitignore for crystal?
<crystal-gh>
[crystal] asterite fast-forwarded master from bdd3170 to 6d3b5a4: https://git.io/vX5hu
<FromGitter>
<fridgerator> @xdougx I know when you create a new project with `crystal init` a `.gitignore` file is provided for you
<crystal-gh>
[crystal] asterite closed pull request #3557: Update crystal init with new info available in shards v0.7.0 (master...feature/crystal_init_shards_0.7.0) https://git.io/vX5hZ
<crystal-gh>
[crystal] asterite opened pull request #3558: crystal init: add targets and crystal version for the upcoming shards v0.7.0 (master...feature/crystal_init_shards_0.7.0) https://git.io/vX5hX
<FromGitter>
<xdougx> Nice, need to see if my current `.gitignore` has the same arguments in this init
<FromGitter>
<xdougx> @johnjansen as i said before https://github.com/xdougx/selenite-db, this is what ive been working, its just the beginning, have only basic features to create and update some data in the database
<FromGitter>
<xdougx> need to make a roadmap features, documentation and tests
kulelu88 has joined #crystal-lang
gloscombe has quit [Quit: Lost terminal]
Guest61119 has quit [Remote host closed the connection]
ruby has joined #crystal-lang
ruby is now known as Guest66338
Guest66338 has quit [Ping timeout: 244 seconds]
<FromGitter>
<johnjansen> @sdogruyol are you around?
ponga has joined #crystal-lang
<maxpowa>
So I have a YAML mapping with some defaults and stuff, and I want to write an instance of this mapped class to a file. Is this possible right now? It appears that YAML.mapping doesn't generate a to_yaml for the class...
<FromGitter>
<johnjansen> got some code to look at @maxpowa ?
<Papierkorb>
maxpowa, I did not need this myself yet, but have you tried `YAML.dump(the_mapped_instance)` ?
<maxpowa>
im doing that and it fails because there's no to_yaml
<maxpowa>
making a carc.in, sec
<FromGitter>
<johnjansen> did you `require “yaml”`
<maxpowa>
uhh yes.
<FromGitter>
<johnjansen> sorry for the question ;-)
<FromGitter>
<xdougx> what is this in a module: `fun testing = Something(param: type) : SomeReturn`? I haven't seen it before, is this in the docs?
<RX14>
where?
<RX14>
it's a C function binding btw
<FromGitter>
<xdougx> im reading in the docs, i can use native C function in my code, that is it?
<RX14>
yep
soveran has joined #crystal-lang
<FromGitter>
<johnjansen> @maxpowa looks like you are completely correct, json works fine though https://carc.in/#/r/1ecs as does MessagePack if thats at all interesting
<maxpowa>
yeah..
<FromGitter>
<johnjansen> interesting oversight if it is indeed missing
<Papierkorb>
Or the person didn't need it back then and didn't want to spend more time on it ^^;
<FromGitter>
<johnjansen> hey man, im trying to do something very slightly tricky with kemal … basically if a resource is missing, then try to download it before serving it …
<FromGitter>
<sdogruyol> sounds tricky can you show me a code piece?
<FromGitter>
<johnjansen> problem is, id like to do this as a filter and the before_all only seems to fire on some routes
<FromGitter>
<johnjansen> ok, but its really early stage code just FYI
<FromGitter>
<sdogruyol> @johnjansen you better use a middleware
<FromGitter>
<johnjansen> that was my first thought
<FromGitter>
<johnjansen> thats interesting, i tried something similar but it didnt seem to run on every request … ill try again
<FromGitter>
<sdogruyol> yeah and please use Kemal master for now
pawnbox has quit [Ping timeout: 252 seconds]
<crystal-gh>
[crystal] bcardiff pushed 1 new commit to master: https://git.io/vXd3h
<crystal-gh>
crystal/master d847b69 Brian J. Cardiff: Playground: html escape the stdout
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
<FromGitter>
<johnjansen> thanks @sdogruyol looking good so far … dont know what i messed up last time ;-)
<FromGitter>
<sdogruyol> @johnjansen cheers :)
<FromGitter>
<johnjansen> one day ill build a complete proxy server with a nice api and a bunch of hooks
<FromGitter>
<sdogruyol> for what?
<FromGitter>
<johnjansen> fiddling with http requests on the fly, debugging, recording transactions such that you can replay them as test fixtures … all sorts of things
<FromGitter>
<johnjansen> building a content filter
<FromGitter>
<sdogruyol> ugh that sounds hard
<FromGitter>
<johnjansen> perfect job for you ;-)
<FromGitter>
<sdogruyol> haha lol
<FromGitter>
<jots_twitter> build it @johnjansen ! I will use it! :-)
<crystal-gh>
[crystal] maxpowa opened pull request #3559: Support to_yaml in YAML.mapping generated classes (master...mapping-to-yaml) https://git.io/vXdc0
<FromGitter>
<sdogruyol> Does ECR escape HTML by default or not?
<RX14>
no i don't think so looking at the source
<FromGitter>
<sdogruyol> ugh
<FromGitter>
<sdogruyol> i think it should by default*
<FromGitter>
<johnjansen> whenever the next release happens
<FromGitter>
<sdogruyol> i think it's coming soon
<FromGitter>
<sdogruyol> @asterite is working hard <3
<FromGitter>
<johnjansen> oh @sdogruyol we need to petition the irc admins for a few more permissions so we can boot anyone / thing whos breaking the terms … like the Allah bot last night
<FromGitter>
<johnjansen> unless you have ops
<FromGitter>
<sdogruyol> that's annoying
<FromGitter>
<johnjansen> yeah, whilst it was amusing in some ways, it hilights a problem with timezones and not enough admins
<FromGitter>
<sdogruyol> shit happens sometimes
<FromGitter>
<johnjansen> haha
pawnbox has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
<RX14>
@johnjansen you should ping me
<RX14>
if there's a bot
<RX14>
i'll ban it
<RX14>
unfortunately it was 1am for me
<RX14>
maybe we need another op
<FromGitter>
<johnjansen> thats my point ;-)
<FromGitter>
<johnjansen> show of hands, TIMEZONES everyone
<RX14>
yeah but you didn't know who the admins were
<FromGitter>
<johnjansen> PST
<FromGitter>
<sdogruyol> GMT +03:00
<RX14>
i'm in GMT
<FromGitter>
<sdogruyol> i don't even know what PST is lol
<FromGitter>
<johnjansen> -0800
<FromGitter>
<sdogruyol> 11 hours wow
<FromGitter>
<sdogruyol> it's 00:00 AM here
<RX14>
9PM here
<RX14>
so 2PM for you?
<RX14>
sorry
<FromGitter>
<johnjansen> 1pm
<RX14>
1PM
<RX14>
clearly can't do basic maths
<FromGitter>
<sdogruyol> @RX14 basic math is hard
<FromGitter>
<johnjansen> after a long day
<RX14>
i tried to work it out my imagining a clock in my head
<RX14>
which didn't go well
<FromGitter>
<phoffer> time zones are hard :)
<RX14>
yeah
<FromGitter>
<phoffer> -0700 over here
<FromGitter>
<sdogruyol> It's over 9000 @johnjansen
<FromGitter>
<johnjansen> i feel like we need an op in each 12hr half
<FromGitter>
<phoffer> Can never figure out when’s the best time to bug you guys that are +0100 to 0300 haha
<RX14>
well asterite doesn't seem to come here much
<RX14>
i'm not *really* monitoring this channel unless pinged
<FromGitter>
<sdogruyol> well this place got crowded recently
<RX14>
and jhass is busy (and in a close timezone)
<FromGitter>
<sdogruyol> 250 people on gitter + IRC
<FromGitter>
<sdogruyol> i mostly check gitter in an async way
<RX14>
i check it sometimes, it depends
<FromGitter>
<johnjansen> all the more reason to have more ops
<RX14>
mmm
<RX14>
an op in pacific and an op in GMT covers a lot honestly
<RX14>
i am busy at college most of the daytime though
<FromGitter>
<sdogruyol> @RX14 i agree with 2 ops
<FromGitter>
<johnjansen> who’s in pacific?
<RX14>
well there's technically 5 ops
<FromGitter>
<johnjansen> ok all good
<FromGitter>
<sdogruyol> :D
<RX14>
only jhass, asterite and me are actually online though
<FromGitter>
<johnjansen> didnt realize there were 5
<RX14>
and asterite doesn't seem to respond to pings and jhass is really busy too
<RX14>
so it's basically only me
<FromGitter>
<sdogruyol> @RX14 didnt know that you were an admin :D
<RX14>
i'm an op
<RX14>
not really an admin
<FromGitter>
<sdogruyol> what i meant to say was op*
<FromGitter>
<johnjansen> where are you @RX14
<RX14>
around london
<FromGitter>
<sdogruyol> not in EU for sure :D
<FromGitter>
<johnjansen> cool
<RX14>
no, we are
<RX14>
for a good 2 years more
<FromGitter>
<johnjansen> where are you from originally
<FromGitter>
<sdogruyol> we are not and we wont be forever
<FromGitter>
<sdogruyol> Istanbul
<FromGitter>
<jots_twitter> i'm in -0800 as well (socal)
<RX14>
i put my VERSION constant inside the main file
<RX14>
and then use a spec to ensure that it's the same as the shard version
<RX14>
updating in 2 places isn't too bad
<FromGitter>
<jots_twitter> i'm pining for =begin/=end or some sort of multiline comment
<RX14>
use your editor to comment blocks
<FromGitter>
<jots_twitter> this works in a function: `lets = (('0'..'9').to_a + ('a'..'z').to_a) << '-'` ⏎ this won't compile in a class method: `@lets = (('0'..'9').to_a + ('a'..'z').to_a) << '-' ` ⏎ error: "Can't infer the type of instance variable '@lets' of DS" How do I make it work?
<RX14>
multiline comments are ugly honestly
<FromGitter>
<johnjansen> instance var in a class method?
<FromGitter>
<johnjansen> how would that work?
<FromGitter>
<jots_twitter> i mean a method in a class.
<FromGitter>
<johnjansen> yeah, define the type in the class definition