HNHacker News
TopNewBestAskShowJobs

gabrielsroka

1,477 karma · joined March 9, 2020

  // JavaScript
  const contactInfo = {
    email: `${id}@gmail.com`,
    web: `https://${id}.github.io`
  };

Drag this to the bookmark bar, then click it:

  javascript:alert(`${new URLSearchParams(location.search).get('id')}@gmail.com`) //My email



   ####    ##   #####  #####  # ###### #     
  #    #  #  #  #    # #    # # #      #     
  #      #    # #####  #    # # #####  #     
  #  ### ###### #    # #####  # #      #     
  #    # #    # #    # #   #  # #      #     
   ####  #    # #####  #    # # ###### ######
  
   ####  #####   ####  #    #   ##  
  #      #    # #    # #   #   #  # 
   ####  #    # #    # ####   #    #
       # #####  #    # #  #   ######
  #    # #   #  #    # #   #  #    #
   ####  #    #  ####  #    # #    #
  
  
         <! . . . . . . . . . .!>
         <! . . . . . . . . . .!>
         <! . . . . . . . . . .!>
         <! . . . . . . . . . .!>
         <! . . . . . . . . . .!>
         <! . . . . . . . . . .!>
         <! . . . .[][][] . . .!>
         <! . . . . . .[] . . .!>
         <! . . . . . . . . . .!>
         <! . . . . . . . . . .!>
  [][][] <! . . . . . . . . . .!>
    []   <! . . . . . . . . . .!>
         <! . . . . . . . . . .!>
         <! . . . .[][] . . . .!>
         <! . . . .[][] . . . .!>
         <! . . .[][][][] . . .!>
         <! .[][] .[][][] . .[]!>
         <! .[][] .[] . . .[][]!>
         <![][][] .[][][][][][]!>
         <![][][][] . .[][][][]!>
         <!====================!>
           \/\/\/\/\/\/\/\/\/\/
  
  
  pacmanpacmanpacmanpacmanpacmanpacmanpacmanpacmanpacman
  ===============================================.
      .-.   .-.     .--.                         |
     | OO| | OO|   / _.-' .-.   .-.  .-.   .''.  |
     |   | |   |   \  '-. '-'   '-'  '-'   '..'  |
     '^^^' '^^^'    '--'                         |
  ==============.  .-.  .================.  .-.  |
                | |   | |                |  '-'  |
                | |   | |                |       |
                | ':-:' |                |  .-.  |
                |  '-'  |                |  '-'  |
  =============='       '================'       |
submissionscomments
gabrielsroka··on Modern jet engine turbines: each blade a single crystal (2015)
Veritasium https://youtu.be/QtxVdC7pBQM
gabrielsroka··on High energy sports drinks boost performance even if you spit them out
2009
gabrielsroka·
·on The PowerShell-Haters Handbook
2020

> PowerShell scripts require all subroutines to be defined before they can be called

True but so do Python and other languages. My solution is to put main at the top and then the very last line of the file calls main.

> "New" as a verb

Look in your File menu.

> PowerShell ISE

Was put in maintenance mode in 2017, 3 years before this article was written. Granted it still comes bundled in Windows. It actually has some great features, but also many quirks. New work is done in Visual Studio Code.

Many of the rants could be made against other languages. I admit PowerShell is not perfect, but there are some really cool things about it.

Bjarne Stroustrup, the creator of C++, is famous for the quote: "There are only two kinds of languages: the ones people complain about and the ones nobody uses".

gabrielsroka··on Anthropic takes $5B from Amazon and pledges $100B in cloud spending in return
$25B https://news.ycombinator.com/item?id=47844891
gabrielsroka··on Ask HN: Best books on building a programming language
Related? An AI lang from the creator of Kotlin

https://codespeak.dev

gabrielsroka··on News is bad for you (2013)
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
gabrielsroka··on YouTube Premium just went up to $15.99 / mo (US)
Chromecast mirror, or HDMI
gabrielsroka··on Google's AI Overviews spew false answers per hour, bombshell study reveals
https://news.ycombinator.com/newsguidelines.html#:~:text=gra...

