These are chat archives for japgolly/scalacss

14th
Mar 2015
David Barri
@japgolly
Mar 14 2015 01:04
Things are moving fast! Here is a preview of what this library will look like:
UsageTest.scala
Per Wiklander
@PerWiklander
Mar 14 2015 09:09
@japgolly the syntax looks awesome, but... the ~ character is seriously annoying to type on some euro keyboard layouts. I personally program with a US keyboard since it's obviously optimized for programming. I just yesterday watched a colleague struggling with producing a ~ on a Swedish keyboard in Ubuntu. It was a like a altgr+' followed by a space. I guess we can't have a single : but what about the "standard" := ?
Otto Chrons
@ochrons
Mar 14 2015 09:17
agreed
I too use US layout for programming, and actually have a blank daskeyboard so I can switch between layouts without the markings confusing me :)
and because Windows supports application specific layouts, I have different layouts in different apps at the same time :stuck_out_tongue_winking_eye:
Per Wiklander
@PerWiklander
Mar 14 2015 09:21
The only non us keys I need are our three lovely letters with extra decoration on top, so I just have a key combo to type them. Don't have to change layouts. But I pitty the fool who tries to use my computer :-)
Otto Chrons
@ochrons
Mar 14 2015 09:22
I've got an older model, but this layout keeps the kids away from my computer ;) http://www.daskeyboard.com/daskeyboard-4-ultimate/
oh, the new version even supports full n-key rollover
my friend always complains about slow keyboards because they don't register keypresses as quickly as he types, or registers them in wrong order
Mostly because I spent a few years on a laptop and got used to it.
Otto Chrons
@ochrons
Mar 14 2015 09:32
coding on the Apple SWE/FI layout is utter pain, accessing {}[] is just plain awful and requires great hand dexterity :)
Per Wiklander
@PerWiklander
Mar 14 2015 09:32
Guess why I opted for a US keyboard 10 years ago...
It's strange how much they managed to fuck the layout up considering we have three extra letters to type.
{ is like option+shift+7
Otto Chrons
@ochrons
Mar 14 2015 09:35
and there is one key more on the physical keyboard
which is a minor problem on my daskeyboard with physical US layout, so it's missing the key with <> when in FI mode :)
Per Wiklander
@PerWiklander
Mar 14 2015 09:37
Anyway... @japgolly think of the Europeans...
Otto Chrons
@ochrons
Mar 14 2015 09:41
also the ~ reminds me of the rule joining operator in Spray
Per Wiklander
@PerWiklander
Mar 14 2015 09:43
I think of it as "almost equal to" :-)
David Barri
@japgolly
Mar 14 2015 12:39
Oh no :(
Well := is out of the question. I started using it at first because Scalatags, but then when I started adding other ops in like for composition, it never worked.
// Doesn't work
blah := "blah" & blah := "blah"

// Need to do this
(blah := "blah)" & (blah := "blah")
which is annoying.
After some research it turns out Scala has really annoying hardcoded (half documented) op precedence rules.
:= won't work with anything because it ends in = and doesn't start in =. Crazy.
So we need something else. Please suggest :)
Although with the higher-level styles, one won't be doing direct composition very much ∵ := might not be a problem cos everything is separated by commas.
David Barri
@japgolly
Mar 14 2015 12:45
If it stays though, I think I'll keep ~ around as well. It's shorter, readability is easier cos it's not as prominent visually. Everyone wins, even Europeans.
I dunno. Do, make suggestions though.
Another demo! Style functions: Definition, generated, application.
(obvious the type declarations like Boolean => StyleA are just for the test, can look a little cleaner)
And here's something else I started tinkering with: everyone knows caniuse.com right? How about CanIUse.scala...
Otto Chrons
@ochrons
Mar 14 2015 12:50
yes, = has some special rules indeed
David Barri
@japgolly
Mar 14 2015 12:50
Will likely use this for determining prefixes at runtime, and providing extra warnings.
Otto Chrons
@ochrons
Mar 14 2015 12:51
hope you didn't write that by hand :stuck_out_tongue_winking_eye:
David Barri
@japgolly
Mar 14 2015 12:51
Haskell lets you define your own op precedence scoped just to your library/module.
No way! I wrote a crappy parser for it. If it's useful it will go out of date and need updating in future. We'll be able to hit a button to make that happen.