HNHacker News
TopNewBestAskShowJobs

Xurinos

1,510 karma · joined February 23, 2010

Admin for the Dark Mists MUD at http://www.darkmists.org (telnet to port 2222)
submissionscomments
Xurinos··on LispyScript: A JavaScript With Lispy Syntax And Macros
For Common Lisp to support converting [1 2 3] to a vector:

  ; [] to #()
  (defun bracket-reader (stream char)
    (declare (ignore char))
      `(vector ,@(read-delimited-list #\] stream t)))
  (set-macro-character #\[ #'bracket-reader)
  (set-syntax-from-char #\] #\))
And for your in-place hash:

  ; {} to hash
  (defun set-hash-values (hash pairs)
    (when pairs
      (setf (gethash (car pairs) hash) (cadr pairs))
      (set-hash-values hash (cddr pairs))))
  
  (defun in-place-hash (stream char)
    (declare (ignore char))
      `(let ((hash (make-hash-table)))
         (set-hash-values hash ',(read-delimited-list #\} stream t))
         hash))
  
  (set-macro-character #\{ #'in-place-hash)
  (set-syntax-from-char #\} #\))
I just sketched these together. I am a CL noob. No doubt there are more concise approaches.
Xurinos··on LispyScript: A JavaScript With Lispy Syntax And Macros
What I get for not penetrating further than the examples. Yay!
Xurinos··on LispyScript: A JavaScript With Lispy Syntax And Macros
I experience a kind of jolt when I read lispy syntax mixed with constructs like [1, 2, 3]. It shouldn't be a big step to make a syntax for #(1 2 3) or (make-array 1 2 3) instead. Get rid of that infix comma syntax! Then there is the record syntax... {foo: 3, bar: 4}... Infix commas and colons! How about (make-object foo 3 bar 4) or #O(foo 3 bar 4)? Or support reader macros so that you can override []s and {}s to do something a little prettier.
Xurinos··on How I cracked my neighbor's WiFi password without breaking a sweat
One should change passwords on an irregular basis (a regular basis is weaker protection than an irregular basis). This is just an additional layer of security, not a perfection. If the password has ever been compromised, a password change policy removes the key from bad hands. Discovered passwords are not always immediately used; in many situations, they are stored for later use, perhaps even sold/traded.
Xurinos··on Show HN: A date range picker for Twitter Bootstrap
Wow, that component's approach is a nice idea. That component ALSO handles keyboard changes to the date.
Xurinos··on Show HN: A date range picker for Twitter Bootstrap
To add to this...

http://filamentgroup.com/lab/date_range_picker_using_jquery_...

Same one? Seems to have a slick interface that does not require an apply button, does provide ranges and customizable range options, although it does not have easy keyboard input either.

Xurinos··on Show HN: A date range picker for Twitter Bootstrap
I have to do a ton of clicking to get to last year. It would be much faster to be able to type in arbitrary dates, too, and have the calendars update to reflect those new dates. And when I altered the date text in the editable field (the one you click to drop down the calendars), they did not honor my change; to be consistent, that field should also be readonly.
Xurinos··on Browserver: a node.js HTTP server, in your browser
My hope is an answer to this problem that is so easy that my computer-phobic grandmother can do it: https://xkcd.com/949/
Xurinos··on Don’t Lie On Your Resume, But Lie Like Hell During Your Exit Interview
If a girl asked you if she was fat (and she was) are you going to tell her that she is fat?

An old coworker of mine had some fun advice... He said if his wife asked if some outfit made her look fat, and it did, then he would say so. He would tell her what he didn't like. As a result, he doesn't have a fat wife with ugly clothing (and he retains a wife).

I value an honest relationship, not one covered in cute little "white" lies. People who deal with me come to understand that. For them, it must be refreshing to not have to question my motivations, to wonder if I really mean what I say. And if I care about them, I am surely doing them more good by answering honestly.

Never confuse honesty with poor delivery. "Heck yeah, you look like a fat, sweaty, slobbering pig." The right words depend on your relationship. You can be sensitive to that person's needs and answer the question they really asked.

So perhaps that was a poor analogy. With regards to the exit interview, I think there is something to be said for focusing on the positive and trying to keep the emotions in check while presenting more objective responses.

Xurinos··on PrismJS
2) Do you really need jQuery there? You seem to be using it only for the html method, and including 93K extra JS instead of just using innerHTML seems a bit overkill.

It checks for the case that .innerHTML setting is not supported (I think that was for certain versions of IE) and switches to using appendChild(). I think that that small oversight is somewhat reasonable justification for using a wrapper that abstracts away the browser differences, although it can be argued that once someone understands the differences, they could just add the use cases to their code.

Xurinos··on The Gentleperson's Guide To Forum Spies
For humor, I started to read responses here on H/N to see how they match up.

> I had problems reading all of this because the tin foil hat I'm wearing kept slipping down over my eyes.

From the article: "5. Sidetrack opponents with name calling and ridicule. This is also known as the primary 'attack the messenger' ploy, though other methods qualify as variants of that approach. Associate opponents with unpopular titles such as 'kooks', 'right-wing', 'liberal', 'left-wing', 'terrorists', 'conspiracy buffs', 'radicals', 'militia', 'racists', 'religious fanatics', 'sexual deviates', and so forth. This makes others shrink from support out of fear of gaining the same label, and you avoid dealing with issues."

Overall, well-done on this post.

In support, I would say that it is fairly easy, depending upon your perspective, to apply most of the various "rules" in this article to about everyone's post.

Xurinos··on Choosing an ORM strategy
To the folks putting down ORMs: what is your alternative to solve the same problems? (A positive note would be nice.) For my work, using something with a Data Mapper strategy has been useful.
Xurinos··on How I accidentally got into someone else’s gmail account
It is. :( I have few accounts on the net, so I have rarely run into this except on sites I do not care much about. However, I understand others differ in habit. It is hard enough to remember one password per account.
Xurinos··on How I accidentally got into someone else’s gmail account
I agree. I put random garbage in the security question answers, a password so hard to crack that even I never remember it. ;) In other words, I opt out whenever I get the chance.
Xurinos··on OOP vs Procedural Code
As I recall in my reading of SICP, one of the first big chapters actually hints towards OOP but has you designing it from the ground up. They never call it OOP, but it is heavily leaning towards it; they just happened to set it up using closures (see relevant humorous quotes below). I am referring to the stuff about setting up a virtual function table that switches to the appropriate method based on the type of the data so that multiple developers can write their own way while honoring agreed interfaces/protocols.

"Objects are a poor man's closures." -- Norman Adams (?)

"Closures are a poor man's objects." -- Christian Queinnec (?)

Xurinos··on OOP vs Procedural Code
Procedural has a static state of flow working from the program controling the data and OOP has a lose state of flow working with the data controlling the program. Would that be a easier true definition?

No. (What is "static" vs "loose"? :)) Procedural programming is a control flow pattern. OOP is a data arrangement pattern. You may be thinking of GUI systems with single-threaded control loops and callbacks, which is another kind of control flow pattern, but it is orthogonal to OOP. People who use OOP can, within the methods or in calls to their objects, use a procedural approach, a functional approach, and/or a callback approach. For different control flows, there are sometimes more appropriate/maintainable data arrangements.

Xurinos··on A Review of MVC
Here are a couple of the reports:

Including Thing: http://heim.ifi.uio.no/~trygver/1979/mvc-1/1979-05-MVC.pdf

Revision: http://heim.ifi.uio.no/~trygver/1979/mvc-2/1979-12-MVC.pdf

Xurinos··on MVC, MOVE - Or Simply A State Machine?
archive.org helped me find this link: http://web.archive.org/web/20110612045555/http://www.wisdom....
Xurinos··on Lookup any software license shortly summarized in plain English
I wonder if anyone on Hacker News does the excellent service of doublechecking linked pages for attempted nastiness.
Xurinos··on MVC is dead, it's time to MOVE on
I found a blog post that gives a rundown on the evolution of MVC (https://billkrat.wordpress.com/2010/12/23/hello-world/) and links something similar to the document I had originally read (http://heim.ifi.uio.no/~trygver/1979/mvc-2/1979-12-MVC.pdf). I think I had originally found something that was more of a prototype of this document, but the wording appears to be the same and more succinct. The blog post also links to an earlier version of the MVC model that included a fourth part, a "Thing".

One thing I found interesting in the blog article was the notion of "smart controls", but I can rationalize that away as another MVC module; after all, the Windows OS itself is handling all the interesting behavior, and the GUI app is borrowing the behavior. Depending on the toolkit that interfaces with the "smart controls", we get access to events (mousedown, keypress, etc) that can serve as input to one of our application's controllers.

Xurinos··on MVC is dead, it's time to MOVE on
Naturally, I meant nothing personal to you. Would a bug report suffice? ;)
Xurinos··on MVC is dead, it's time to MOVE on
I suspect this is because most people do not actually understand what MVC is and how it applies to server-client relationships; in fact, the wikipedia article on MVC is slightly off on the subject, assuming one accepts the original Xerox description as a source. Try not to wrap the entire complicated application into one big MVC umbrella because that will just confuse. There are actually multiple processes involved, and each has its own MVC.

The big epiphany for me was when I realized that the server has its own MVC, and the browser has its own MVC. The server's output is the View for the server and the Model for the browser. For a complex set of objects in a given Model, the final output of those objects is their View, and the consumer of that output uses it as a Model. In theory, any View can be a Model for the thing accepting the View, so in a complex system, you have a chain of MVCs.

And one can further imagine that applets written in JavaScript have their own MVC unit.

I work on complicated, large-data web apps sometimes daily. MVC has been a fine model for them and has kept my group's organization clean and modular.

Xurinos··on Getting started with with Ember.js
Well, if he's like me, he has it selectively enabled/whitelisted for trusted sites (NoScript or Chrome's JS settings).
Xurinos··on Getting started with with Ember.js
He has JavaScript disabled. The code samples are provided by github's gist stuff. It's an interesting example of JavaScript being used to render rather than enhance, complete with a lack of graceful fail.
Xurinos··on What Makes Great Programmers Different?
Am I the only one who feels like commentary that categorizes "good" and "bad" programmers is unhelpful? One can make a good case for somebody having more appreciable traits than another, but I would be loathe to call either "good" or "bad", even in comparison to each other. This kind of labeling is just namecalling, more harmful than helpful, a stroking of egos.