And https://news.ycombinator.com/item?id=45613253

Etc

gabrielsroka··on A complete GPT language model in ~600 lines of C#, zero dependencies
> Faithful port of Andrej Karpathy's microgpt.py.
gabrielsroka··on Show HN: LLMnesia – search across ChatGPT, Claude, Gemini chats locally
You can download your conversations.json file.

Or JS to call Claude's APIs (from the browser) to see/search/download old conversations. there's more to it than this, but it's a start:

    const search = 'fetch =';
    
    console.clear();
    const org = intercomSettings.lastActiveOrgUuid;
    for (var o = 0; ; o += 30) {
        const r = await fetch(`/api/organizations/${org}/chat_conversations_v2?limit=30&offset=${o}&consistency=eventual`);
        const ccs = await r.json();
        ccs.data.forEach(async cc => {
            const r = await fetch(`/api/organizations/${org}/chat_conversations/${cc.uuid}?tree=True&rendering_mode=messages&render_all_tools=true&consistency=strong`);
            const c = await r.json();
            for (const cm of c.chat_messages) {
                for (const co of cm.content) {
                    if (co.text?.includes(search)) {
                        console.log('https://claude.ai/chat/' + c.uuid, c.name);
                        console.log(co.text);
                    }
                }
            }
        });
        if (!ccs.has_more) break;
    }
gabrielsroka··on The house is a work of art: Frank Lloyd Wright
https://archive.org/details/frank-lloyd-wright-ken-burns
gabrielsroka··on What came after the 486?
Trademarks

> The name invoked the number five, but was completely trademarkable, unlike the number 586.

