Skip to main content iamgio (u/iamgioh) - Reddit
iamgioh u/iamgioh avatar

iamgio

u/iamgioh

Feed options
Hot
New
Top
View
Card
Compact






Your thoughts about in-building fitness centers? Your thoughts about in-building fitness centers?

Moving from Europe to San Francisco for a year, looking for a place in East SoMa / Mission Bay.

I'm going to hit the gym, but I read on this sub that gyms in SF are quite crowded and that's the last thing I want, considering I might go during peak hours after a sedentary workday.

That's why I was looking for apartments with in-building fitness centers. I found a few, but considering the high costs, I wanted to make sure they aren't scams and have the main bodybuilding tools and machines. I'm aware each building is different, so I'm asking for an overview and, if you'd like, your experience. Thanks!



I made a deep-copy library, looking for feedback I made a deep-copy library, looking for feedback

Hello, some of you may remember my last post about compile-time merging of data classes. I decided I wanted to turn it into a broader collection of compile-time utilities, named amber.

The newest addition involves data classes again, but now in terms of nested data. Annotating a data class with NestedData generates a reflectionless deepCopy function that propagates the copy operation to nested data class properties.

The cool thing about it is the flattening of nested properties. Consider the following model:

import com.quarkdown.amber.annotations.NestedData

@NestedData
data class Config(
    val app: AppConfig,
    val notifications: NotificationConfig,
)

data class AppConfig(
    val theme: String,
)

data class NotificationConfig(
    val email: EmailNotificationConfig,
    val push: PushNotificationConfig,
)

data class EmailNotificationConfig(
    val enabled: Boolean,
    val frequency: String,
)

Without the library, affecting a deeply-nested property would lead to multiple, hard to read, nested copy calls:

val newConfig: Config = config.copy(
    app = config.app.copy(theme = "dark"),
    notifications = config.notifications.copy(
        email = config.notifications.email.copy(enabled = false)
    )
)

With the library, nested properties appear at the first level, named after the camelCase chain of properties they belong to:

val newConfig: Config = config.deepCopy(
    appTheme = "dark",
    notificationsEmailEnabled = false,
)

I'm particularly interested in hearing your opinion. I'm already testing it out for production in a large project of mine, and it's working great so far.

My biggest doubt is about the parameter names:

  • Do you think camelCase works? I initially went for snake_case for clarity, but that felt quite awful to invoke.

  • How would handle clashing names? e.g. userName generated both by userName and user.name at the same time.

Additionally, how do you feel about compile-time-generated functions in general?

Repo: https://github.com/quarkdown-labs/amber.kt






It's a reasonable design, though I would *personally* mind carrying the `defaults` instance around.

The library would make the presence of defaults opaque, and would remove the boilerplate that your example contains for falling back to the default values. It would be more maintainable for classes with lots of properties.


I made a compile-time library to merge data class instances I made a compile-time library to merge data class instances

Hello everyone! Out of necessity on a large project of mine, I ended up creating a tiny library to merge instances of the same data class, based on their nullable properties.

If you're wondering what's the point:

  • It promotes immutability.

  • It works at compile-time (based on KSP) and it's reflectionless. Only annotations are carried at runtime.

  • As shown in the following example, it's extremely convenient when dealing with deserialization, or when the default property values depend on the environment.


@Mergeable
data class Preferences(
    val theme: String? = null, // If null, use system default
    val fontSize: Int? = null, // If null, use system default
    val autoSaveDelay: Int? = null, // If null, disable auto-save
)

object DefaultPreferencesFactory {
    fun mobile() = Preferences(theme = "light")
    fun desktop() = Preferences(fontSize = 16, autoSaveDelay = 30)
}

fun main() {
    val default = DefaultPreferencesFactory.desktop()
  
    // Assume user preferences are loaded from a config file.
    val user = Preferences(theme = "dark", autoSaveDelay = 10)

    // Merging user preferences with defaults. User values take precedence.
    val preferences: Preferences = user.merge(default)
    println(preferences) // Preferences(theme=dark, fontSize=16, autoSaveDelay=10)
}

I hope you find it as useful as I do!
Here's the repo: https://github.com/quarkdown-labs/kotlin-automerge

I don't have any big plans since, as I said, it was more of a necessity. I would like to add multiplatform support and nested merging in the future. Contributions are welcome!










