Hacker Newsnew | past | comments | ask | show | jobs | submit | nemoniac's commentslogin

Is there any indication of what the performance hit for this might be?

uvx cinecli search "star wars"


You can run it in Racket with the SICP language.

https://docs.racket-lang.org/sicp-manual/SICP_Language.html


Ah, nice, I'll try that. SICM in particular relies on numerical routines and things for scientific computing that this perhaps doesn't cover. We'll see. Thanks!


Someone ported the sicm/scmutils code to Racket: https://github.com/bdeket/rktsicm


I think, this is the best way of running the SICM programs.


The author references is in the sectino on Further Reading


Hm, thanks, I somehow missed it the first look around.


> Almost everything I might achieve with an MCP can be handled by a CLI tool instead.

That's the pull quote right there.


The line that stood out for me was that "a 4-hour session of AI coding is more cognitively intense than a 4-hour session of non-AI coding."

Many programmers are rejecting AI coding because they miss the challenge they enjoy getting from conventional programming but this author finds it even more challenging. Or perhaps challenging in a different way?


I think there are (at least) two types of programmer - I am the kind of programmer who wants everything done right. Others don't care as long as it works and the boss is happy.

I suspect that the type of programmer who enjoys vibe coding is the latter. For me it's pretty tiring to explain everything in excruciating detail, it's often easier to just write the code myself rather than explain in English how to write it.

It feels like I am just doing the hard part of programming all the time - deciding how the app should work and how the code should be structured etc, and I never get those breaks where I just implement my plan.


I suspect the difference lies in people who think in code versus people who translate their thoughts into code

I think in code and programming concepts when I am writing software . I don't really know how to explain that, but I don't often feel like there is any friction between my thoughts and the code I make

I think that many coders do not have this. They have an extra "translation" step that introduces friction into their workflow

I don't experience this friction, so LLM coding introduces new friction that I don't like

They do experience this friction, so LLM coding doesn't introduce new friction for them, it may transform their previous friction into a new form that is easier for them to navigate

I don't know. Maybe I'm talking out my ass, this is just a random theory based on no real evidence


Another datapoint of one.

It's not really that I think in code. It's more like code is as much as a language to me as writing english, or holding the pencil to draw something. I got a change request, or I read something from the docs, and the the mental concept I have realign itself to the new knowledge. Getting code out is always effortless. There's no difference between

  return the list of names of all the books that have the fantasy tag
And

  return books.filter(b -> b.tags.contains('fantasy')).map(b -> b.name)
If I can describe something, I can code it.


This is it for me as well. It comes down to which is quicker to write. If I need an exact solution or implementation, then I just write it, because the code is significantly more efficient to describe the problem in than in plain english. An exception being visual things like plots, if we just care about a way to get to a plot, vague english is fine and likely less effort than writing code.

i.e. function to calculate things, just write it; want to plot some data, vibe it. I can see immediatly if its not quite right and in a line can ask for the change i needed, zero cognitive effort required to fix issue, and hey presto, we have what we want.

i think this stems from the fact natural language is generally quite inefficent for logical statements / arguments / instructions but can gather visual ideas far more efficiently than code can.


Yes, this is exactly what I mean when I say "thinking in code". I feel it isn't accurate either, but it was the best way I had to describe it

More or less just that there is little to no friction for me to think a thought and write the code compared to "translating" the thought into code


There is a distinction I believe between challenging and focusing. The difference lies in difficulty (the former being more dificult) and workload (the latter being more intellectualy labor intensive), which is an interesting approach to intellectual menial labor as distinct from intellectual craft.


If you know how to do it well, you just do it well, its hard work but dooable. What is harder is learning to understand why what was written, that looks good, is actually bad. Usually something small, tucked away, or an issue arising from multiple things spanning distinct functions that culminate in a werid issue. That kind of detective work is draining and time consuming. It doesnt come with the emotional boost of looking at your work and feeling pride. Instead you look at something that finally works and feel releif that its over. That alone paves the way to a totally different emotional and cognitive relationship with your work. That is why for me, at least, it is more cogntiviely intense.


The first code example on that page claims to solve "the 3SUM problem".

