<havenwood>
I have a friend who's obsessed wiith OCaml
<Intelo>
havenwood: why not python in list?
<havenwood>
¯\_(ツ)_/¯
<Intelo>
havenwood: what to learn first, python or ruby?
drincruz has joined #ruby
<Intelo>
havenwood: will you choose ruby over clojure or elixir or contrary
<Intelo>
general purpose or web^
<havenwood>
Intelo: I used to use Python for Twsted, but now I'd prefer Elixir for that role.
<havenwood>
Intelo: Python has great graphics bindings.
<Intelo>
hm
<Intelo>
havenwood: could you rank python, ruby, elixir, clojure
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand_ is now known as roshanavand
<Intelo>
havenwood: I mean why choose one
<havenwood>
Intelo: For a web project, I'd say Elixir, Ruby, Clojure, Python would be my go-to order. Ruby would jump ahead of Elixir for me for a smaller project, especially where I can use Roda. It's really actually quite hard to say with "web" being the only constraint.
<Intelo>
oh
<Intelo>
havenwood: 'go to order'?
<havenwood>
Intelo: What I'd likely use.
<leftylink>
yes, because even if Ruby is your go-to language, C is your goto language
<havenwood>
Intelo: In the abstract, pretending there weren't officially supported languages at my work. :P
<Intelo>
havenwood: 'jump ahead of elixir' means ruby is better than elixir in small projects
<havenwood>
leftylink: Just compile Ruby with GOTO support. ;)
<havenwood>
Intelo: Not necessarily better, but in my comfort zone given the exact tools I'm familiar with.
<havenwood>
__label__(:whee)
<havenwood>
__goto__(:whee)
<Intelo>
My English is not native. I will try to re iterate: Your first choice is elixir, then ruby, then clojure. Python will be your favorite of all?
<leftylink>
I see a daring soul has also made a COMEFROM implementation for Ruby.
<havenwood>
Intelo: Elixir is a great choice for web generally. Use Elixir. Then again, this is #ruby channel, so just use Ruby.
skape has quit [Quit: Connection closed for inactivity]
<havenwood>
Intelo: Either is great. Don't look back.
adu has quit [Quit: adu]
<havenwood>
Intelo: Choosing Ruby or Elixir for a web project gives you some amazing frameworks with incredibly flexible languages.
<Intelo>
flexible like javascript with no type saftey?
<Intelo>
or something else?
<havenwood>
Intelo: Like macros (Elixir) and metaprogramming (Ruby) so you can change the language from within.
<Intelo>
oh...
<havenwood>
Intelo: One of Jose Valim's big challenges was introducing Ruby-like flexibility with Elixir, and I believe Phoenix show how much he succeeded.
<Intelo>
so Elixir and ruby are similar? and one can change the language?
<Intelo>
havenwood: what did you said about python above? the go to thing and the rank you have for python (ignoring the UI )
<havenwood>
Intelo: I don't use Python these days. It's fine.
<havenwood>
Intelo: I'm not a Python fan. When I use it it's to get at libraries.
<havenwood>
Intelo: Someone else here might have more kind words for Python.
<Intelo>
havenwood: thers no 'change' language from within thing for python?
<Intelo>
havenwood: ok, why language to go for first? python, ruby or elixir?
brunosaboia_ has quit [Quit: Leaving]
<leftylink>
ah yes... I remember when I was going to interview at a company, and they asked me what language I would want to use, and then when I gave my answer, they said "oh that is not one of the languages we support" and I thought (but didn't say out loug) "well jeez, are you actively trying to make me unhappy or what?"
<havenwood>
Intelo: I think most Pythonistas would think Rubyists and Alchemists have lost their minds when they consider Rails and Phoenix codebases. I like them. There are various philosophies.
<leftylink>
but you know, I get it. they want to know if someone can be productive in their environment, fine
<leftylink>
s/want to use/want to use for the interview/
<havenwood>
Intelo: I've suggested starting with Elixir. I find it easier to teach than Ruby.
<Intelo>
havenwood: noted. Which of the three will live more in later years you think?
<havenwood>
Intelo: All three should have long lives.
<Intelo>
I guess I would prefer ruby over python if ruby had more job oppertunities (thats one factor we did not discussed yet)
<havenwood>
Intelo: Python and Ruby have pretty wild popularity. Elixir is younger, but looking good.
<havenwood>
Intelo: I see jobs in all three languages. It seems somewhat regional. Unsure.
<Intelo>
havenwood: ruby is very very regional..
<havenwood>
Intelo: Many companies have you interview in any language of your choosing, and are quite happy to teach you whatever language they use if you don't already know it.
jas-at-re has quit [Remote host closed the connection]
<havenwood>
Intelo: I'd focus on proficiency.
<Intelo>
havenwood: python is much much more and more spreaded out
<havenwood>
Intelo: With bigger companies the language used may vary by team. There are often many choices when starting a project.
<havenwood>
Intelo: Just learn a language well enough to be fluent. Any you've mentioned are great.
<havenwood>
Ruby is a neat choice since it's so multiparadigm.
<havenwood>
You get OO, functional, lispy, you name it - Ruby probably has it.
<havenwood>
And a friendly community can count for a lot while you level up.
<Intelo>
havenwood: So ruby, then py will be easy? If Py then ruby, it will be difficult for later language to grasp?
<Intelo>
ok
<havenwood>
Intelo: I think learning Ruby or Python will make the other easier to grasp.
<havenwood>
Intelo: I'd not worry about it too much.
<havenwood>
Intelo: Want to make an API or app first?
<leftylink>
that is a little concerning. I had not considered whether there is any pair of languages where learning A then B would have a different end result than learning B before A
<leftylink>
I'm not sure what would hvae to happen for that to be true
<leftylink>
I suppose the lens of one language would have to significantly colour one's worldview for that to be true
<Intelo>
havenwood: app. something that public can use and get benefit from
<Intelo>
havenwood: even something I can sell :)
<Intelo>
havenwood: or make it opoensource
<havenwood>
leftylink: It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. - Dijkstra
<Intelo>
havenwood: smallest think/ easy / fast to make
<Intelo>
havenwood: So i practice on something meaningful
<leftylink>
ahhhhhh, yes that quote about BASIC must hvae been what I was thinking of!
<havenwood>
Intelo: Aggregate some COVID-19 data into a unified API.
<Intelo>
havenwood: already made
<havenwood>
Intelo: For example, there're disparate sources of data that individual U.S. states release that nobody has actually unified AFAIK.
<leftylink>
if I want to make something useful, I think of a problem I am having, and what would be needed to solve it. For if I am divorced from the problem I am solving, I will never be able to understand the complaints and feedbacks of my users.
<havenwood>
Intelo: That ^ data is per county, but some states release per zipcode.
<havenwood>
Intelo: If you went and found sources for zipcodes and released an API it'd be the only one that I'm aware of at least.
<Intelo>
havenwood: how about making an app that gives text description of an image when provided
<havenwood>
Intelo: AI tends to be using libraries, which are often written in C for speed. Are you doing AI?
<Intelo>
havenwood: I want to do AI
<havenwood>
Intelo: Any of these three dynamic languages have bindings to C libraries.
<havenwood>
Intelo: A lot of data science folk do like Python.
<Intelo>
hm ok
<havenwood>
Intelo: Write your own neural net to read numbers given a black and white PNG image with 100x100 resolution.
<havenwood>
Intelo: If you want to *use* an AI library, pick which one before proceeding.
<leftylink>
as you may remember, the original githut only had data through 2014, https://githut.info/ - which is why it was a great boon when https://madnight.github.io/githut/ finally came about to provide data from 2014-2020
<havenwood>
Intelo: (You can write your own neural net to get starting in any of the above.)
<Intelo>
don't have any idea of libs. Do I need libs or can do all by my own? also the libs are in C, so I can use any language on top of it?
<Intelo>
I wonder why AI folks use python mostly
<havenwood>
Intelo: Just "AI" is not enough for me to go on. I dunno.
<havenwood>
Intelo: Learn C.
<havenwood>
Intelo: Or Rust.
<Intelo>
I wonder why AI guys do PY and not C
<havenwood>
Intelo: They do Python in school.
<havenwood>
Intelo: Most folk don't actually write the libraries, they use them.
jottr has joined #ruby
<havenwood>
Intelo: It's the difference between making a Rails app and contributing to Rails.
<seydar>
the first parenthetical grouping is captured greedily, and then the rest are lazily done
<seydar>
anyone have any insight as to why this is happening?
<seydar>
I recognize that I can just do [^)]+ and my problem goes away, but that doesn't enhance my understanding
<go|dfish>
seydar: they're all greedy
<go|dfish>
.+? would be "non-greedy" or [^)]+ as you've already said
EdwardIII has joined #ruby
<seydar>
go|dfish: how would you best describe what I'm seeing then? why isn't scan finding all of the parenthetical groupings?
cd has quit [Quit: cd]
<go|dfish>
seydar: because you're using .+ which is "greedy"
<go|dfish>
perhaps it's confusing because you have \n in your data - so you get 2 matches. if there were no \n chars you'd just get a single result (because . doesn't match \n by default)
<seydar>
ya know, maybe i'm misunderstanding what "greedy" means. i thought it meant that it would grab the first option it could, as opposed to getting as many characters as possible
<seydar>
that's prolly the problem
<go|dfish>
yeah, that's the opposite
<seydar>
go|dfish: yep. changed it to lazy (.+?) and the problem went away
<seydar>
glad we figured out where the problem was -- thanks!
squ1nt has quit [Remote host closed the connection]
chamunks has quit [Quit: Don't worry I'm not gone yet.]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
EdwardIII: PS Commented on your gist.
krma has quit [Remote host closed the connection]
<EdwardIII>
havenwood: hmm ok, thanks!
<havenwood>
EdwardIII: I suspect you're just dealing with billions of colors. :) Maybe `color` has a method to downscale. Unsure.
<havenwood>
Err, trillions?
<havenwood>
281 trillion is a lot of colors.
<havenwood>
That number makes me nervous. Too many.
<havenwood>
That's just an unnerving number synesthetically too.
<EdwardIII>
havenwood: i think it's something to do with colour profiles. i see this image has an sRGB colour profile. and the `color` gemh as a method to convert between srgb, and rgb, so i'll start there
<havenwood>
EdwardIII: Good luck!
<EdwardIII>
appreciate it, thanks for the pointers!
<havenwood>
you're welcome, any time
breakfastcat has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 256 seconds]
FetidToot has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.9]
dfucci has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
Tempesta has quit [Ping timeout: 256 seconds]
impermanence has joined #ruby
breakfastcat has joined #ruby
xco has joined #ruby
imode has joined #ruby
mnathani has joined #ruby
ur5us has joined #ruby
mnathani_ has quit [Ping timeout: 264 seconds]
vondruch has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
davispuh has quit [Ping timeout: 256 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has joined #ruby
coniptor has joined #ruby
Nowaker has quit [Remote host closed the connection]
Nowaker has joined #ruby
wymillerlinux has joined #ruby
jetchisel has joined #ruby
dnadev2 has joined #ruby
ellcs has quit [Ping timeout: 244 seconds]
<dnadev2>
i have a worker that recieves some values when being called, i'm curious of the best way to deal with the values when it comes to calling other methods in the worker - i outlined my question here: https://dpaste.org/kr3s
mika_ has quit [Quit: Leaving]
oddp has quit [Ping timeout: 264 seconds]
troulouliou_div2 has quit [Quit: Leaving]
cloaked1 has joined #ruby
cloaked1 is now known as Guest33353
Guest33353 has quit [Changing host]
Guest33353 has joined #ruby
<apotheon>
s/curious of/curious about/
Guest33353 has quit [Client Quit]
jimconn has joined #ruby
jimconn has quit [Changing host]
jimconn has joined #ruby
jimconn has quit [Client Quit]
jimconn has joined #ruby
jimconn has quit [Client Quit]
jimconn has joined #ruby
<pgib>
s/sed/awk/
jimconn has quit [Changing host]
jimconn has joined #ruby
jimconn is now known as cloaked1
alexherbo2 has quit [Ping timeout: 240 seconds]
CrazyEddy has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
schne1der has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axsuul has quit [Ping timeout: 256 seconds]
<havenwood>
s/awk/rg
<havenwood>
Oops, omitted trailing slash. :O
* havenwood
spins up a fresh VM
axsuul has joined #ruby
mangoicedtea has joined #ruby
crowley has quit [Read error: Connection reset by peer]
mnathani has quit []
drincruz has quit [Ping timeout: 256 seconds]
jmcgnh has quit [Read error: Connection reset by peer]
<Eiam>
dnadev2: why don't you have an object (struct or w/e) that defines whats inside instead of just an ever growing list of argv ?
<Eiam>
as long as your callers conform to the type you can support how to eat it?
<Eiam>
all these options after the cake look like perhaps different ways your cake is being consumed, maybe each should be its own method? not sure... I don't like methods that totally change what they do based on some flag that gets passed in
<Eiam>
its surprising
<Eiam>
you've activated my trap flag! this method no longer eats cake! instead it now donates cake for others to eat! sucker!
dualfade has quit [Ping timeout: 256 seconds]
dualfade has joined #ruby
<pgib>
The cake is a lie
<pgib>
erhmer-fricken-gerd. I'm trying to upgrade an ancient app. Had to move from phantomjs to something else (chrome). And EVERYTHING times out, no logs, no screenshots, nothing. How in the crap am I supposed to debug this?
<pgib>
uh, no context, this is testing in Rspec w/ Watir
<leftylink>
hmm, I could have sworn there was something that lets me omit the trailing slash, but it's not sed...
<leftylink>
ah, in my editor I can omit it. that's why I get confused
<go|dfish>
vi
<leftylink>
this will surely cause me no end of confusion in the future as I forget which things let me omit andwhich don't
DaRock has joined #ruby
<pgib>
you don't even need to use slash in most grammars