Hello.

  1. There should be no issues. I saw multiple people use it with Chinese characters flawlessly.

  2. Yes, Quarkdown produces high-quality output. See the Mock outputs (I suggest paperwhite_latex.pdf, the classic LaTeX look).

  3. Quarkdown is not a static website generator by itself. However, the generated HTML output can be hosted and opened via browser. In the future it will also allow generating wikis.

  4. I did not run precise benchmarks, though the Mock document (40 pages) compiles to HTML in ~1 second on my M1 MacBook. Plus ~2 seconds overhead for generating PDF, but that's handled by a third-party library and cannot be optimized further. You can experience a smooth live reloading with HTML preview, and then compile to PDF. The two outputs are exactly the same, visually speaking.

  5. I will support Quarkdown long-term and I'm excited to do so. I plan to turn it into my full-time job, so I will either raise funding or commercialize external tools (the core compiler and CLI tools will be FOSS forever, no worries).

  6. Short, stupid answer: it's the language I'm the most fluent and confident in. It's extremely flexible and just feels natural for me to write. I didn't choose it for the technical aspects, and so far I don't see big drawbacks. I know, not everyone likes the JVM, so I will find a way to bundle it with Quarkdown, for example via a package manager.

I encourage you to try it out yourself, and I'm open to further questions and feedback. Cheers!







Update: v1.1.2 is out, and the `.numbered` function has been fixed.

You can now number your custom tables achieved via the proposed workaround:

.numbering
    - mytable: 1.1

.function {mytable}
    caption table:
    .numbered key:{mytable}
        label:
        .center
            Table .label: .caption
    
            .table
# Title

.mytable {My first table caption}
    | A | B | C |
    |---|---|---|
    | x | y | z |

.mytable {My second table caption}
    | A | B | C |
    |---|---|---|
    | x | y | z |

Result: https://i.imgur.com/sdlfs3r.png

For more information check out the "Numbering" wiki page: https://github.com/iamgio/quarkdown/wiki/numbering




There isn't an out of the box way yet, so I'm adding it to my to-dos. Thanks for the input!

You can however try this workaround via a custom function, simulating a caption by means of a centered paragraph:

.function {mytable}
    caption table:
    .center
        .caption

        .table

And then invoke it by:

.mytable {My table caption}
    | A | B | C |
    |---|---|---|
    | x | y | z |

You could also number it via the .numbered function, though I just tried and spotted an issue. I'm on it and I'll keep you updated when an update is ready.

Edit: updated to .center, which is shorthand to .container alignment:{center}







Hi and thank you! I get this asked quite often, so here is a previous answer of mine:

Quarkdown’s core principle is having a flat learning curve, and I believe it does that greatly as it’s just Markdown, so pretty much any tech guy already knows how to use 90% of it.

That said, I'm aware Typst is much more mature and I'm sure it has more features and stability. But as an end user, I love using Quarkdown on all my reports and presentations and that brings me big satisfaction, so I will keep improving it as much as I can.

It’s just a matter of preference. I believe Typst is more flexible customization-wise, while Quarkdown is flexible scripting-wise. Also, Typst doesn’t stably support HTML export yet.




Hi, if by “real time” you mean live preview, Quarkdown has that! You just need to launch it with the options -p -w (preview, watch) and it will recompile the sources and reload your browser everytime a file in your project directory changes.

I believe using Quarkdown will save you the hassle of converting Markdown to another language.






Quarkdown’s core principle is having a flat learning curve, and I believe it does that greatly as it’s just Markdown, so pretty much any tech guy already knows how to use 90% of it.

That said, I'm aware Typst is much more mature. But as an end user, I love using Quarkdown on all my reports and presentations and that brings me big satisfaction.

It’s just a matter of preference. I believe Typst is more flexible customization-wise, while Quarkdown is flexible scripting-wise. Also, Typst doesn’t stably support HTML export yet.




This is some precious feedback, thank you! Some of these (eg. page breaks and tables) could coexist both as syntax rules and functions. What string would you use as a joiner?

Edit: I initially considered ->, which makes more sense but takes significantly more time to be typed.





No offense taken. I'm actually glad to receive feedback about missing features. To be clear, Quarkdown was born as I began getting frustrated with using LaTeX. I know it cannot ever be replaced and nothing comes close to it; I'm just trying to make something easier to use and especially to pick up on, while compromising little to nothing.