According to [1], "the 3SUM problem asks if a given set of n real numbers contains three elements that sum to zero."

It's not clear to me what problem the Janet code solves but it's clearly not that 3SUM problem.

On the example input of

    @[2 4 1 3 8 7 -3 -1 12 -5 -8]
it outputs

    @[@[6 1 7] @[2 5 10] @[1 2 9] @[4 6 9] @[3 0 9] @[6 2 0]]
For what it's worth, here's some Common Lisp code that does solve the 3SUM problem in O(n^2).

    (defun 3sum (a)
      (let ((h (make-hash-table))
            (len (length a)))
        (dotimes (i len)
          (setf (gethash (aref a i) h) t))
        (dotimes (i len)
          (dotimes (j i)
            (when (gethash (- (+ (aref a i) (aref a j))) h)
              (return-from 3sum t))))))
    
    (3sum #(2 4 1 3 8 7 -3 -1 12 -5 -8))
    ;; => t

[1] https://en.wikipedia.org/wiki/3SUM


It outputs the indices corresponding to the solution. E.g.

    @[6 1 7]  == A[6], A[1], A[7] == -3, 4, -1
    @[2 5 10] ==                  ==  1, 7, -8


If you want a one line code, in J, for the 42 solutions:

   _ 11 11 #:,I. 0=,a+/,+/~  a=: 2 4 1 3 8 7 _3 _1 12 _5 _8
Or the 8 solutions in a 2x12 matrix:

   2 12 $, ~. (/:~)"1 ({&a)  _ 11 11 #:,I. 0=,a+/,+/~  a=: 2   4 1 3 8 7 _3 _1 12 _5 _8

   _3 1 2 _5  2 3 _1 _1 2 _8  4 4
   _5 1 4 _3 _1 4 _8  1 7 _5 _3 8


Here's a tidied up version of the Python code to generate the MRZ from the passport data. It also corrects a padding error.

    https://pastebin.com/k0Tty22a
My Dutch driver's licence has a single MRZ-like line across the bottom. It seems to encode the country and licence number but I can't make any sense of the rest of the line. Anyone have any leads?


I haven't found the docs for the Dutch version but this article shows the content of the MRZ of a French drivers license. They seem to match the Dutch ones as well.

https://trustdochub.com/en/mrz-strip-french-driving-licence/...


Only partially. At least for my Dutch licence. It contains neither holder's last name nor end date.

It does start with D1NLD. Then a single digit which is not the checksum of the foregoing (using the passport checksum algorithm). Then the document number. Then some letters and numbers I can't make any sense of. It ends with a correct global checksum for all of the foregoing.


See the spec I mentioned. But here's an excerpt. https://upload.disroot.org/r/Y_vdT16A#cW4coNxPvTJN6b8InO5cHW...


Drivers licenses aren't ICAO 9303 compliant. For EU documents a separate spec is being used (NEN-ISO-IEC 18013-3). Small pointer: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CEL...

Context: Made an implementation for reading these when Dutch drivers license model with NFC first came available (model 2014 if I remember correctly)


Direct TLS can speed up your postgreSQL connection


True, it can help Microsoft SQL Server as well. In SQL Server 2022, they finally added Strict Encryption. I'm glad to see more databases are removing these strange STARTTLS like features.


And mostly if you are behind CISCO firewall during TLS Server Identity Discovery or some equivalent setup. 3 seconds mentioned in the article were coming mostly from that. From the text itself it's not clear how much gains come from sslnegotiation=direct itself (if we assume no other factors like those present in this case).


For those interested - I've checked and observed a difference of 0.2ms on average across 1000 connection attempts on localhost.


Localhost is the least interesting place to measure a roundtrip delay.


Fair point, but it's a place with some useful properties.

All the rest of the effect will depend on the specifics of your network. Observing the impact on localhost shows scale of the effect that does not come from the network (more or less) and puts a lower bound on its size one can expect in more realistic conditions.


Even without Cisco meddling, sslnegotiation=direct saves a roundtrip.


Why does a browser have to be in the loop?


Because the browser knows the internet domain that the login/registration is for. And the browser also provides the JavaScript API to talk to the authenticator (navigator.credentials.create and navigator.credentials.get).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: