Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:17
    straight-shoota milestoned #11475
  • 15:06
    straight-shoota review_requested #11475
  • 15:04
    straight-shoota synchronize #11475
  • 15:03
    straight-shoota synchronize #11475
  • 14:01
    straight-shoota closed #11523
  • 13:35
    straight-shoota demilestoned #11515
  • 13:24
    beta-ziliani unlabeled #11529
  • 13:21
    beta-ziliani demilestoned #11454
  • 13:21
    beta-ziliani demilestoned #11513
  • 13:02
    straight-shoota labeled #11431
  • 13:02
    straight-shoota labeled #11431
  • 13:02
    straight-shoota labeled #11431
  • 13:00
    straight-shoota labeled #11349
  • 13:00
    straight-shoota labeled #11349
  • 12:59
    straight-shoota labeled #11321
  • 12:59
    straight-shoota labeled #11321
  • 12:14
    straight-shoota labeled #11548
  • 12:14
    straight-shoota opened #11548
  • 12:14
    straight-shoota labeled #11548
  • 11:16
    straight-shoota closed #11536
oprypin
@oprypin:matrix.org
[m]
@didactic-drunk: well it looks like you're already miles ahead of the rest in terms of thinking this through. I'd support this
From IRC (bridge bot)
@FromIRC
<yxhuvud> i could see platform dependent dependencies too.
Giorgi Kavrelishvili
@grkek
I am a bit inactive here sorry guys
How have you all been?
Kaia Leahy
@tenebrousedge
this "life" thing is pretty weird, imo
Giorgi Kavrelishvili
@grkek
What life thing?
Kaia Leahy
@tenebrousedge
all of it, but particularly the bits that concern me
so if I fail to get a dev role, but the CEO wants me to interview for a data engineer role because they "think I can pick it up quickly", how should I prepare for an interview for that?
j8r
@jrei:matrix.org
[m]
for a internal promotion? Or CEO suppose you'll interview someone for free?
Kaia Leahy
@tenebrousedge
neither? I think you misread
From IRC (bridge bot)
@FromIRC
<yxhuvud> i have never in my life prepared for an interview except for a quick browse of the company web pages. shrug
j8r
@jrei:matrix.org
[m]
I didn't understood then
Giorgi Kavrelishvili
@grkek
Life doesn't really matter, be good to everyone and do what you like to do and just pass away in peace
Thats all of it
Other things are useless distractions which were forced upon you for torture
@yxhuvud Same!
j8r
@jrei:matrix.org
[m]
by preparing, you also mean some exercises they want you to do before the interview?
Giorgi Kavrelishvili
@grkek
Nah, just an interview
If they plan on doing some exercises I just say
Kaia Leahy
@tenebrousedge
I mean I have only a loose idea of what a "data engineer" does, and don't know what I'm going to be expected to know
Giorgi Kavrelishvili
@grkek
Send it over the E-Mail and Ill send it over to you once done
j8r
@jrei:matrix.org
[m]
Pretty sure they have an even looser idea of why they want a "data engineer"
the solution can just be to have a precise job sheet
From IRC (bridge bot)
@FromIRC
<yxhuvud> jrei: no, if they want me to solve a reasonably sized problem that is fine. that is different
didactic-drunk
@didactic-drunk

@oprypin:matrix.org I have a few shards (example) that run on limited platforms. Some are POSIX only. One is OpenBSD only. Future ones may be window only. What say you of 2 additional options for shard.yaml?

A platform flag. If it matches the shard is included. If not the shard is automatically pruned.

# For mmap
  platforms: 
  - !windows
  - posix (or)

# For mostly posix shards
  platforms: 
  - !macos
  - posix

A 2nd platform flag with identical semantics should be available for dependencies

  dependencies:
    generic-file-polling.cr:
      platforms:
      - !linux
    inotify.cr:
      platforms:
      - linux

Why both? These options aren't mutually exclusive.

Sometimes the shard author knows it won't work on specific platforms and they can specify them.

Other times the author may choose a more specific solution and wish to exclude a generic shard (see inotify example above). Or they could be working on an newer/older system where a shard specified dependency doesn't work in their particular situation.

oprypin
@oprypin:matrix.org
[m]
@didactic-drunk: it's funny that you're against specifying crystal <2.0 but for specifying unsupported platforms. i guess the difference is that in most cases the author does actually know it won't work on those platforms. however, consider a large number of shards that exist now, -- how often would people be tempted to specify "nope doesnt work on Windows" and then eventually that specification will be the only actual reason why it doesn't work on Windows
didactic-drunk
@didactic-drunk
@oprypin:matrix.org I'd be against specifying !any_platform_unless_the_api_is_broken_or_doesn't_exist
oprypin
@oprypin:matrix.org
[m]
uh sorry I didn't understand that. there are like 4 negations there
didactic-drunk
@didactic-drunk
@oprypin:matrix.org Here's what I have planned (yes a real example). 1) Create mmap (done) which can be used for anonymous memory or mapping a file or a few other uses with platform: posix. Create a windows anonymous memory shard (No mmap equivalent that handles all functions) with platform: windows. Create a generic anon memory wrapper shard that includes both. Create a guard page key holding shard similar to sodium_malloc using the anon memory shard.
oprypin
@oprypin:matrix.org
[m]
well the first three could be just one shard. but that's only for your particular example
there are very many missing features but it seems that for most of the parts of the specification you can't just go adding features onto the existing spec, perhaps a greater overall look at the design would be better
didactic-drunk
@didactic-drunk
I'm against < crystal 2 because it's a guess, probably false and breaks applications for no apparent reason when 2.0.0 is released or forces them to upgrade which may involve API changes or other unpleasantries
oprypin
@oprypin:matrix.org
[m]
I am not convinced of any particular approach at the moment and sorry I won't dive into that topic
I just felt that the postinstall thing in particular would be not controversial
didactic-drunk
@didactic-drunk
The platform flag would be limited use. See the inotify example. Btw this is also based on a real example from ruby gems.
didactic-drunk
@didactic-drunk
While I could make one shard I'd prefer not to. I don't want to maintain the windows version. I may make a windows version if no one else does. Also, platform specific features are sometimes needed (mmap in particular). The anon memory wrapper and guard pages need simple functionality that both platforms support. If I were doing something else with mmap like mapping a file, I can't do that on windows as it uses a completely different API
Which I don't intend to wrap
didactic-drunk
@didactic-drunk
@oprypin:matrix.org Shortened answer. platform as a restriction wouldn't be used with pure portable crystal shards, only platform specific shards. platform as a dependency may be specified to override. See the inotify example. Generic file polling may work everywhere but on linux you may prefer inotify. On BSD eventually kqueue. Although technically those should have their own platform limitations so the dependency limit should only be placed on generic file polling.
I guess that wasn't a shortened answer
ryanprior
@ryanprior:matrix.org
[m]
I'm having trouble casting a type to a more permissive type. For example, suppose I define my type as:
alias PermissiveType = Array(String | Int32) | String
s : PermissiveType = "hello world" #works
ss : PermissiveType = ["hello", "world"] # must be (Array(Int32 | String) | String), not Array(String)
It seems like since PermissiveType is strictly more permissive than Array(String) this cast should be possible - any possible value of that more restrictive type should satisfy the more permissive type.
How do I accomplish that?
Kirk Haines
@wyhaines

@ryanprior:matrix.org What you are running into is that while one can logically look at an Array(String) and see that an Array(String | Int32) can store everything in it, type specifications are very specific, and your type specification is for two things, either an Array(String | Int32), or String, and what you are trying to assign is an Array(String), which is not either of those things.

ss : PermissiveType = Array(String | Int32).new + ["hello", "world"]

That will create an array with a type signature that matches what PermissiveType allows.

Ali Naqvi
@naqvis
^ or provide the type of literal
ss : PermissiveType = ["hello", "world"] of String | Int32
if yo don't provide the type, compiler will infer that as Array(String)
Kirk Haines
@wyhaines
Thanks. My daughter interrupted me to move the van, and you finished for me. :)
Ali Naqvi
@naqvis
:P
Kirk Haines
@wyhaines
@ryanprior:matrix.org are you the current maintainer of crystal-readline? I have a private fork of it that I have been forced to maintain because the mainline lacks proper Crystal 1.0+ support. If I provide a PR, can we get the mainline project updated and a new release built?
ryanprior
@ryanprior:matrix.org
[m]
I'm not the maintainer but that would be useful for me too
Kirk Haines
@wyhaines
OK. I saw a commit from you on the main repo, so I was wondering.