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

Smalltalk has #reject: which does that. You could, of course, just wrap a not around the test in the closure, but sometimes reject with a well-named predicate is easier to read.

bsnpApproved := tvShows reject: [ :eachShow | eachShow hasNaughtyContent ].


Ruby inject appears to be derived from Smalltalk #inject:into:

#(1 2 3 4 5 6 7) inject: 10 into: [ :sum :each | sum + each squared ].

or from your example:

someHash := myArray inject: (Dictionary new) into: [ :accumulator :item | ... ].

The way I remember the order is it reflects the assignment you'd do is a while loop, sum := sum + each.


The EMP effect depends on there being atmosphere to generate electrical fields from the bomb gamma flux. Being close enough and line of sight from the atmosphere can be sufficient to generate the effect in the nearby atmosphere. 400km is apparently the optimum height for coverage but not strength. Too far and inverse-square ensures the flux isn't sufficient. So just detonating a bomb "in space" may not do anything depending on the direct path distance to the satellites in question (the bomb gamma flux etc. of course poses its own threat). Look it up, the physics are interesting.

I'd love to see them go back all the way to the Apple I eventually.

So, how can we get this unwound, or at least properly compensated?


Smalltalk does something similar. Maybe that syntax would be better for him?


And these extensions are for what use cases?


Mostly Fun... sometimes replacing commercial software workflows that were already a disaster for the creatives. =3


I wonder if this could be practical for controlled environment devices like game consoles.


What do you mean? By the time you have kernel access like that you’ve already won.


I suppose the theory is when you're attacking a console like the Xbox One with some known hypervisors vulnerabilities, but generally what is considered to be secure hardware, you could use the patchable hypervisor vulnerability to install your custom OS, then use the OS itself to find silicon bugs, finally securing a pathway for permanent access to the device.


It’s practical in the sense that it lets a researcher find additional silicon bugs, although most game consoles now use merchant archs anyways


I'm curious as to how time efficient that actually was.


Humber encoding?


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

Search: