Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Shaggar
Apr 26, 2006
tfw you get a new feature request that's stupid and you think its gonna be a pain in the rear end but upon looking at your code you realize you planned for it

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!

necrotic posted:

after a little playing with elm im starting to get the hang of things. one thing is really bothering me, however: the debugger does not work with StartApp.start, only StartApp.Simple.start. the randomGif sample in the arch repo shows the issue https://github.com/evancz/elm-architecture-tutorial/tree/master/examples/5 (debug mode fails with some forEach error)

my app will have a whole bunch of effects, and this makes it impossible to debug poo poo.

how the hell can i debug an app with effects?

turns out ports break the debugger until a fix from nov is merged and released

Soricidus
Oct 21, 2010
freedom-hating statist shill

~Coxy posted:

my favourite is being able to use lambdas in the Immediate window

now I wonder whether you can use one in a conditional breakpoint

wish eclipse could do this :(

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

necrotic posted:

after a little playing with elm im starting to get the hang of things. one thing is really bothering me, however: the debugger does not work with StartApp.start, only StartApp.Simple.start. the randomGif sample in the arch repo shows the issue https://github.com/evancz/elm-architecture-tutorial/tree/master/examples/5 (debug mode fails with some forEach error)

my app will have a whole bunch of effects, and this makes it impossible to debug poo poo.

how the hell can i debug an app with effects?

um yeah this currently sucks. theres people working on improving it a lot and i guess it will be fixed in 0.17, which should be here in march/april.

speaking of that though, there's a guy right now working on elm reactor to get the following behavior:
1. it works with ports and effects and stuff, of course
2. it saves all events that happen
3. events are exportable and importable from within elm reactor, which means that
4. someone could be testing your app, find a bug, and then they literally send you the event file which is guaranteed to reproduce the issue exactly as they saw it
5. which will own, own, own

necrotic
Aug 2, 2005
I owe my brother big time for this!

fart simpson posted:

um yeah this currently sucks. theres people working on improving it a lot and i guess it will be fixed in 0.17, which should be here in march/april.

speaking of that though, there's a guy right now working on elm reactor to get the following behavior:
1. it works with ports and effects and stuff, of course
2. it saves all events that happen
3. events are exportable and importable from within elm reactor, which means that
4. someone could be testing your app, find a bug, and then they literally send you the event file which is guaranteed to reproduce the issue exactly as they saw it
5. which will own, own, own

is there a place i can see this yet? a branch, or pr?

i think my biggest gripe right now is that a fix for ports and the debugger has been available since _november_ and its still not released. bug fixes are a thing, yall.

overall though i am enjoying my first dive into the language. people in slack have been very helpful and responsive. theres just some organizational things that could be either better or easier to access.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

necrotic posted:

is there a place i can see this yet? a branch, or pr?

i think my biggest gripe right now is that a fix for ports and the debugger has been available since _november_ and its still not released. bug fixes are a thing, yall.

overall though i am enjoying my first dive into the language. people in slack have been very helpful and responsive. theres just some organizational things that could be either better or easier to access.

i havent seen it yet, i just heard it on a podcast with one of the guys that works at the same company as evan (the creator of elm). he said someone at their company is working on this right now.

but yeah i agree with you there. right now evan personally curates everything and he's too busy to keep up. useful prs go unmerged for too long at the moment. like here's one of my prs to get the automated tests working again on the core libraries: https://github.com/elm-lang/core/pull/447 until that gets merged the core package doesn't have any tests...

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

im expecting that organizational part of it to get better though. evan recently switched companies and the new company is heavily involved & invested in elm as a language and growing it. they announced that there would be some organizational changes to address some of this stuff but no details yet

suffix
Jul 27, 2013

Wheeee!

abraham linksys posted:

ugh at my current gig we have a monorepo because the overhead of maintaining a bunch of different repos was annoying, but now we have a new problem where our CI system is super naive and just runs all the tests any time someone pushes

this seems like it should be an easily solvable problem but it turns out basically all CI systems are terrible and make this really hard to do without a bunch of custom infrastructure

in retrospect maybe having to merge 4 different PRs for every feature wasn't so bad...

i know we have jenkins triggering builds based on the exact files that changed so i'm pretty sure it can do this

i'm not a jenkins guy though so who knows how

necrotic
Aug 2, 2005
I owe my brother big time for this!

fart simpson posted:

im expecting that organizational part of it to get better though. evan recently switched companies and the new company is heavily involved & invested in elm as a language and growing it. they announced that there would be some organizational changes to address some of this stuff but no details yet

yup, NoRedInk right? there seems to be some communal effort towards improving things, but its always slow to start. things like elm-tutorial.org are a good start

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

necrotic posted:

yup, NoRedInk right? there seems to be some communal effort towards improving things, but its always slow to start. things like elm-tutorial.org are a good start

yeah, noredink. oh also you should use sublime text with the elm plugin because thats my plugin and i need to see my users count go up :twisted:

VikingofRock
Aug 24, 2008




fart simpson posted:

im expecting that organizational part of it to get better though. evan recently switched companies and the new company is heavily involved & invested in elm as a language and growing it. they announced that there would be some organizational changes to address some of this stuff but no details yet

This is awesome news, and I'm pretty excited for the future of elm

necrotic
Aug 2, 2005
I owe my brother big time for this!

fart simpson posted:

yeah, noredink. oh also you should use sublime text with the elm plugin because thats my plugin and i need to see my users count go up :twisted:

nah im one of those idiots who cant stop using vim

Notorious b.s.d.
Jan 25, 2003

by Reene

abraham linksys posted:

ugh at my current gig we have a monorepo because the overhead of maintaining a bunch of different repos was annoying, but now we have a new problem where our CI system is super naive and just runs all the tests any time someone pushes

this seems like it should be an easily solvable problem but it turns out basically all CI systems are terrible and make this really hard to do without a bunch of custom infrastructure

in retrospect maybe having to merge 4 different PRs for every feature wasn't so bad...

monorepos are a disastrous anti-pattern with open source tools

  • git doesn't do well with large repos. (the big companies using monorepos are using p4.)

  • jenkins' git plugin isn't designed to deal with this, because git doesn't expect users to keep monorepos. (the big companies with monorepos have proprietary CI, entire teams to write weird stuff for p4)

  • git tagging becomes a disaster because your namespace is polluted -- thing-v1.0, other-thing-v1.1. (this additionally complicates your work with jenkins.)

it doesn't pay to blindly ape facebook and google. they have huge profits and huge teams to manage proprietary tooling and infrastructure. you don't.

don't try to build a weak-sauce google out of open source bits intended for entirely different scenarios

Notorious b.s.d.
Jan 25, 2003

by Reene
"it hurts when i hit myself with a hammer. it must be that hammer designs are super naive"

-- abraham linksys

abraham linksys
Sep 6, 2010

:darksouls:
we didn't blindly ape other companies we just got sick of the overhead of keeping different repos in sync and using the same internal dependencies/libraries

we have a bunch of services sharing a bunch of common code, plus things like frontends that need to stay in sync with backend APIs, etc. monorepos made more sense than submodule hell and making and syncing 3 different PRs to change our DAL code, API endpoints, and frontend for each feature

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
A monorepo makes some degree of sense in any environment where you control all the code, depending on how much code-reuse and integration you have between projects.

Unfortunately, it's a bit infeasible to run a dozen open-source projects as a single repository (and even if you did, you wouldn't even see any of the benefits), which then leads it to being a second-class use case at best in open-source tooling. So you typically have to put work and/or money in to the tooling yourself in order to make it actually work.

