workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
You can try deleting the `elm-stuff` directory and you might get lucky
2019-05-01T02:28:21.264600
Earlean
elmlang
general
Have you tried to compile it without the --debug flag?
2019-05-01T02:39:05.264700
Dexter
elmlang
general
No ive localized the issur it has to do with updating records
2019-05-01T05:06:18.265500
Isaias
elmlang
general
I still dont quite know what in particular is causing the error
2019-05-01T05:06:42.266200
Isaias
elmlang
general
Or maybe it has to do with my debug todo stubs.. idk
2019-05-01T05:19:03.266700
Isaias
elmlang
general
Oh btw i refactored and it fixed itself
2019-05-01T06:36:00.267500
Isaias
elmlang
general
I wanted to install a package from the master branch on github (as opposed to a number versioned branch) - is there a way to do that, or does it go against the elm way?
2019-05-01T08:53:29.270100
Carmon
elmlang
general
yes that is not supported by the tooling. you can force it if you really need to
2019-05-01T08:58:18.270800
Virgie
elmlang
general
OK - how do I force it?
2019-05-01T09:01:29.271500
Carmon
elmlang
general
Has anybody found a nice way to do state transitions for an SPA? I'm finding that everything seems to become spaghetti code. (Model, update, view) triplets haven't been ideal for code clarity in my past experiences.
2019-05-01T09:06:21.273100
Tarsha
elmlang
general
well, as they say, here be dragons go to `~/.elm` and find the package that you want to mess with, eg `/home/folkertdev/.elm/0.19.0/package/elm/file/1.0.5`. You can change the source there. Nothing will happen yet though because everything is cached. You then have to remove all 3 `.dat` files in that directory. Now go to your project, remove elm-stuff and recompile it
2019-05-01T09:09:18.273200
Virgie
elmlang
general
but again, you should not be doing this (maybe except for testing fixes to packages in your app). it is not supported, it is hacky, it is not distributable
2019-05-01T09:10:29.273400
Virgie
elmlang
general
in the sense that your elm.json is now inaccurate as to what version is actually used in your app
2019-05-01T09:11:04.273600
Virgie
elmlang
general
You’ve looked at the canonical examples?
2019-05-01T09:11:33.273800
Dede
elmlang
general
I have an idiosyncratic approach here, which some people have found at least interesting. <https://github.com/jhbrown94/experimental-elm-spa-skeleton>
2019-05-01T09:12:17.274000
Dede
elmlang
general
I get it - but thank you. I am hoping the master is released before my app is complete. OTOH it's not like I've never been bitten in the a** by a dragon
2019-05-01T09:13:42.274200
Carmon
elmlang
general
Not the most helpful answer, but if you've followed and understand the canonical examples, my recommendation is that there isn't a good rule of thumb, you have to start from first principles. And that means sitting down and thinking out your app, because the spaghetti is frequently inherent in how complicated your app is, not coming from the language
2019-05-01T09:18:34.274400
Liane
elmlang
general
I do have 2 easy rules that I have found almost always make things better: 1) Find types and build modules around them. Do not worry about module size, if the functionality is logically related. 2) Keep the app as flat as possible. A big app can happily be one package. Things seem to me to want to be packaged as logical units, not to keep code length down, in Elm.
2019-05-01T09:21:21.274600
Liane
elmlang
general
Elm helps avoid writing impossible states, but state transitions are all that your Elm code _is_, so to get that right you have to get your helper functions right. Try to make sure that certain transitions only happen in one function, and you can't accidentally do it differently in two places
2019-05-01T09:24:31.274800
Liane
elmlang
general
Main issue I run into is the impossibility to 'remove' type information, so you can't neatly group things based on abstract 'shape'. If I'm not mistake <@Dede> is essentially doing this by expressing every triplet in terms of parent model and msg. I guess this can work but it seems 'nasty' to use an input type that is only partially supported. In contrast, my API router in Haskell looks like a table of endpoint names, verbs and handlers. Maybe I'm just asking for too much for a language the aim of which is to remain simple.
2019-05-01T09:25:34.275000
Tarsha
elmlang
general
are you saying you would like to abstract out page triplets?
2019-05-01T09:27:29.275200
Liane
elmlang
general
Speaking at a high-abstraction level: I'm not interested in 3 values, I'm interested in 1 page, and I want to reason about that page as being a *page* not a `Page model msg`.
2019-05-01T09:29:16.275400
Tarsha
elmlang
general
At least not with bound `model` and `msg` types.
2019-05-01T09:30:53.275600
Tarsha
elmlang
general
The `Descriptors` in my skeleton try to give you most of that. They hide the page-specific model stuff entirely, and most of the page-specific msg stuff. That said, it sounds like you are pining for more traditional object-orientedness with inheritance, and that’s really not where Elm’s philosophy lies.
2019-05-01T09:32:47.275800
Dede
elmlang
general
More like typeclasses, but that's considered too complex for Elm, and I can see where that notion is coming from.
2019-05-01T09:34:54.276000
Tarsha
elmlang
general
I guess the two approaches try to fulfill the same abstract desire.
2019-05-01T09:36:11.276200
Tarsha
elmlang
general
Essentially I want to do sort-of what you did, but with type-restrictions being internal.
2019-05-01T09:39:03.276400
Tarsha
elmlang
general
Well, that covers phantom types, but there are some other type-system “hacks/tricks” going on here.
2019-05-01T09:50:10.276600
Leoma
elmlang
general
What debounce library do folks recommend for 0.19? I saw a few
2019-05-01T10:53:23.278600
Marinda
elmlang
general
What do you mean by state transitions?
2019-05-01T12:11:00.279200
Ashton
elmlang
general
I think of, any kind of update to the model as a state transition.
2019-05-01T12:11:16.279400
Ashton
elmlang
general
Richard’s SPA example seems like a good guide. Can you find the problem you are talking about in that code base?
2019-05-01T12:12:50.279600
Ashton
elmlang
general
I read people raving about Elm UI. what is it? is it out for 0.19? what makes it so good?
2019-05-01T13:43:48.280200
Efren
elmlang
general
it is out, <https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/>
2019-05-01T13:44:24.280300
Mirian
elmlang
general
It's an alternative way for writing html/css stuff
2019-05-01T13:44:44.280500
Mirian
elmlang
general
(by not writing html/css stuff and instead using pure Elm)
2019-05-01T13:44:56.280700
Mirian
elmlang
general
is Ellie an elm thing?
2019-05-01T13:46:54.281000
Efren
elmlang
general
yup, Elm-only AFAIK
2019-05-01T13:47:10.281200
Mirian
elmlang
general
written in elm too?
2019-05-01T13:47:20.281400
Efren
elmlang
general
yes, I think so
2019-05-01T13:47:36.281600
Mirian
elmlang
general
i see. what makes it so great
2019-05-01T13:47:37.281800
Efren
elmlang
general
you can look it up on github
2019-05-01T13:47:56.282000
Mirian
elmlang
general
<https://github.com/ellie-app/ellie>
2019-05-01T13:47:56.282200
Mirian
elmlang
general
i did notice it was noticeably less buggy and slow than similar apps
2019-05-01T13:48:10.282400
Efren
elmlang
general
so i was wondering
2019-05-01T13:48:12.282600
Efren
elmlang
general
Are you familiar with CSS?
2019-05-01T13:49:46.282800
Leoma
elmlang
general
yea
2019-05-01T13:49:52.283000
Efren
elmlang
general
The bullet points on the package site sum it up quite well from my perspective. I know barely any CSS so a library that allows me to not write is heaven-sent.
2019-05-01T13:50:12.283200
Mirian
elmlang
general
So you’d probably agree there are countless ways to get strange unintended layouts in CSS.
2019-05-01T13:50:21.283400
Leoma
elmlang
general
certainly
2019-05-01T13:50:35.283600
Efren
elmlang
general
every time im frustrated about css (frequently) i think there should be a better alternative
2019-05-01T13:50:50.283800
Efren
elmlang
general
Many times, with valid CSS, you’d get an output that probably no one would ever want
2019-05-01T13:50:51.284000
Leoma
elmlang
general
is this my savior
2019-05-01T13:50:51.284200
Efren
elmlang
general
also is this the docs <https://elm-ui.netlify.com/documentation/getting-started/setup>
2019-05-01T13:50:57.284400
Efren
elmlang
general
oh it's another library I think
2019-05-01T13:51:16.284600
Mirian
elmlang
general
So elm-ui says: “let’s try to have this layout business make more sense”.
2019-05-01T13:51:22.284800
Leoma
elmlang
general
all docs for `mdgriffith/elm-ui` are here: <https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/>
2019-05-01T13:51:57.285000
Mirian
elmlang
general
if I were to watch avideo on it is this a good one
2019-05-01T13:56:43.285200
Efren
elmlang
general
<https://www.youtube.com/watch?v=Ie-gqwSHQr0>
2019-05-01T13:56:43.285400
Efren
elmlang
general
I enjoyed it, so I recommend wholeheartedly :wink:
2019-05-01T14:00:31.285600
Mirian
elmlang
general
Yes. That’s a good video. Starting with elm-ui is deceptively simple. Read the basic Element module API at <https://package.elm-lang.org/packages/mdgriffith/elm-ui/1.0.0/Element>. That gives you a good overview of all the basic stuff. Need more on Input? It’s in Element.Input. Need more on Borders? In Element.Border. Finally, `Element#layout` turns your elm-ui layout into html.
2019-05-01T14:08:31.286000
Leoma
elmlang
general
Really, you can just get started building stuff.
2019-05-01T14:08:54.286200
Leoma
elmlang
general
would it be possible to add a class or ID to the debugger div that is inserted on local elm projects?
2019-05-01T14:26:30.287100
Latonya
elmlang
general
<@Latonya> nothing built in, I usually query it by the zindex
2019-05-01T14:31:04.287500
Alicia
elmlang
general
like to move the debugger to the left side ``` div[style*="z-index: 2147483647"] { left: 0 !important; width: 250px !important; } ```
2019-05-01T14:31:36.287800
Alicia
elmlang
general
i think that's the highest possible z-index, correct? so _lastpass_ uses the same one
2019-05-01T14:33:32.288600
Latonya
elmlang
general
maybe i can submit a PR to add an ID. i just don't even know where the debugger code lives (i'm mostly a designer, doing some css)
2019-05-01T14:38:10.290300
Latonya
elmlang
general
saw your face in that talk. spooky
2019-05-01T14:50:42.290400
Efren
elmlang
general
anyway, looks cool, but I'm not convinced yet this can express everything CSS can. he never addressed that (that i saw)
2019-05-01T14:51:09.290600
Efren
elmlang
general
Haha ya. Matthew liked my quote and asked to include it. I still stand behind that feeling 100%.
2019-05-01T14:56:03.290800
Leoma
elmlang
general
Anyway, elm-ui has a way of wrapping and html element into an elm-ui element, AND also of wrapping html attributes into elm-ui attributes. So you can use all of html/css in elm-ui.
2019-05-01T14:57:10.291000
Leoma
elmlang
general
you need to put the padding on the `td` elements
2019-05-01T15:03:49.291200
Nana
elmlang
general
a PR could be nice, but it tends to take a long time to get them reviewed or merged
2019-05-01T15:15:42.291900
Alicia
elmlang
general
would querying on multiple properties help eliminate lastpass?, or maybe lastpass has something in its element you could eliminate with a `:not()` selector?
2019-05-01T15:17:46.292600
Alicia
elmlang
general
Hi all, I'm suddenly getting the dreaded `elm: Map.!: given key is not an element in the map` compilation error, and deleting elm-stuff isn't working. Any tips?
2019-05-01T15:19:09.293500
Yahaira
elmlang
general
Have you tried disabling the debugger?
2019-05-01T15:20:37.294200
Timika
elmlang
general
Avoid —debug seems to be the most popular one
2019-05-01T15:20:44.294500
Bebe
elmlang
general
Thanks! I'm using `parcel watch` to build my Elm app, so I'll have to see if there's an option to turn off the debugger in parcel's watch mode
2019-05-01T15:23:33.296100
Yahaira
elmlang
general
Thanks - it does compile ok if the debugger is off. I may just have to stop using parcel watch for now.
2019-05-01T15:34:33.298300
Yahaira
elmlang
general
You can also downgrade to something around parcel `1.10.3` IIRC which does not add the `--debug` flag in watch mode.
2019-05-01T15:57:13.299300
Jin
elmlang
general
Is this not allowed in 0.19? `infix right 0 (|) = function`. The `elm/core` package has syntax there.
2019-05-01T17:03:13.300300
Wenona
elmlang
general
only `elm/*` and `elm-explorations/*` are allowed to define infix operators in 0.19
2019-05-01T17:03:48.300800
Huong
elmlang
general
Hmm… what about `(|) : a -&gt; a` syntax?
2019-05-01T17:04:14.301600
Wenona
elmlang
general
(same way they’re the only orgs that can write kernel code or create effect modules: they’re considered core parts of the ecosystem)
2019-05-01T17:04:41.302100
Huong
elmlang
general
So you can’t do that with symbols?
2019-05-01T17:05:00.302900
Wenona
elmlang
general
Correct! (I don’t think it would play nice with unary functions, but haven’t tried)
2019-05-01T17:05:57.303900
Huong
elmlang
general
Right… dang. Oh well :man-shrugging:
2019-05-01T17:07:58.304300
Wenona
elmlang
general
Obviously nobody is stopping you from being `elm/*` or `elm-explorations/*`, but it's not code you could make available as Elm library via `elm install`.
2019-05-01T17:10:32.305100
Erlene
elmlang
general
Yeah, you can do that to experiment, though I would heavily discourage relying on such things - special syntax and whatnot for those packages is considered an implementation detail, and can/will break without prior notice :slightly_smiling_face:
2019-05-01T17:13:08.307700
Huong
elmlang
general
It seems that `elm/bytes` doesn’t have the concept of seeking to a given offset. I noticed there’s a `Byte.Parser`, skip method seems the closest functionality. Am I right ?
2019-05-01T17:34:23.309300
Hoa
elmlang
general
I’ve just realised that Quake 3 BSP files are not guaranteed to have the various lumps in the order they are listed in the header “directory” portion. Damn
2019-05-01T17:35:55.311000
Hoa
elmlang
general
the file disagrees with its own header?
2019-05-01T17:36:11.311300
Virgie
elmlang
general
Not really. I have not explained well the scenario
2019-05-01T17:36:43.311900
Hoa
elmlang
general
Basically the header lists a number of so called “lumps”, each has a offset and length. I was assuming that the order the lumps listed in the header was the same of the actual data later on the file. It is not the case.
2019-05-01T17:38:41.313900
Hoa
elmlang
general
<https://package.elm-lang.org/packages/zwilias/elm-bytes-parser/latest/Bytes-Parser#randomAccess> is my preferred method for this kind of thing
2019-05-01T17:39:26.315000
Huong
elmlang
general
you can first decode the header and then sort. In general I've found a two-phase decoding process easier in this sort of case: once to slice the buffer into smaller buffers (one for each table), then individual decoders for the tables
2019-05-01T17:39:30.315200
Virgie
elmlang
general
if you know where a “lump” starts, this is pretty straightforward
2019-05-01T17:39:47.315400
Huong
elmlang
general
Ah, you sort the “directory” part by the offset, right?
2019-05-01T17:40:12.316400
Hoa
elmlang
general
exactly
2019-05-01T17:40:20.316600
Virgie
elmlang
general
Oh, that’s clever
2019-05-01T17:40:30.317000
Hoa