I'm a Quarkdown end user myself and it does wonders for what I need.


God damn it, it sucks when you've been happily dreaming up a programming language and someone manages to do it better and actually makes a working implementation...

Fantastic job, I'm furious, jealous, and will be using this.

One of the best compliments I've received so far, thank you so much!

How stable is this right now? What future work do you have planned?

It is stable. Right now the releases are unversioned but I'll start versioning them soon. Future work include hosting an auto-generated documentation of the stdlib, supporting bibliography and overall better customization. I will stick just to HTML (and PDF) for a bit, new target languages are planned later.

Also, heads up, the presentation slides for the demo were extremely difficult to read on mobile and impossible to zoom in on

Yep, that's why the readme says "desktop view is suggested" :(
It's a Reveal.js issue (the runtime presentation library) and I couldn't find a way to fix it. I'd be happy for some Reveal expert to help me on that, as I had no luck so far.




I’m going to have a closer look later, thank you. The cool thing about paged.js is that it offers a nice web preview, does WeasyPrint have something like it?

These justification topics sound interesting, I’m going to investigate further. Would you like opening an issue on GitHub? Otherwise I’ll open one myself later.



I’m not sure, but as far as I know Pandoc just handles plain content, without support for layout customization, right? In that case it has a different job compared to Quarkdown’s so I wouldn’t really compare them.

I know Quarto is similar to Quarkdown (they share the same qmd extension) and relies on Pandoc. But Quarto is more data and notebook-oriented so I don’t see this close similarity either.

In the future it would be brilliant to use Pandoc under the hood to support many more language targets.





Quarkdown is a hybrid of the two: simplicity of Markdown and versatility/customization of LaTeX. Plain Markdown just defines the content of a document, not its look. That’s where Quarkdown comes in as a typesetting system.

I would say it works best for papers, articles and simple presentations. Better support for books will come soon, and also support for wikis/docs later.



I’ve never used it, but I know it’s a mature project with lots of packages. Quarkdown is young of course, but I see potential and that’s why I aim on working on it full time. Quarkdown’s core principle is having a flat learning curve, and I believe it does that greatly as it’s just Markdown, so pretty much any tech guy already knows how to use 90% of it.

That said, I’m not trying to sell it, and I'm aware Typst is much more mature. But as an end user, I love using Quarkdown on all my reports and presentations and that brings me big satisfaction.



Thank you! Yeah, I know Typst but I’d say Quarkdown has a different core principle, which is extending the well-known Markdown instead of providing a new syntax. Typst is definitely good, but I’m not taking it as an inspiration. Also Quarkdown supports HTML export, which Typst doesn’t.


Introducing charts into my typesetting system Introducing charts into my typesetting system
Requesting criticism

Hi all!

Almost a year ago I posted here about my Turing-complete extension of Markdown and flexible LaTeX-like typesetting system: Quarkdown.
From that time the language has much improved, along with its wiki, as the project gained popularity.

As a recap: Quarkdown adds many QoL features to Markdown, although its hot features revolve around top-level functions, which can be user-defined or accessed from the extensive libraries the language offers.

This is the syntax of a function call:

.name {arg1} argname:{arg2}  
    Body argument

Additionally, the chaining syntax .hello::world is syntactic sugar for .world {.hello}.

Today I'm here to show you the new addition: built-in plotting via the .xychart function, which renders through the Mermaid API under the hood. This is so far the function that takes the most advantage of the flexible scripting capabilities of the language.

From Markdown list

.xychart x:{Months} y:{Revenue}
  - - 250
    - 500
    - 350
    - 450
    - 400

  - - 400
    - 150
    - 200
    - 400
    - 450

Result: https://github.com/user-attachments/assets/6c92df85-f98e-480e-9740-6a1b32298530

From CSV

Assuming the CSV has three columns: year, sales of product A, sales of product B.

.var {columns}
    .tablecolumns
        .csv {data.csv}

.xychart xtags:{.columns::first} x:{Years} y:{Sales}
    .columns::second
    .columns::third

Result: https://github.com/user-attachments/assets/dddae1c0-cded-483a-9c84-8b59096d1880

From iterations

Note: Quarkdown loops return a collection of values, pretty much like a mapping.