Brain Candy
May 18, 2006

abraham linksys posted:

we didn't blindly ape other companies we just got sick of the overhead of keeping different repos in sync and using the same internal dependencies/libraries

we have a bunch of services sharing a bunch of common code, plus things like frontends that need to stay in sync with backend APIs, etc. monorepos made more sense than submodule hell and making and syncing 3 different PRs to change our DAL code, API endpoints, and frontend for each feature

the alternative to monorepos for most ppl is semver, not some horrible monster you need poke in multiple places to move

abraham linksys
Sep 6, 2010

:darksouls:

Brain Candy posted:

the alternative to monorepos for most ppl is semver, not some horrible monster you need poke in multiple places to move

not really sure how this would help with my complaint

like with split repos if i make a feature I have to create a feature branch for our DAL codebase (which is shared by multiple services), a feature branch for whatever the backend service I'm changing is, and a feature branch for the frontend to that service. then i have to make sure all of these feature branches get PRs that are merged into their respective masters

then whether you're using a git submodule to pull in a dependency or an internal package registry where packages are published with semver-following versions, you still have a huge process overhead compared to "the code on master in this one repo is the code running on everything and you never have to think about it"

also local development with split repos is a loving nightmare because assuming the code on your filesystem is the code you're running everywhere (and it should be because how else would you develop features involving multiple modules), when you swap between feature branches you have to swap between branches in multiple repos and you can easily end up in a broken state because you forgot something

abraham linksys fucked around with this message at 13:16 on Feb 18, 2016

fritz
Jul 26, 2003

suffix posted:

i know we have jenkins triggering builds based on the exact files that changed so i'm pretty sure it can do this

i'm not a jenkins guy though so who knows how

yeah, we have jenkins watching a directory, there's an option in the job configuration page

TwoDice
Feb 11, 2005
Not one, two.
Grimey Drawer

Notorious b.s.d. posted:

monorepos are a disastrous anti-pattern with open source tools

  • git doesn't do well with large repos. (the big companies using monorepos are using p4.)

  • jenkins' git plugin isn't designed to deal with this, because git doesn't expect users to keep monorepos. (the big companies with monorepos have proprietary CI, entire teams to write weird stuff for p4)

  • git tagging becomes a disaster because your namespace is polluted -- thing-v1.0, other-thing-v1.1. (this additionally complicates your work with jenkins.)

it doesn't pay to blindly ape facebook and google. they have huge profits and huge teams to manage proprietary tooling and infrastructure. you don't.

don't try to build a weak-sauce google out of open source bits intended for entirely different scenarios

facebook and goggle don't use p4 anymore either, it scales badly

if you want to be monorepo man with git you're gonna have a bad time

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

TwoDice posted:

monorepo man

mods

MononcQc
May 29, 2007

abraham linksys posted:

not really sure how this would help with my complaint

like with split repos if i make a feature I have to create a feature branch for our DAL codebase (which is shared by multiple services), a feature branch for whatever the backend service I'm changing is, and a feature branch for the frontend to that service. then i have to make sure all of these feature branches get PRs that are merged into their respective masters

then whether you're using a git submodule to pull in a dependency or an internal package registry where packages are published with semver-following versions, you still have a huge process overhead compared to "the code on master in this one repo is the code running on everything and you never have to think about it"

also local development with split repos is a loving nightmare because assuming the code on your filesystem is the code you're running everywhere (and it should be because how else would you develop features involving multiple modules), when you swap between feature branches you have to swap between branches in multiple repos and you can easily end up in a broken state because you forgot something

We use a lot of small repos on the team I'm working on because we maintain a different set of HTTP routers for different product, but they do have a lot of libraries in common. Otherwise, we do also maintain a bunch of Erlang libraries that are very generic and can be used in other products internally.

Doing that pretty much forces us into two patterns:

- Small repos and defer to the build tool
- Vendor in deps, which is different from a monorepo.

The pattern is pretty much:

- Work on the main feature in the big thing and offshore the feature branches to each subdep
- You can try the feature branches locally because our build tool lets us symlink-to-override libraries in each project
- push all the feature branches and the big one and open a PR
- ask for a review on the main project, link to the PRs of the subprojects
- each bit is reviewed the way they would if they were in a single repo
- merge the feature branches and maybe tag em
- merge the main branch