gabrielsroka··on The OG MAGA: Make Apple Great Again (From Steve Job's Speech Itself)
It's at 8:30 in that video. But Reagan said it before Steve did
gabrielsroka··on CBM-BASIC: Commodore BASIC–style interpreter written in C
Related https://github.com/mist64/cbmbasic From 2008 https://www.pagetable.com/?p=48
gabrielsroka··on Why the global elite gave up on spelling and grammar
> misstake

I see what you did there. See also https://en.wikipedia.org/wiki/Muphry%27s_law

gabrielsroka··on HyperCard Changed Everything [video]
Dupe of https://news.ycombinator.com/item?id=47214572
gabrielsroka··on 4,500 Physicians Agree (About Bacon)
Related, by Adam Curtis

https://en.wikipedia.org/wiki/The_Century_of_the_Self

It's on YT...

gabrielsroka··on Stephen Colbert going down swinging
It has 6 million views as of noon Pacific time

https://youtu.be/oiTJ7Pz_59A

gabrielsroka··on Roger Ebert Reviews "The Shawshank Redemption" (1999)
He also reviewed it in 1994 but only gave it three and a half stars

https://www.rogerebert.com/reviews/the-shawshank-redemption-...

gabrielsroka··on Man who videotaped himself BASE jumping in Yosemite arrested, says it was AI
Isn't that similar to this?

https://en.wikipedia.org/wiki/Content_Authenticity_Initiativ...

gabrielsroka··on SpaceX Acquires xAI in $1.25T All-Stock Deal
Actual title: Elon Musk's SpaceX acquiring AI startup xAI ahead of potential IPO

> The combined company is expected to price shares in an IPO that would value it at $1.25 trillion

gabrielsroka··on Apple-1 Computer Prototype Board #0 sold for $2.75M
$666.66
gabrielsroka··on ShinyHunters claims Okta customer breaches, leaks data belonging to 3 orgs
Dupe https://news.ycombinator.com/item?id=46743948
gabrielsroka··on Ask HN: Weekend Social: Top two programming languages and what they can borrow?
1. JS, Python

2. [i know u said 1, but there's so many] JS->Py: Looser type handling, nicer syntax for dicts. Py->JS: Less punctuation, comprehensions

3. I created a hybrid called Pith (https://news.ycombinator.com/item?id=46637033). JS with some nice Python features.

Appendix (Nov 2021)

A version of Python (call it "Pith" [0]) that fixes the annoying things, eg:

no colons

  if bool:
  # should be
  if bool
  
  for thing in things:
  # should be
  for thing in things
nicer dicts

  a_dict['prop']
  # should be
  a_dict.prop
shorter dicts

  a_dict = {'name': 'value'}
  # should be
  a_dict = {name: 'value'} # like in js
  # even
  a_dict = {content-type: 'json'} # ooh, ahh !
auto main function

  if __blah_blah_blah__ == '__main__' # dunder-struck ?
      main()
  # should be
  # nothing -- it just calls main() if it's there
dict.get(prop) by default

  # instead of
  a_dict.get('prop')
  # it should be like JS that returns undefined or None or something nullish or falsey
  a_dict.prop
ternary

  v = a if this else b # barf
  # should be
  v = this ? a : b
  # or (to steal from VB)
  v = iif(this, a, b)
  
  # maybe fix list/dict-compros, too, while i'm at it
elif? elf? what the helf ?

  elif x:
  # should be
  else if x # like any decent language
W T F-string?

  f'{huh}'
  # should be
  `{huh}` # like JS
len (like it's BASIC)

  len(a_string)
  # sb
  a_string.length
a longer example

  # Regular Python              | # Pith uses less punctuation
                                |
  def main():                   | def main
      a_dict = {                |     a_dict =
          'name': 'value'       |         name: 'value' # maybe use = instead of :
      }                         |
      if True:                  |     if true
          print(a_dict['name']) |         print a_dict.name
      elif 1 > 2:               |     else if 1 > 2
          print('ooh')          |         print 'ooh'
                                |  
  main()                        | # no need to call main()
i also like how JS allows you to call a function before it's defined (but Python doesn't -- why !!!)

maybe add a do/while loop, multi-line comments ###, JS-style regex /reg/ instead of r"regex" blah blah blah

etc, etc, etc

it could be a preprocessor (like the C Preprocessor) that takes Pith and converts it to Python

for JS, take out parens, curly braces, semicolons, etc (make it "look" more like Pith)

i know these changes are fraught with peril, but i don't care (do i?). there's no reason (is there?) that i should be stuck with Guido's or Brendan's design choices [1] (i can make my own :) )

i even had an idea that you could write a program in Pith and it could output either Python or JS (or anything else). that might need a little more thought

[0] "Pith" is prolly already in use by something else, just humour me

[1] that's the bigger idea here -- take a language you like, fix all the things you don't like about it. maybe lisp with fewer parens

gabrielsroka··on Just because Linus Torvalds vibe codes doesn't mean it's a good idea
Dupe https://news.ycombinator.com/item?id=46678758
gabrielsroka··on The File System API is so underrated
i'm using it here

https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...

it works on Chrome/Chrome for Android, but Brave requires a flag (brave://flags/#file-system-access-api), and i don't think Brave for Android supports it

gabrielsroka··on Altaid 8800 (2024)
This goes back to at least 2017 per archive.org
gabrielsroka··on The $LANG Programming Language
My "Pith" programming language didn't make the cut

https://news.ycombinator.com/item?id=32681150

Webpage using Pith instead of JavaScript to fetch HN Polls using the HN Search API

https://gabrielsroka.github.io/hnpolls_pith.html

Source

https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...

gabrielsroka··on Show HN: Is this the best epoch converter?
> Don't solicit upvotes

https://news.ycombinator.com/newsguidelines.html

gabrielsroka··on Cardiovascular disease is a solved problem
> About 10% of people develop muscle aches

> Concerns about statin effects on the brain, such as cognitive impairment or dementia, are unfounded

https://www.health.harvard.edu/heart-health/what-are-the-ris...

← PreviousPage 5 of 34Next →