The reality is that different people have varying strengths and weaknesses for specific tasks; people have different rates of personal development in different areas. It is not a matter of "good programmer" vs "bad programmer"; it is a matter of "That person can do that task in a better way than I can" or "That person can do that task more efficiently than I can" by some perceived measure of "better" and "efficient". The comparisons between people are relative, not absolute, and divided across many kinds of traits.

However, this article does bring up a number of traits that many of us can probably agree with as "goals to achieve in personal development". For that, it has great conversation value. Personally, I like the notion that memory might be correlated to some quality of design and output.

If I were to pick a trait of importance for a programmer, it would be "Consistently improves bottom line growth." Things that factor into that might be "Writes maintainable code" and "Knows his tools well", but it is debatable that these subtraits have a clear correlation with "bottom line growth". Has anyone actually measured these things?

Xurinos··on Lucid dreaming: Rise of a nocturnal hobby
I used to have nightmares. I had died from falling, been injected with deadly painful poison, been shot up by various kinds of projectiles, or simply kept running. I built up a certain confidence in my waking life and my dream life where, rather than run from or be taken out by the enemy, I eagerly hunted them instead when they manifested. I tackle problems head-on and face danger boldly. In the dreamworld, in spite of the initial spark of fear, it is enough that I suddenly start doing the extraordinary, be it shrugging off bullets and lasers, becoming immune to poison, or sending out waves of power to overcome my foes. I once stopped an elevator from crashing on the ground while I was in it (that situation required a replay because something in me did not like how it ended when I started to escape to the waking world). After the first time I turned a situation around, it became easier. In a way, you could compare my attitude/behavior change to the light switch and watch check; it just became a part of my psyche to defy the darkness. I do not bother to actively control the dream, though: I just respond in kind to the events and take as much control as I need in order to succeed. Once success is met, the dream usually changes, and I am adrift again. "Well, we didn't get him this time..."
Xurinos··on A safer git checkout
It becomes dangerous if you have changes in your working tree. You truly lose those changes with a "git reset --hard HEAD" or the forced checkout.
Xurinos··on A safer git checkout
It's funny -- I think this is where some of the conflict lies. With git, you can do a bunch of commits with crappy comments and then, when you are ready to publicize it (push, whatever), you can use rebase to pretty up your commit history. In other words, I take the analogy of "crappy commits" to "crappy code" a step further: the commit history is another document that is to be presented to other developers; make it helpful!
Xurinos··on Google Begins Testing Its Augmented Reality Glasses
What scares me is there is next to no choice on buying these, particularly if they are fast. There is an extreme advantage to people having easy access to information as it is presented in the video. Moreso than smartphones, it is a game changer.
Xurinos··on Humans hot, sweaty, natural-born runners
Thank you... This seems like one of those basic things we should learn in elementary school -- the healing rates of various parts of our body. We should know what needs the most protection/care. I still do not know that information, and it seems that somebody has to be damaged in order for others to learn about it. Mentally putting "ligaments and knee cartilage" on my list of things to be careful about. I didn't know there was no regeneration there. :(
← PreviousPage 2 of 16Next →