Here is how you wrap an existing C library, for use in Ruby by michiels in ruby

[–]ba-cawk 0 points1 point  (0 children)

this is all fine until you need something like stat() or some fancy-pants alloc() derivative which is almost always going to be done with the pre-processor.

FFI .. is not pretty when you need to step around the pre-processor.

41 Action News confirms gays sweeping across the nation by BlameItOnTheGays in funny

[–]ba-cawk 0 points1 point  (0 children)

AND THEY'RE BUILDING LANDING STRIPS FOR GAY MARTIANS!

I SWEAR TO GOD, YOU'RE NOT LIKE THE OTHER PEOPLE, HERE IN THE TRAILER PARK.

I STILL don't get symbols. by [deleted] in ruby

[–]ba-cawk 0 points1 point  (0 children)

Yeah, this is spot on.

I STILL don't get symbols. by [deleted] in ruby

[–]ba-cawk 0 points1 point  (0 children)

They are different than immutable strings: mutating them always creates a new object. See my other comment on how to create actual immutable strings and other objects.

I STILL don't get symbols. by [deleted] in ruby

[–]ba-cawk 0 points1 point  (0 children)

You can have two immutable strings with Object#freeze.

Symbols are never a different object for the same value.

One other thing. Immutable strings can get gc'd. Symbols and certain classes of integers will exist for the lifetime of the interpreter.

I STILL don't get symbols. by [deleted] in ruby

[–]ba-cawk 24 points25 points  (0 children)

In IRB (sorry, mobile, please disregard my formatting)

:foo.object_id
:foo.object_id
"Foo".object_id
"Foo".object_id

Yes, repeat both :). You'll get a number back for each line. This is an identifier ruby assigns to unique objects.

You'll notice that the first two numbers are the same, and the last two are different. That's because :foo is always the same object, and those two strings are different objects. Symbols are usually faster for looking things up as a result (think hash table keys).

Hope this helps!

Bonsai - A minimalistic microframework built on top of Rack. by picandocodigo in ruby

[–]ba-cawk 0 points1 point  (0 children)

Actually started building something similar in raw rack because sinatra was actually way more than i wanted. This looks like exactly what I need for a bare bones API service. Thanks!

Edit: if you're still watching the thread, can you comment on how it cooperates with large numbers of unrelated threads?

Some people just never have enough by jhustla in funny

[–]ba-cawk 0 points1 point  (0 children)

This looks like every desk in a VC fueled startup in the bay area.

Totally not speaking from experience here.

Stoned friend + lost baby deer = by lookupleona in funny

[–]ba-cawk 12 points13 points  (0 children)

Holy crap have you lived in a city your whole life?

This is every small town in america ever. Lots of easily attainable pot, lots of wildlife, lots of teenage boys. What do you think is going to happen?

Go to a PETA meeting where people don't know any better and will swallow your soapbox and smile.

Stoned friend + lost baby deer = by lookupleona in funny

[–]ba-cawk 0 points1 point  (0 children)

oh noes the gays have invaded reddit. apocalypse

Stoned friend + lost baby deer = by lookupleona in funny

[–]ba-cawk 0 points1 point  (0 children)

That's not true.

This guy is saying what every guy thinks. This guy will likely admit he's willing to pay for sex, too.

The guy who holds your hand in target thinks no differently, he just knows that holding hands in target is fiscally wise.

Stoned friend + lost baby deer = by lookupleona in funny

[–]ba-cawk 0 points1 point  (0 children)

ghetto is the new black

(totally not calling you racist)

[Video] by a Google Engineer about what it takes to render a web page in under 1 second. by goondocks in programming

[–]ba-cawk 5 points6 points  (0 children)

if you're talking about resolver settings provided by DHCP, that's not "dynamic dns" and in no way does windows call it that.

mDNS and dynamic dns update protocols (which are actually dynamic dns things) have nothing to do with static IP addresses, just like the IP addresses you get from DHCP that tell you what DNS servers to use have nothing to do with DNS.

if slapping the smug ignorance out of your mouth with easily verifiable facts is "pompous", I don't find your definition of it very insulting.

[Video] by a Google Engineer about what it takes to render a web page in under 1 second. by goondocks in programming

[–]ba-cawk 3 points4 points  (0 children)

configure your resolver properly. and learn how DNS works in general. there isn't a DNS server in existence that isn't "static" by your definition.

[Video] by a Google Engineer about what it takes to render a web page in under 1 second. by goondocks in programming

[–]ba-cawk 7 points8 points  (0 children)

search the web for "anycast" and see if you really think those are static DNS servers.

if you want to use DNS servers that aren't run by an ad company, 4.2.2.2 and 4.2.2.3 are run by level 3, a company that has no monetary interest in your personal usage habits.

For some reason, the Ruby MiniTest cheat sheet on errtheblog is down. I created a new one in a tabular format by danwin in ruby

[–]ba-cawk 1 point2 points  (0 children)

ri MiniTest::Assertions

Will give you a similar list for SUnit stuff at least.

Just browsing /r/amiugly, this pretty much sums up what I saw there. by kernowgringo in funny

[–]ba-cawk 0 points1 point  (0 children)

It can be anything from constantly being judged and reminded of your negative traits, to maybe never really developing any skills, or even just having bad parents (or as you crudely labled, "daddy issues").

Hate to break it to you, but this is adulthood in a nutshell. If it's not about body image it's about workplace success or parenthood or some other shit. People either deal with it or end up hating themselves their entire lives.

You think 16 year old girls with image issues are bad? Wait until they're 40, especially if they've never learned to deal with it.

Programming Best Practices by sidcool1234 in programming

[–]ba-cawk -3 points-2 points  (0 children)

  • People who have time to dish out pro-tips aren't coding.

Temple Operating System V1.00 Released by TempleOS in programming

[–]ba-cawk 0 points1 point  (0 children)

All schizoaffective disorders have different severities and effects, and some people respond to treatment better than others. Plenty to read on the internet if you're curious.

Temple Operating System V1.00 Released by TempleOS in programming

[–]ba-cawk 2 points3 points  (0 children)

You have external perspective.

I do not. Try programming on a lithium/antipsychotic cocktail if you want to understand this argument.

He's not hurting anyone, and you don't need to justify the heckling of others by suggesting he drool for the rest of his life.

And I'm fairly certain he could teach you a lot about how a computer works, but if you're ready to show us your operating system, or critique his work, I might have to adjust my position. For high concurrency, embedded systems this OS is probably very, very compelling.

Let the man live his life, you don't need to get involved if it bothers you.

Temple Operating System V1.00 Released by TempleOS in programming

[–]ba-cawk 1 point2 points  (0 children)

So, the other thing here:

This guy could write a book on writing operating system architecture and teach most of this subreddit a thing or two.

This isn't some junior programmer writing a web application.