RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <markrjr> I'm getting an unresolved symbol error when trying to create a binary on Windows. I'm following the instructions in the porting to Windows guide.
<FromGitter> <markrjr> SystemFunction036?
<FromGitter> <markrjr> Which comes from here I think?
<FromGitter> <markrjr> I used the latest Crystal 26.1 on Fedora to cross compile.
<FromGitter> <markrjr> Is there a special branch that I should use of crystal compiled from source?
baweaver_away is now known as baweaver
<FromGitter> <markrjr> Figured it out!
<FromGitter> <markrjr> Just gotta add that to the command line when linking: `"hello_world.o" "/Fehello_world" pcre.lib gc.lib libcmt.lib advapi32.lib`
<FromGitter> <Sija> another round of SJW spammers, here we go!
<FromGitter> <Sija> till today I was oblivious of the term, but now I’m so much regressively educated, yay!
<FromGitter> <Sija> for the ones still not-“enlightened”: https://en.wikipedia.org/wiki/Social_justice_warrior
<FromGitter> <Sija> Marxism v2.0? Brave New World is here, huh. 100 kudos to @asterite for keeping these issues out of the codebase!
<FromGitter> <SeedyROM> Is there anyway to tell YAML.parse to parse all key value pairs as strings? I'm trying to parse a file that is always going to be different. And figuring out stuff with YAML::Any is so annoying. Maybe I'm missing something important here.
<FromGitter> <girng> what is going on
<FromGitter> <girng> why do they pick crystal as a target
<FromGitter> <Sija> @SeedyROM I think `YAML::Schema::FailSafe.parse` is what you’re looking for
<FromGitter> <girng> @markrjr btw, congrats haha
<FromGitter> <SeedyROM> @Sija Let me check it out! Thanks for pointing that out, I must have glanced over that.
lvmbdv has quit [Quit: Connection closed for inactivity]
<FromGitter> <SeedyROM> @Sija, now upon loading the YAML document I get this error:
<FromGitter> <SeedyROM> ```undefined method 'first?' for YAML::Any```
<FromGitter> <Sija> @girng popularity? name? ask them next time you’ll have a chance (that is before someone hopefully will lock the issue) ;) I’d be interested to know the answer too! maybe it’s a sign of success - Crystal is known enough to make ideological brute-force attacks
<FromGitter> <SeedyROM> With --error-trace: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ba854c0913ba7799b34edd1]
<FromGitter> <Sija> @SeedyROM might be a bug, could you post the offending code?
<FromGitter> <SeedyROM> Here's the code ⏎ ⏎ ```file = File.read(@path) ⏎ puts file ⏎ yaml = YAML::Schema::FailSafe.parse file ⏎ puts yaml``` [https://gitter.im/crystal-lang/crystal?at=5ba85528e6046343f3a868c0]
<FromGitter> <Sija> looks legit
<FromGitter> <SeedyROM> Nothing seems wrong here, and the YAML file is perfectly valid
<FromGitter> <Sija> looks like a bug, I’d file an issue
<FromGitter> <SeedyROM> I'm going to, I'll also create a fork and try and fix the issue.
<FromGitter> <Sija> 👍
<FromGitter> <SeedyROM> Also going to post my .yml code here too: ⏎ ⏎ ```context: ⏎ replace_me: "Yes please!"``` [https://gitter.im/crystal-lang/crystal?at=5ba856bf1043315947d74160]
<FromGitter> <markrjr> Ty ty @girng
rohitpaulk has joined #crystal-lang
<FromGitter> <markrjr> @Sija I don't know if they're SJWs, just people with way too much time on their hands.
<FromGitter> <Sija> that would fit
<FromGitter> <Sija> such a shame they don’t invest it in some worthy activity
rohitpaulk has quit [Ping timeout: 260 seconds]
<FromGitter> <markrjr> Yeah, :/
<FromGitter> <Blacksmoke16> `YAML::Any` doesnt have a `.first?` method
<FromGitter> <Blacksmoke16> try doing like `yaml.as_a.first?`
<FromGitter> <Blacksmoke16> @SeedyROM
<FromGitter> <SeedyROM> That's exactly what I ended up doing, I copied the class from the source code and changed that.
<FromGitter> <SeedyROM> But it literally functions exactly the same as YAML.parse
<FromGitter> <Blacksmoke16> ok
<FromGitter> <SeedyROM> So I decided to avoid using it, however it's good I found a bug.
<FromGitter> <Blacksmoke16> yea but im not sold thats actually a bug
<FromGitter> <Blacksmoke16> `parse` returns `YAML::Any` which does not have a method called `.first?` like the error says
<FromGitter> <SeedyROM> It happens in the cast_document call of the parser, which implies a singular doc. Atleast that's what I'm getting out of the context of the error.
<FromGitter> <SeedyROM> I know it doesn't have a first, but cast_document is not getting passed a list.
<FromGitter> <Blacksmoke16> ohh its happening *from* the parse
<FromGitter> <Blacksmoke16> my bad, i follow you now
<FromGitter> <Blacksmoke16> prob would help if you posted the yaml in the config file too
<FromGitter> <SeedyROM> I did.
<FromGitter> <SeedyROM> It's super basic.
<FromGitter> <Blacksmoke16> i mean in the issue*
<FromGitter> <Blacksmoke16> cheers 👍
<FromGitter> <SeedyROM> :cheers:
<FromGitter> <SeedyROM> Lol, I don't know how these gitter emoticons work.
<FromGitter> <Blacksmoke16> only some of the ;)
<FromGitter> <SeedyROM> I think I just need to be more light handed with my handling of types, I was trying aggressively to get the YAML module to work like it would in a dynamically typed language.
<FromGitter> <SeedyROM> I think I've been getting spoiled by how most of the time the type system is pretty much hidden.
<FromGitter> <Blacksmoke16> usually afaik, the rule of thumb is to get away from the `YAML::Any` asap and into like an array of objects or something
<FromGitter> <Blacksmoke16> can be helpful as well
<FromGitter> <SeedyROM> I was playing around with that early but couldn't get it to work the way I intended it to, but I'm realizing now I was just being impatient.
<FromGitter> <SeedyROM> I need to think more about how I want this to work.
<FromGitter> <Blacksmoke16> thats usually a good first step haha
<FromGitter> <SeedyROM> I had a good plan for everything else, but I totally messed up on the parsing YAML part haha
<FromGitter> <Blacksmoke16> is always something
rohitpaulk has joined #crystal-lang
<FromGitter> <markrjr> How do I compile to test the new functionality for Windows?
<FromGitter> <markrjr> To be specific:
<FromGitter> <markrjr> I've made some changes here (https://github.com/markrjr/crystal/blob/886fd269c72b421ec4a69b68ea03da89f17af7b6/src/lib_c/x86_64-windows-msvc/c/ntsysteminfo.cr). I have no idea what I'm doing, so they're probably wrong, but I want to know the workflow.
<FromGitter> <markrjr> That includes `c/winnt` etc. so that it can get definitions for DWORD and other stuff.
<FromGitter> <markrjr> Do I have to compile the entire compiler?
<FromGitter> <markrjr> Or should I just drag c/winnt and whatever else I include into the same directory, compile those, and then try to compile/link on Windows?
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <codenoid> good noon all
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ba8714cbe4f300626dbf473]
<FromGitter> <codenoid> should i make an issue for this ?
<FromGitter> <codenoid> the epoch is valid in http://epochconverter.com/
<FromGitter> <codenoid> i got the epoch from Android SMS
<FromGitter> <codenoid> READ_SMS
<FromGitter> <Timbus> Epoch time is in seconds.. You're using, I guess.. milliseconds
<FromGitter> <codenoid> idk, android give me that epoch
<FromGitter> <Timbus> Java uses millisecond epoch
<FromGitter> <codenoid> so,,,,
<FromGitter> <Timbus> divide by a thousand, I guess
<FromGitter> <codenoid> <3
<FromGitter> <HarrisonB> @markrjr agreed about the trolls just being trolls... i mean one of their icons was an anti-black caricature and another was two non-white stick figures stomping on a white stick figure. feels like they're just trying to stir up racist sentiments after the recent leader/follower controversy
rohitpaulk has quit [Ping timeout: 244 seconds]
<FromGitter> <rishavs> I am really struggling with ECRs. code which should work is not working and I can't find any error. Spent the entire weekend on a single error which I could not fix. :/ I really can use some help. ⏎ I am calling my ECR render like this; ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5ba87ff5e6046343f3a942f5]
rohitpaulk has joined #crystal-lang
ddffg has joined #crystal-lang
<FromGitter> <codenoid> but yeah
<FromGitter> <codenoid> sorry, wrong room
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <rishavs> If i use the same bit of code in a different route, it works.
ddffg has quit [Remote host closed the connection]
<FromGitter> <bajro17> I will try it @rishavs
<FromGitter> <rishavs> thanks! <3
ua has quit [Ping timeout: 260 seconds]
<FromGitter> <sdogruyol> Morning everyone 👋
<FromGitter> <bajro17> @sdogruyol Good morning dear brother :)
<FromGitter> <rishavs> @bajro17 I just found the issue. Thanks for trying to help me out
ua has joined #crystal-lang
<FromGitter> <rishavs> I am referring to the same ECR in two places and in the 2nd place, i didnt initialize the variable that I was trying to show in there. And all this time i was focussing on the 1st instance of the ECR reference and never checked the 2nd.
<FromGitter> <bajro17> No problem glad you fix it :)
rohitpaulk has joined #crystal-lang
moei has quit [Quit: Leaving...]
<FromGitter> <drum445> @Sija agreed that it's Marxism reborn, Huxley is weeping
<FromGitter> <drum445> good morning @sdogruyol, what's new?
<FromGitter> <sdogruyol> Morning @bajro17 @drum445 👋
<FromGitter> <sdogruyol> @drum445 thank you, not much I guess :) How about you?
<FromGitter> <drum445> Not too much, creating an app (not quite thought of the idea yet) but it will use encryption with sqlite
<FromGitter> <sdogruyol> Sounds good 👍
<FromGitter> <bajro17> Haaahhahah @rishavs I try now play with ECR and dont work at all I cant figure out how to use ECR.render macro
<FromGitter> <rishavs> yeah. ECRs have been a lot of pain. But that seems true of all macros. Thankfully, once I am able to fix any problem around ECRs they stay fixed. And most problems are because of my own mistakes.
<FromGitter> <bajro17> do you have any example how to use ecr.render
<FromGitter> <bajro17> it give me error like this
<FromGitter> <bajro17> @instance_vars are not yet allowed in metaclasses: use @@class_vars instead
<FromGitter> <bajro17> sorry
<FromGitter> <bajro17> I'm stupid hahahah
<FromGitter> <bajro17> I dont notice I have @variable instead just variable
<FromGitter> <rishavs> ECRs will just take any variable declared in the current scope. ⏎ so ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5ba89cc6e5c2cc56add5e3e2]
<FromGitter> <bajro17> It work so good just I dont see it I try 20 times with different variable but dont notice I write @
<FromGitter> <rishavs> :D. i know that feeling. Half of my debugging sessions are feeling sorry for myself. "How can i be so stupid!"
lvmbdv has joined #crystal-lang
<FromGitter> <vladfaust> Did you know that the author of the widely-accepted Code of Conduct is a trans-gender?
<FromGitter> <vladfaust> And also she (?) is the author of http://distributed-denial-of-women.org/ and https://www.os4w.org/
<FromGitter> <vladfaust> Just saying
<FromGitter> <vladfaust> She (?) clearly states on her (?) website: "Notorious Social Justice Warrior"
<FromGitter> <vladfaust> Just saying
<FromGitter> <vladfaust> Just saying
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <bajro17> @vladfaust why this is important?
<FromGitter> <bajro17> are you transgender also and you want prove that transgender can be programer
<FromGitter> <vladfaust> I never said it's important:
<FromGitter> <vladfaust> > Just saying
JesseH has joined #crystal-lang
<JesseH> For anyone with experience using Granite: Is there a longer text type that doesn't default to VARCHAR(255) when using the mysql adapter?
<JesseH> I didn't see anything in its codebase but I could have overlooked something.
<FromGitter> <bajro17> JesseH you can use TEXT
<FromGitter> <vladfaust> Just saying that I'm against SJWs winning this war. I'd better stayed straight than bond over. That's my position
<JesseH> bajro17: Like "field whatever : TEXT"?
<FromGitter> <bajro17> you can check this
<JesseH> bajro17 I'm actually using granite separately with kemal. And I'm building the tables with granites migrator.create function
flaviodesousa has joined #crystal-lang
<FromGitter> <rishavs> @vladfaust ⏎ ⏎ > https://lulz.com/linux-devs-threaten-killswitch-coc-controversy-1252/ nice article ⏎ ⏎ I suddenly understand why Linus took a long vacation. He doesn't wants to deal with this fallout 😆 [https://gitter.im/crystal-lang/crystal?at=5ba8a77dbe4f300626dd3ab0]
<FromGitter> <bajro17> JesseH are you try to use this text field? are you get any error
return0e has joined #crystal-lang
<JesseH> bajro17 when I use granite migrator to create the tables, String types default to VARCHAR(255)
ashirase has quit [Ping timeout: 260 seconds]
<FromGitter> <bajro17> JesseH I dont have mysql installed now to test it
<FromGitter> <bajro17> can you please write me how your command looks like
ashirase has joined #crystal-lang
<FromGitter> <vladfaust> @rishavs that's not fun at all
ua has quit [Ping timeout: 264 seconds]
rohitpaulk has joined #crystal-lang
ua has joined #crystal-lang
moei has joined #crystal-lang
ua has quit [Ping timeout: 245 seconds]
ua has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <bajro17> Is anyone know is there for crystal IPFS library?
<FromGitter> <eliasjpr> does shards support monorepo style of shards?
Groogy1 has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
Groogy1 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 272 seconds]
<FromGitter> <rishavs> Is there a simple way to convert an array of strings`["nature", "science", ...]` into a string with format `"('nature'), ('science'), ..."`? ⏎ Currently I am iterating over the list and adding each item into the formatted string one by one. it seems like there should be a better way to do it.
<FromGitter> <yxhuvud> `strings.map {|s| "('#{s}')"}.join(", ")`
<FromGitter> <yxhuvud> but it is probably posible to do with fewer temporary strings if you use a stringbuilder
<FromGitter> <rishavs> thanks!
Groogy1 has quit [Ping timeout: 240 seconds]
Groogy1 has joined #crystal-lang
return0xe has joined #crystal-lang
return0e has quit [Ping timeout: 252 seconds]
<FromGitter> <vladfaust> also `strings.join(", "){ |s| "('#{s}')" }
tomte has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
<FromGitter> <eliasjpr> > Does `crystal shards` support monorepo style of shards?
dannyAAM has joined #crystal-lang
flaviodesousa has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<FromGitter> <bew> What is it?
<FromGitter> <girng> reverse NPM?
<FromGitter> <eliasjpr> @bew basically a bunch of shards hosted on the same repo
<FromGitter> <eliasjpr> @bew see this an example https://github.com/rails/rails
<FromGitter> <bew> Oh, i doubt it
<FromGitter> <j8r> you can specify a file system path
<FromGitter> <eliasjpr> each directory is a gem, `shard` in crystal world
<FromGitter> <girng> instead of downloading multiple dependencies recursively, it just downloads the main folders? is that what u mean?
<FromGitter> <eliasjpr> so we can point a shard to subdirectories?
<FromGitter> <eliasjpr> for instance ⏎ ⏎ ```dependencies: ⏎ amber: ⏎ github: amberframework/amber/some_shard``` [https://gitter.im/crystal-lang/crystal?at=5ba9032a7dca3065034a4be5]
<FromGitter> <j8r> yes, instead of `github: `, `path: to/the/shard`
<FromGitter> <bew> @eliasjpr means subdirectories of a github repo, not local
<FromGitter> <bew> (@j8r ^)
<FromGitter> <j8r> remote repo? not possible
<robacarp> the big reason ruby gems supports this is that rubygems uses their own central server to publish gems rather than depending on github to do it
ua has quit [Ping timeout: 240 seconds]
ua has joined #crystal-lang
<FromGitter> <eliasjpr> I think having shards to support monorope is a fair use case, specially for institutions who uses monorepo and have might have a bunch of shards.
<FromGitter> <eliasjpr> Doing something like this is very useful. ⏎ ⏎ ```dependencies: ⏎ some_shard: ⏎ github: amberframework/amber/some_shard``` [https://gitter.im/crystal-lang/crystal?at=5ba91010f7e15806251adafa]
<FromGitter> <j8r> what's the point if all is in one repo?
DTZUZO_ has quit [Ping timeout: 252 seconds]
<FromGitter> <j8r> you can already build the mono project without using shards
<Yxhuvud> well, it would allow some other project to also make use of it
rohitpaulk has joined #crystal-lang
<FromGitter> <girng> is there an article on performance tips and tricks regarding faster compilation times?
Heaven31415 has joined #crystal-lang
<Heaven31415> Hi
<FromGitter> <r00ster91> you can have very fast compilation with the flag `--prelude=empty` unfornately you can't you use the STD anymore then
<FromGitter> <girng> @r00ster91 thanks, what do you mean can't use "STD"? like standard libraries (json, etc)?
<FromGitter> <r00ster91> all these libraries: https://github.com/crystal-lang/crystal/blob/master/src/prelude.cr
<FromGitter> <girng> oh yeah, i use some of those
<FromGitter> <girng> is there a way to dynamically set which ones to exclude?
<FromGitter> <r00ster91> not really, no
<Heaven31415> so it's possible to create your own std and work without the default one
<FromGitter> <r00ster91> @girng ⏎ but heres another tip if you want your own code to compile fast: you shouldnt use the `Int` type restriction on arguments in your methods because this: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5ba91673b9531f2dfab44745]
<FromGitter> <girng> i'm reading over this again https://crystal-lang.org/docs/guides/performance.html
<FromGitter> <girng> Interesting. So it's safe to say, the more specific your code is, the faster it will compile?
<FromGitter> <girng> yeah, I've never really used just plain `Int` before, but I've been using Int8 and Int64 a bit. for mapping types from database
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <r00ster91> > Interesting. So it's safe to say, the more specific your code is, the faster it will compile? ⏎ Hmm no im not too sure about that. IIRC I once made a compilation time test with 1000 times this method: ⏎ ⏎ ```def method(arg : String) : Nil ⏎ end``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5ba91a76913ba7799b39b335]
Groogy1 has quit [Ping timeout: 240 seconds]
<FromGitter> <girng> i want to write an app in either crystal with a small gui library, or use godot. but i want it to to execute 2 commands with 1 click, or click on each button for that specific command to be run. cmd 1: `crystal src/MasterServer.cr` , cmd2 : `crystal src/GameServer.cr`. this would be very beneficial because i'm getting really annoyed of alt-tabbing, or switching to 2 separate console windows when developing
<FromGitter> <r00ster91> are you on windows?
<FromGitter> <girng> yeah, W10
<FromGitter> <girng> @r00ster91 yeah i'll check my code to see and try to change Int to its specific type
<FromGitter> <fridgerator> You could use docker-compose, you could try Sentry to auto-reload your changes, you could write a crystal script which spins up both processes, etc
<FromGitter> <r00ster91> ah me too. Unfornately IMO its currently pretty painful to create graphical apps with Crystal on Windows. Because you need to connect the windowing system of bash/linux to the windowing system of Windows 10. I used xming for that. It's very buggy and slow. I would for now use godot or wait for windows support for crystal
JuanMiguel has joined #crystal-lang
<FromGitter> <girng> thanks fridgerator, i will look into sentry
sevensidedmarble has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<FromGitter> <Sija> @drum445 yep, although IMO Huxley was part of the “problem”, not a solution ;) that’s why he was so “foreseeing” in his book (btw, I’d recommend checking his bio - it tells a lot ;))
<FromGitter> <Sija> maybe it’s a good time to vote for NCoC (https://github.com/domgetter/NCoC)?
sevensidedmarble has joined #crystal-lang
wontruefree has joined #crystal-lang
JuanMiguel has quit [Quit: This computer has gone to sleep]
<FromGitter> <HarrisonB> @Sija
<FromGitter> <Sija> good evening @HarrisonB, what’s up? :)
<sevensidedmarble> hows everyone doing today?
<FromGitter> <HarrisonB> Oops, sorry for the orpan message. @Sija strongly disagree with the NCoC. All of the trolling that has occurred so far have been intending to stir up this sentiment.
<FromGitter> <Sija> I’m not sure I follow you
sevensidedmarble has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
sevensidedmarble has joined #crystal-lang
<FromGitter> <Sija> @sevensidedmarble gr8! had been taking part in chestnuts picking competition along with black-colored squirrels, it was fun ;)
<FromGitter> <Sija> how about you?
<sevensidedmarble> Sija: pretty good, been trying to get some work done but also trying to work on my crystal shell
<z64> hi all. wonder if someone can point me in the right direction - i have a PCM WAV file on disk that i need to pass as a buffer to a C function as `Int16*`. Using `File`, i can `IO#read(slice : Bytes)` (`Slice(UInt8)`) which I of course can't pass as `Int16*`.. what do I need to do to get this as the correct primitive in memory?
wontruefree has quit [Quit: bye]
<FromGitter> <Sija> @HarrisonB call me lawless but I do believe that people don’t need any specific set of rules to discern “good” from “bad” or rather right from wrong
<sevensidedmarble> I've been using this cool parsing library in crystal called CLTK but I haven't quite got it to parse function correctly
<FromGitter> <HarrisonB> There was a recent sweep of trolling on the crystal issue board on GitHub intended to mock CoCs but I think people took the bait and believed the trolls were people actually trying to enforce CoC-like rules
<FromGitter> <HarrisonB> @Sija the issue is that without a code in place there's nothing to point to when someone crosses that line
sevensidedmarble has quit [Client Quit]
sevensidedmarble has joined #crystal-lang
<FromGitter> <Sija> @HarrisonB of course there is, ad-hominem attacks are well known technique and you don’t need any CoC to know and point to that
<FromGitter> <HarrisonB> Haha, now I'm not *I* follow
<FromGitter> <Sija> and that’s just one example, being polite, non-emotional and respectful towards others should be pretty obvious thing with no need to “encode it” into any formal document
<FromGitter> <HarrisonB> totally agree with the *should*. but what do you do when that's violated?
<FromGitter> <girng> what does `NCoC` stand for?
<FromGitter> <Sija> I mean, it’s like saying that you should have some formal document in your family to regulate your own behaviour, because otherwise there’s nothing to point to
<FromGitter> <r00ster91> No Code of Conduct
<FromGitter> <HarrisonB> @girng @r00ster91 i think it is specifically referring to this document https://github.com/domgetter/NCoC (unless I'm mistaken)
<FromGitter> <HarrisonB> @Sija the issue is that an Open Source proj isn't like a family, right? It's closer to work. And most places of employment have a handbook in which they outline harassment (in fact, in the US I think you *have* to have such a policy in place)
<FromGitter> <Sija> well, I don’t agree
<FromGitter> <elorest> Sure. But the standard is to include Coraline’s Coc, and it’s been demonstrated time and time again that resistance is futile. Sure most people in the community will respond well in most cases without it, and there will still be problems with it. ⏎ ⏎ Essentially it comes down to arguing that since people will follow the code anyway we don’t need it. At which point why not have it?
<FromGitter> <Sija> it should be like family more like some anonymous, oftenly perverted work relation
<FromGitter> <Sija> work structures were modeled by some very weird and fucked up ppl for very weird and fucked up reasons
<FromGitter> <Sija> think: factories
<FromGitter> <Sija> ford factories in the beginning of 20th century, nazi-s which picked it up later on
<FromGitter> <HarrisonB> Can't talk for much longer as I'm at work (i'm in the PDT timezone), but I'd be happy to chat about this later
<FromGitter> <Sija> IMO totally wrong basics to build a healthy community on ;)
<FromGitter> <Sija> @HarrisonB same here, PM me if you’d talk some more :)
<FromGitter> <HarrisonB> Last thing I'll say is that most of the policies outlining harassment are completely divorced from any historical origin with factories
<FromGitter> <HarrisonB> They were reforms to counter the often rampant harassment that took place in those environments
wontruefree has joined #crystal-lang
<FromGitter> <Sija> factories, not directly, no. usually they’re connected to the concept of political correctness
<oprypin> z64, can't think of anything better than slice.to_unsafe.as(Int16*)
<FromGitter> <girng> @sevensidedmarble post code and error, devs can help =]
sevensidedmarble has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<z64> oprypin: sure, i'll try, but i have a feeling that there's more to it..
sevensidedmarble has joined #crystal-lang
<oprypin> worst that could happen is endianness
<sevensidedmarble> girng: do you know if they frequent crystal-lang on irc or gitter?
<oprypin> if you don't forget to divide the size by 2
wontruefree has quit [Quit: bye]
<FromGitter> <girng> @sevensidedmarble yes they are here. just super busy i think. oprypin is here and can help with mostly anything too.
<sevensidedmarble> yeah everyone here is way smarter then me lol
<sevensidedmarble> I feel like there's a stigma about asking help writing parsers and programming languages, because people think if you're writing a parser surely you should know enough to figure it out yourself
<sevensidedmarble> But yeah, if they're around or if anyones curious the relevent files I've been using CLTK in is: https://github.com/Sevensidedmarble/crysh/blob/master/src/cryshlang.cr and everything in https://github.com/Sevensidedmarble/crysh/tree/master/src/crysh/lang
<sevensidedmarble> I've been basically going completely off the examples @ziprandom ported in https://github.com/ziprandom/cltk/blob/master/examples/kazoo/chapter_8/kparser.cr
<sevensidedmarble> and I've read all the original instructional stuff over at RLTK in ruby too
<sevensidedmarble> originally the code that was there worked fine for functions that were only one expression
<sevensidedmarble> but would break when parsing a function with multiple expressions
sagax has quit [Quit: Konversation terminated!]
<sevensidedmarble> so I tried to extend it to parse functions that are either one Expression, or an ExpressionList
<sevensidedmarble> but I haven't had much luck. I've tried a ton of things and usually I'll either get index out of bounds errors when it seems like the grammar is defined wrong in some way, or I can't seem to get it to recognize that an expression list inside a function is actually an expression list
<sevensidedmarble> even though it does parse an expression list on it's own alright
<FromGitter> <girng> Hmmmm
<sevensidedmarble> oh and if anyone wants to run it you can just clone my repo, run `shards install` and run `crystal build src/cryshlang.cr`
<sevensidedmarble> the other main file `crysh.cr` is just for the temporary shell without the parser. I'm building out the parser seperately and ideally merging it in when it actually works.
<sevensidedmarble> I guess I probably need one production for a function that takes an Expression and one that takes an ExpressionList
<sevensidedmarble> but even that didn't seem to work for me (but I'm no expert) and the docs seemed to indicate that it could already take lists as is
<sevensidedmarble> like an ExpressionList was just an Expression too
<sevensidedmarble> it does inherit from Expression after all
wontruefree has joined #crystal-lang
<sevensidedmarble> it seemd really weird to do it like that though
<sevensidedmarble> and have a whole seperate AST node for `FunctionWithExpression` and `FunctionWithExpressionList`
<sevensidedmarble> I know it should be possible to do it with only one AST node, and just cast Expressions into ExpressionLists or something...
<sevensidedmarble> I just can't quite get that working
DTZUZO_ has joined #crystal-lang
<FromGitter> <j8r> I don't agree with the No Code Of Conduct. First line, "we are all adult". Nope, there are talented and mature children. This should be :"everyone should be mature"
<FromGitter> <j8r> Confusing implicitness... https://github.com/domgetter/NCoC/issues/19
<FromGitter> <vladfaust> Hey guys, check out the new design: https://crystaljobs.org/
<z64> very nice!
<FromGitter> <j8r> I like the UI :)
<FromGitter> <girng> @vladfaust nice work again hahah. looks good!!
<Vexatos> only one of those has a username that is not just based on their real name
<FromGitter> <vladfaust> Thanks! I appreciate that 😌
<FromGitter> <Sija> @vladfaust nice and clean UI, good job! :)
<FromGitter> <girng> megatux? :D
<Vexatos> nah vladfaust of course
<FromGitter> <vladfaust> @Sija why don't you publish yourself? :)
<FromGitter> <vladfaust> @Vexatos I don't understand
<Vexatos> much sarcasm
<Vexatos> don't mind me
<Vexatos> The UI is looking super nice ,_,
<FromGitter> <girng> yah nice
<Vexatos> I'm all for minimalism :I
<FromGitter> <vladfaust> Me too!
<FromGitter> <girng> me three!
<FromGitter> <vladfaust> I'm glad you like it, men
<Vexatos> also why I like the crystal logo >_<
<FromGitter> <Sija> @vladfaust will do :)
<FromGitter> <vladfaust> It really means a lot when someone appreciating your work
wontruefree has quit [Quit: bye]
<FromGitter> <vladfaust> Gonna take the first meal in 8 hours :D
<Vexatos> reminds me that I haven't eaten in 21 or so
<FromGitter> <j8r> Days?
<Vexatos> I wonder.
<FromGitter> <girng> rofl
<FromGitter> <vladfaust> *when you're a Crystaller :)
<FromGitter> <vladfaust> No hirers = no meal
<Vexatos> *when you're a crystal :)
<FromGitter> <girng> not eating in 21 days.. not sure if possible to type on internet with wrists anymore :D
<FromGitter> <girng> might be dead
<Vexatos> as long as you take your vitamin supplements
<FromGitter> <girng> 😆
<FromGitter> <j8r> @vladfaust there can be a option to hire people for nothing. Example: a beginner search a project to work, another people search someone to work on
<FromGitter> <markrjr> @straight-shoota @RX14 I posted a bit up about how to cross compile parts of the standard library for Windows, any insights on this?
<FromGitter> <vladfaust> @j8r of course. Gonna add an ability to post job postings both for e-mail-registered companies and github devs
Heaven31415 has quit [Quit: Leaving]
<FromGitter> <Sija> @Vexatos snow vitamins? :P
<FromGitter> <j8r> Niiice.:D
<FromGitter> <girng> crystal infused vitamins with shards
<FromGitter> <vladfaust> Hey @j8r, where is your blog? https://blog.jrei.ch/
<FromGitter> <j8r> Hum yeah not available, need to finish the migration to Hugo 🙄
<FromGitter> <j8r> I was using Ghost, but don't want to have a dynamic blog in NodeJS anymore on my ARM board
<FromGitter> <vladfaust> There are blog platforms on *Crystal* afaik
<FromGitter> <j8r> A static one? Not really
<FromGitter> <vladfaust> An idea for a project
<FromGitter> <j8r> 💯
<FromGitter> <j8r> Hugo is good by the way :)
<FromGitter> <vladfaust> I believe you. However I'm not about Go
<FromGitter> <sam0x17> if I am linking with an external C library, and there is a struct I need to define in crystal for use with one of the functions in the library, and one of the fields is a pointer to an instance of another (super complicated) struct in said library, can I use a void pointer (will that have the same memory layout?) and if so, how do I do that?
<FromGitter> <j8r> Do you now you can generated bindings automatically? @sam0x17
<FromGitter> <sam0x17> so I have ⏎ ⏎ ```struct SomeStruct ⏎ something : AnotherStruct* ⏎ end``` ⏎ ⏎ and I'm wondering if I can avoid having to define AnotherStruct [https://gitter.im/crystal-lang/crystal?at=5ba940e82d1198709341ea6d]
<FromGitter> <sam0x17> WHATTTT???
<FromGitter> <sam0x17> lol
<FromGitter> <sam0x17> how do I do this black magic
<FromGitter> <markrjr> Ooh, I'm having a similar project.
<FromGitter> <j8r> You have the .h file?
<FromGitter> <sam0x17> yes
<FromGitter> <sam0x17> well a number of them this is openssl
<FromGitter> <sam0x17> no one bothered to make bindings for the AES routines as far as I can tell
<FromGitter> <j8r> Try either https://github.com/crystal-lang/crystal_lib
<FromGitter> <sam0x17> ok thanks
<FromGitter> <j8r> The real proble isn't making bindings, that's the wrappers
<FromGitter> <j8r> That uses this functions and structs
JesseH has quit [Quit: Leaving]
<FromGitter> <sam0x17> hmm I'm getting `Unhandled exception: can't find function EVP_CIPHER_CTX_init (Exception)` with crystal_lib
<FromGitter> <sam0x17> my lib looks like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ba944af98245f4ae07a0760]
<FromGitter> <sam0x17> aha!
<FromGitter> <sam0x17> that thing is in fact a macro ugg
<FromGitter> <kingsleyh> how do I format a datetime string when I have only a string to start with that looks like this: "2018-09-24T16:18:13.722494Z"
<FromGitter> <kingsleyh> I keep getting an error when trying to format it
<FromGitter> <kingsleyh> ```Time::Format.new("2018-09-24T16:18:13.722494Z").parse("%Y-%m-%d %H:%M:%S %z")```
<FromGitter> <kingsleyh> oh maybe I got the content the wrong way around
<FromGitter> <kingsleyh> nope not working either
<FromGitter> <kingsleyh> ```Time::Format.new("%Y-%m-%d %H:%M:%S %z").parse("2018-09-24T16:18:13.722494Z")```
<FromGitter> <kingsleyh> I guess Crystal doesn't know what to do with that String time format - it's a fairly standard iso format though - so I'm surprised the Time library doesn't understand it
<FromGitter> <sam0x17> that's also standard for rails
<FromGitter> <kingsleyh> looks like Time.parse only works with this kind of string
<FromGitter> <kingsleyh> ```Time.parse("2015-10-12 10:30:00 +00:00", "%Y-%m-%d %H:%M:%S %z")```
<FromGitter> <kingsleyh> ah I figured it out - it's a big long winded but it works
<FromGitter> <kingsleyh> ```code paste, see link```
<FromGitter> <codenoid> @vladfaust stuck in loading after "sign in" with github
<FromGitter> <codenoid> btw, is crystal have pug-like template engine ?
<FromGitter> <vladfaust> @codenoid got no erorr in logs, can sign in myself. Try again?
<FromGitter> <drum445> @Sija indeed, but he was closer then Orwell with his predictions of our current dystopia
<FromGitter> <codenoid> ok
<FromGitter> <codenoid> i got new error
<FromGitter> <Sija> @drum445 fair ‘nuff, I’d say that our current day dystopia combines these two, kind of stick and carrot approach - if you can’t buy ‘em, scare ‘em
<FromGitter> <Sija> and ofc all of that in the sauce of hegelian dialectics - fascism vs communism = captialism being one of the most obvious ones from 20th century. all three are controlled so whole game is rigged from the beginning, but such mechanism are giving some sort of feeling of “freedom” to choose, so many fall for it I guess
tomte has quit [Ping timeout: 252 seconds]
<FromGitter> <vladfaust> @codenoid any additional info?
DTZUZO_ has quit [Ping timeout: 252 seconds]
non-aristotelian has joined #crystal-lang
<non-aristotelian> Hello everybody.
justinmcp_ has joined #crystal-lang
dostoyev1ky has joined #crystal-lang
justinmcp has quit [*.net *.split]
robacarp has quit [*.net *.split]
salvor has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
robacarp has joined #crystal-lang
dostoyev1ky is now known as dostoyevsky
scott_tams has joined #crystal-lang
<FromGitter> <girng> Hello