.xychart
    .repeat {100}
        .1::pow {2}::divide {100}
    
    .repeat {100}
        .1::logn::multiply {10}

Result: https://github.com/user-attachments/assets/c27f6f8f-fb38-4d97-81ac-46da19b719e3

Note 2: .1 refers to the positionally-first implicit lambda argument. It can be made explicit with the following syntax:

.repeat {100}
    number:
    .number::pow {2}::divide {100}

That's all

This was a summary of what's in the wiki page: XY charts. More details are available there.

I'm excited to hear your feedback, both about this new feature and the project itself!


I’ve never used it, but I know it’s a mature project with lots of packages. Quarkdown is young of course, but I see potential and that’s why I aim on working on it full time. Quarkdown’s core principle is having a flat learning curve, and I believe it does that greatly as it’s just Markdown, so pretty much any tech guy already knows how to use 90% of it. If you want to do some sophisticated scripting stuff there are some syntax extensions that should be easy to understand.

That said, I’m not trying to sell it. I’m not on a war with Typst (many think so for some reason) and you can pick whatever you want. But as an end user, I love using Quarkdown and that brings me big satisfaction.





You can show code with automatic syntax highlighting, but the output isn’t evaluated automatically. It is something I thought about but I need some time to design it securely and vulnerability-proof. Question: would you evaluate code at compile time or interactively with a button at runtime?















As mentioned, Quarkdown's (current) only target is HTML. Typst has of course much more material and packages due to its popularity, while this tool has been marked as stable just a couple months ago (development started in February), but I'm confident a community might grow around it.

Presentations built with Quarkdown (demo) are also based on Reveal, making them interactive and pleasing to the eye, with very little to envy from visual tools like Google Slides.

I believe Quarkdown's strength is its syntax: it's basically Markdown, which is already familiar to mostly everyone in the field, with a few syntax extensions. This flattens the learning curve a lot.

I haven't personally used Typst, I'm using Quarkdown as an end user for some university reports and I feel it's smooth and I'm super comfortable with it (just lacking some IDE plugin!)














Thanks for the interesting question. The project is still in its early days and quite immature so I haven't heavily thought about that. However a Quarkdown source is compiled to a static HTML page which is supposed to be safe. Quarkdown source is not intended to be embedded in web pages nor evaluated on the client side.


Quarkdown: Markdown with superpowers for complex documents Quarkdown: Markdown with superpowers for complex documents

Hi y'all! I made Quarkdown, a parser and renderer that makes Markdown Turing complete by introducing functions. The goal is to allow full control over the document structure, layout and aesthetics - pretty much like LaTeX, just (a lot) more readable.

A Quarkdown project can be exported to HTML as a plain document, a presentation or a book.

Here you can find a demo presentation about Quarkdown built with Quarkdown itself: https://iamgio.eu/quarkdown/demo.
The source code of the presentation is here.

Here's the repository: https://github.com/iamgio/quarkdown

Any feedback is much appreciated - thank you!



I haven’t used Typst, but from what I can see:

  • Quarkdown is an extension of CommonMark/GFM, while Typst has its own syntax. I think it’s a bonus in terms of UX for new users

  • Typst is mostly used for articles, exported to PDF. Quarkdown’s current focus is on HTML presentations, with stable article/book support coming soon.

Other than that I have no direct experience with Typst, so if anyone knows something more, please tell!



First of all, thank you for the constructive criticism.

Regarding the period, I must admit I took this decision quite quickly because I think it’s the easiest symbol to type. I thought/think a backslash or similar (typst uses # which requires two keys) would feel way too unnatural to type in a language that aims to be simple and concise. You’re right and I get your point, but at the end of the day I think it’s personal preference? I personally like it - maybe let’s hear someone else?

As for the named arguments… I don’t really get why the current syntax is confusing. Isn’t something like .row alignment:{center} gap:{2cm} easy to read?


Hi, project author here. Here’s my response to a similar comment from the original post:

LaTeX alternatives have existed for a long time - this is my attempt, with the goal of being easy to write (which we know isn’t LaTeX’s strong suit). Just to be clear, I’m not “competing” with it: even if Quarkdown supports exporting to PDF someday, it’s going to be through LaTeX.

In short, Quarkdown aims at being a trade off between LaTeX’s full control and Markdown’s simplicity.