3 ms·
Hmm, a bit of a rough experience. I had a few lines of python code, to count the fraction of A:s and C:s in a DNA (fasta) file adapted from [1]: with open
by samuell 3y ago
Hmm, a bit of a rough experience.
I had a few lines of python code, to count the fraction of A:s and C:s in a DNA (fasta) file adapted from [1]:
with open("chry_multiplied.fa") as infile:
a: int = 0
t: int = 0
g: int = 0
c: int = 0
for line in infile:
if line[0] != '>' and len(line) != line.count("N") + 1:
g += line.count("G")
c += line.count("C")
a += line.count("A")
t += line.count("T")
total_base_count = a + t + c + g
gc_count = g + c
gc_fraction = float(gc_count) / total_base_count
print( gc_fraction * 100 )
Result:
$ mojo run gc.mojo
gc.mojo:1:6: error: use of unknown declaration 'open'
with open("chry_multiplied.fa") as infile:
...
"open" must be one of the most used Python functions ... :/
[1] https://github.com/samuell/gccontent-benchmark https://github.com/samuell/gccontent-benchmark
- samuell 3y agoOk, well, found some disclaimers in the docs now: https://docs.modular.com/mojo/manual/basics/#python-integration https://docs.modular.com/mojo/manual/basics/#python-integrat... https://docs.modular.com/mojo/roadmap.html https://docs.modular.com/mojo/roadmap.html
- mathisfun123 3y agoman two days ago when i said their promise of compatibility with python was startup hype i got no traction. like duh they'll over-promise and underdeliver - it's chapter 1 of every single SV playbook.
- qaq 3y agoHave you looked at the team? This is pretty early in the development
- mathisfun123 3y ago> Have you looked at the team? i am friends/former co-workers with several people on the "team". doesn't mean i can't/won't/shouldn't call out startup hype when i see it. and again: the criticism has been borne out because this comment chain is off an example of an epic fail. > This is pretty early in the development you don't applaud someone that says they're going to do something just because they're fancy. like is this even up for debate? at such later date and time where they deliver i will be first in line to congratulate them (maybe even as a user) but not until then.
- qaq 3y agoI don't see hype they outlined a roadmap and are working on it. Not sure what fancy means in this context. Swift Objective-C story is pretty much inline with this work. Come to think of it I don't really remember Chris not delivering on a project. If fancy means people who created and delivered on multiple very challenging projects I guess they are fancy.
- mathisfun123 3y agowhy do people do this? > I don't see hype they outlined a roadmap and are working on it. they have been touting superset compatibility very loudly and then quietly writing conservative docs and roadmaps. you really don't see that or are you just bending over backwards to give them the benefit of the doubt? > Not sure what fancy means in this context you don't? then what exactly are you implying/suggesting here: > Have you looked at the team? moving on; > Come to think of it I don't really remember Chris not delivering on a project. already in my memory/experience (which is only a couple of years in this area): swift4TF and chisel (or FIRRTL or whatever). you can deflect and blame org charts or whatever but if you're gonna make the rounds on the talkshow/podcast circuit and take credit on the upside you gotta eat the blame on the downside. i'm sure chris lattner is a great, smart, genius person. i'm sure everyone at modular is. i'm sure 100MM is a whole lot of runway to deliver. but they haven't delivered yet so their claims about being a superset and/or 35,000,000xxxxx perf gains are all (at least by me) taken with a grain of salt.
- qaq 3y agoI def give them benefit of the doubt. Swift4TF totally outside of what I do so no clue to what extent it was delivered. Maybe I am just too fond of the idea of having Rust features with Python like syntax and not paying enough attention to the fully compatible part as it's not something I personally care about.
- mathisfun123 3y ago> Swift4TF totally outside of what I do so no clue to what extent it was delivered. it wasn't https://forums.fast.ai/t/where-is-the-future-of-fastai-swift4tf-is-died/94201 https://forums.fast.ai/t/where-is-the-future-of-fastai-swift... > not paying enough attention to the fully compatible part as it's not something I personally care about then maybe you shouldn't be bullying me into agreeing with you? dontcha think?