This tends to work well and has maybe a 15 mins overhead. The biggest nightmare I see with this is when we have multiple people working on multiple diverging products at once and everyone gets into conflicting subdeps modifications. Then someone needs to step up and coordinate that, but I believe it would be the same otherwise.

FamDav
Mar 29, 2008
facebook never used p4, they switched from svn to hg. google was using p4 well into ridiculously scaled terrority and now run their own perforce-like. amazon switched from perforce to (for a very short period of time) svn to git. microsoft stores their code on bill gates old laptop or something.

fwiw amazon does repo-per-package and actual release versioning at ~*scale*~. most every team practices trunk based development for their packages, but instead of cutting release branches or tags we cut a version set that describes the collection of artifacts, which we push through pipelines to various tests and environments.

i really enjoy the tooling but i don't see how our solution could scale down to smaller groups because of the infrastructure involved. a monorepo takes away a lot of that complexity, you just need the remote caching and distributed build support that doesn't exist in open source tooling.

JimboMaloi
Oct 10, 2007

bazel and buck both offer a little bit of the remote caching/distributed build stuff in open source so it's becoming a lot more feasible to do monorepo without a big in-house development effort. git is still a complete non-starter though. the 'easy' workaround for abraham linksys's problem if theyre on svn or p4 is set up separate builds in jenkins which are monitoring subtrees rather than the repo root but if its git then yeah youre going to have issues.

FamDav
Mar 29, 2008
do you have any idea why bazel has been getting a lot of talk over buck when buck is literally a reimplementation of blaze? or is it just because its recently released.

abraham linksys
Sep 6, 2010

:darksouls:
we've been using a git-based monorepo for 6-7 months now and haven't had any performance issues. we don't vendor any large files or anything, maybe that helps?

fwiw our codebase is like 25 megs and my local repo is around a gig at the moment

abraham linksys fucked around with this message at 17:55 on Feb 18, 2016

Progressive JPEG
Feb 19, 2003

I've been using git submodules recently and that's worked OK

This is just for real basic dependencies across repos tho

Soricidus
Oct 21, 2010
freedom-hating statist shill

Brain Candy posted:

some horrible monster you need poke in multiple places to move

don't talk smack about my mom

Shaggar
Apr 26, 2006

JimboMaloi posted:

bazel and buck both offer a little bit of the remote caching/distributed build stuff in open source so it's becoming a lot more feasible to do monorepo without a big in-house development effort. git is still a complete non-starter though. the 'easy' workaround for abraham linksys's problem if theyre on svn or p4 is set up separate builds in jenkins which are monitoring subtrees rather than the repo root but if its git then yeah youre going to have issues.

cant you tell Jenkins which projects in the source to build?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Progressive JPEG posted:

I've been using git submodules recently and that's worked OK

This is just for real basic dependencies across repos tho

git submodules seem worse than i expected them to be

Jerry Bindle
May 16, 2003
you could use git subtrees instead of submodules, they are bad too but in different ways.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

fart simpson posted:

git submodules seem worse than i expected them to be

the only time i ever used them i regretted it

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i tried them once a few years ago and i don't even remember why they were bad but i stopped using them pretty quick

Tankakern
Jul 25, 2007

quick, someone explain to me why elm exists

AWWNAW
Dec 30, 2008

Tankakern posted:

quick, someone explain to me why elm exists

because web development sucks?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Tankakern posted:

quick, someone explain to me why elm exists

http://elm-lang.org/papers/concurrent-frp.pdf

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

if you mean why does anyone care about it & use it though, then it;'s because functional programming is really food and functional reactive programming is a really nice way to do ui stuff, and elm exists in a niche where it gets you most of the good parts of something like haskell + an frp library without 95% of the complexity overhead

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i meant really good not really food

JawnV6
Jul 4, 2004

So hot ...
its almost lunchtime, i could go for some food?

Adbot
ADBOT LOVES YOU

Jerry Bindle
May 16, 2003
what food would you compare elm to? a burrito?

  • Locked thread