topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday November 12, 2025, 2:09 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 27 28 29 30 31 [32] 33 34 35 36 37 ... 264next
776
Living Room / Re: silly humor - post 'em here! [warning some NSFW and adult content]
« Last post by IainB on November 23, 2017, 12:02 AM »
I lifted this from @dantheman's post:
Fight back email scams with Rescam - DonationCoder.com - <https://www.donationcoder.com/forum/index.php?topic=44583.msg414564#msg414564>

777
Living Room / Re: Interesting "stuff"
« Last post by IainB on November 22, 2017, 11:10 PM »
yeah. do not want.
But nevertheless found in corporate board-rooms and executive suites around the globe, and not always underwater...    :o
778
Coding Snacks / Re: SHORTCUT SHMORTCUT
« Last post by IainB on November 22, 2017, 11:06 PM »
@Stoic Joker: Yes, it seems to work as a drop-point (or Send to point), but I can't get it to work as a clickable shortcut to bring up the "wizard" - which is what seems to be required in the OP. Can't figure out a way to do that, though I reckon there probably is a way. It seems an awkward requirement to try and meet - I mean, I'm not sure that the Desklink was necessarily intended to be used in that way. It might not be feasible.
One workaround might be as per the link I gave in my response above, but I wasn't sure that was quite what was wanted.
Better definition of requirements needed, I guess.   :tellme:
779
Coding Snacks / Re: SHORTCUT SHMORTCUT
« Last post by IainB on November 22, 2017, 12:02 PM »
@altikaka:
Interesting Q.
I don't know of any way of creating a desktop shortcut (in Win10) to the shortcut wizard (which can be accessed by a right click > New > Shortcut), but it should also be in the explorer shell Send to menu - via right click any file/folder > Send to > Desktop (create shortcut)

The file that is sent to is in the Send to folder, and is named: Desktop (create shortcut).DeskLink
 - but the file extension is apparently forcibly hidden via a Registry entry. It seems to be a special kind of Windows/explorer control file link.
If that file is missing from that folder, then this post may help - it suggests how to recreate the file in Windows XP and Vista (seems to work in Win10): How to Restore Missing “Desktop (create shortcut)” Item in Send To Menu in Windows?

Also, in Win10, if you do a search using (say) Everything, for filename Desktop (create shortcut).DeskLink, then you will probably turn up several hits on the C: disk, and you can just copy one of them to the Send to folder if it was missing from there.
I don't know how to create that as a fully-functioning shortcut/link in any folder elsewhere though. I mean, I created it elsewhere, but it doesn't function, nor does any shortcut made to it.
I suspect it may be a special Junction point (or similar link) to something. Can't find it in the GodMode folder. Haven't yet found a clue in any searches of forums, but I reckon it's likely to have been documented somewhere.
Curious. Someone else on this forum may know more about it.

Note: This DCF post may be of relevance/interest/use:
DONE: Create Shortcut on the Destop (hopefully not as stupid as it sounds)
780
Living Room / Re: Recommend some music videos to me!
« Last post by IainB on November 21, 2017, 06:56 PM »
From this thread: Luna Lee plays rock on the 6th century Korean Kayagum stringed instrument.








...and from earlier in this thread:
(Couldn't find a video of them playing this actual recording)


...for comparison:



And here's a programmable music machine...

781
Screenshot Captor / Re: Images pasted into OneNote - make it easier.
« Last post by IainB on November 21, 2017, 01:45 AM »
@absoblogginlutely:
As a confirmed user of the excellent SC (ScreenshotCaptor) and the excellent ON (OneNote), I'd make 4 points here  - based on what you wrote - that may be of use:
  • If you are using the desktop version of ON and if you want your screen captures to go to a ON Notebook (on SharePoint, OneDrive or Desktop), then you might be going about image capture in a somewhat constipated manner.

  • Using SC to save images into ON is a constipated method. That is because ON has its own excellent screen clipping tool (Hotkey = Win+Shift+S), which will save the selected area into the default (as set by the user) ON Notebook section. As soon as it does that, the clip image will be OCRed and indexed for for readable text (make sure that is set On in settings) and you are able to drag the image itself by the lower RH corner to a smaller/larger size. Similarly, if you paste an image into ON, you are able to drag the image to a smaller/larger size.

  • That clip also goes to the Clipboard. If you have also installed @mouser's excellent CHS (Clipboard Help & Spell), then you may have some kind of image editing & management Nirvana within reach. This requires you to be using ON, CHS, SC, and something like Irfanview. For a detailed explanation, refer: Re: Modify your screen capture/management tools for optimum efficiency of use.

  • If you are usually image-clipping selected areas of Excel tables, then consider inserting the Excel file into ON, by saving it as a table. It appears as a table in ON (uses OLE - Object Linking and Embedding). You can get a relevant section of the spreadsheet to show as a ON table, which, if you click it, will start you into editing the embedded Excel file. Note that this is a copy of the original Excel file you were working with, but it can be very handy having it in a ON Notebook as other users can share and dynamically access and update it collaboratively. For more info on ON usage, refer: Microsoft OneNote - some experiential Tips & Tricks

My apologies if this seems confusing. It actually works really well and entails minimal-efforts working, but some people might find it confusing initially. It took  me a while to work it out, but it now seems obvious to me. It will probably be worth making the effort to understand it though - step-by-step - as it could save you a mountain of effort and time, over time. It's really mostly about the simplification of work processes and improvement of ergonomics.
782
Living Room / Re: silly humor - Nomination for Darwin Award - Thomas Millward.
« Last post by IainB on November 20, 2017, 06:34 PM »
Trigger Warning! - macabre/black humour follows, with some very real and potential risk of danger from falling irony and thinking twice.

Congratulations on earning a Darwin Award nomination, and R.I.P. (6th March 2016), Thomas Millward (19) - a 1st-year Cambridge engineering student.
Commiserations on a near miss to earning a simultaneous Darwin Award nomination, to his girlfriend Daniella Mieloszyk (21) - a Cambridge human, social and political sciences student.

Theirs is a happy little tale about two bright young Cambridge undergrads cheerfully risking wrecking their brains and lives because they thought it "would be such fun", or something. He was studying engineering, it seems, but presumably neither he nor she had any proper knowledge/understanding of science - chemistry or biology - and where the cardinal rule for scientific repeatability/success is: Never run an experiment with yourself as the lab test animal.

Depressingly moronic. Airheads both. Parents' worst nightmare and saddest realisation. He earns the nomination for the Darwin Award (for cretinously and self-destructively removing himself from the gene pool) and his attractive, but apparently equally idiotic girlfriend is left with a salutary lesson for herself - and for the rest of us too - and the grim reminder that she collaboratively assisted in the creation of his death-defying (NOT) act. Bet she's grateful she didn't go the same way. It's a bad trip that ends in a fall/dive to the death rather than swimming at a sunny beach in Spain. Oh dear, what a pity, never mind.

A contact at Cambridge informs that there is a rumour (unconfirmed) that Cambridge university are asking students for suggestions for re-naming the staircase/stairwell/landing involved in memory and recognition of Tom Millward's death/achievement, or something, and some of the enthusiastic contributions so far apparently include, for example: (They'll only make sense if you read the article from the UK Telegraph News, copied in part, below.)
  • "Millward's End",
  • "Millward's Trip",
  • "Millward's Dive",
  • "Millward's Flight",
  • "Millward's Leap",
  • "Millwards' Landing",
  • "No Man's Landing",
  • "Foresight End",
  • "Navigational Error",
  • "Pilot Error",
  • "Genes End",
  • "Engineer's Folly",
  • "Oops Stairs",
  • "Flight of Fancy",
  • "Gravity Rules",
  • "Gravity Well",
  • "Well, Well, Well",
  • "Newton's Apple",
  • "Tom's Apple",
  • "Not Adam's Apple",
  • "Where's me shirt?",
  • "Where's me undies?",
  • "Who Needs Clothes?",
  • "Bad Risers",
  • "Dead Man Risers",
  • "Mind The Step",
  • "Who needs steps?",
  • "Look! I can fl...",
  • "Far Out Man",
  • "Falling Man Stairs",
  • "Dead Man Flying",
  • "Dead Man's Stairs",
  • "Dead End Stairs",
  • "Daniella's Despair",
  • "The Mieloszyk Principle",
  • "Acidic Outcome",
  • "1P LSD",
  • "Gewürztraminer Is Better",
  • "Ow! That hurt!",
  • "Descent Into Idiocy",
  • "Wheeeeeeee Stairs",
  • "Parachute Stairs",
  • "Skydivers' Stairs",
  • "Periodic Stairs".

(Looks like typical, variously clever/obscure, gruesome and callous undergraduate humour.)

Informative post below from the UK Telegraph News. Very revealing towards the end.
(Copied below sans embedded hyperlinks/images.)
Cambridge student died after taking legal high two months before it was outlawed

 Harry Yorke
20 NOVEMBER 2017 • 7:10PM
ACambridge University student died after he and his girlfriend bought a legal high from the internet months before it was outlawed, an inquest heard on Monday.

Thomas Millward, a first-year engineer, suffered an “unsurvivable” head injury after falling down several flight of steps at Girton College, Cambridge, on 6 March last year.

Mr Millward, 19, had been intoxicated on the legal-high “1P LSD” , which is a copycat version of the psychedelic drug LSD or “acid”.

He was taken to Addenbrooke’s Hospital shortly after 9.30pm, where doctors declared him brain dead.

New psychoactive substances such as 1-Propionyl-lysergic acid diethylamide, nicknamed 1P LSD, have grown in popularity in recent years due to their price and availability on the dark web.

While it was outlawed in May 2016 along with thousands of new synthetic drugs under the Psychoactive Substances Act, dozens of outlets operating outside of the UK continue to sell it online.

Cambridge student Thomas Millward
Cambridge student Thomas Millward
Giving evidence at Huntingdon Law Courts yesterday, Mr Millward’s girlfriend Daniella Mieloszyk said the pair had been “overwhelmed” by the substance and had “naively” underestimated its effects.

The 21-year-old, a human, social and political sciences student at Cambridge, added:  "[We] didn't realise what it would be like and had expectations that it would be something that was a fun and positive experience which would be interesting to have. We knew it was kind of like of a legal equivalent to LSD.”

Ms Mieloszyk said the pair had taken two tabs of the then legal substance at 3pm that afternoon and had been attempting to fall asleep in Mr Millward’s bedroom.

She added that she had woken up and walked out to the landing to find him lying at the bottom of the stairwell, next to two vending machines.

"Everything just felt quite overwhelming. The next thing I remember was waking up... regaining a sense of awareness and in the room on my own," she said.

"As soon as I opened the door I saw another student called Hamish standing at the bottom of the stairs and then when I walked forward I saw that Tom was lying next to him.

"I thought it was like a dream and I just kept saying to him we thought it was a dream. I kept thinking to Tom would just walk down the stairs and be like 'oh here I am'."

The inquest also heard that Mr Millward, a keen rugby player, had suffered a concussion in a match three days before his death, and had experienced symptoms including “dizziness”.

A toxicology report found that Mr Millward had traces of the drug in his blood five hours after taking it.

Ms Mieloszyk claimed that she had been given the drugs by a friend who had purchased them online three weeks before his death.

Police officers called to the incident found the substance in a “metallic silvery bag” in a blue pouch under Mr Millward’s bed.

Detective Constable Alice Draper told the inquest that the it had been suggested “all along” that Mr Millward had taken LSD, adding that there was no suggestion of “anything sinister” in his death.

His father, Brian Millward, said: "We suspect.. only half an hour before the air ambulance (arrived) that he went to the top floor and removed his clothes on the F Block.

"Then ran back through the other corridor below back to his room and that's when he fell."

The inquest will resume on Tuesday.

Related Topics:
 - Students
 - Legal highs
 - Huntingdon Police
 - Internet

Copied from: Cambridge student died after taking legal high two months before it was outlawed  - <http://www.telegraph.co.uk/news/2017/11/20/cambridge-student-died-taking-legal-high-two-months-outlawed/>

"Some mothers do 'ave 'em." (After the title of the BBC TV comedy series of the same name.)
783
Living Room / Re: Does anyone here use Bitcoins?
« Last post by IainB on November 17, 2017, 08:33 PM »
Crikey, as if on cue, Falkvinge.net makes similar (and more perspicacious) points to mine:
What if new Google management decided that a search should cost $20, take eight hours, and be deliberately unreliable? (Bitcoin.)

Worth a read.

784
General Software Discussion / Re: New faster Firefox - The New IE6?
« Last post by IainB on November 17, 2017, 08:03 PM »
Interesting and articulate post at binaryturf.com which seems to pretty much nail it for Firefox: Here’s Why Firefox Quantum Is The New IE6
(Copied below sans embedded hyperlinks/images.)
By Shivanand Sharma, 18 Nov, 2017

So Firefox just updated itself. And here’s a note by none other than Chris Beard, the CEO of Mozilla.
[@IanB note: Image here is of the CEO's message, which, amongst the seeming platitudes and meaningless clichés appears  to say two-fifths of five tenths of SFA.]

I have just a few points to make:
  • Firefox killed IE6 and became the most popular browser.
  • 10 years later Firefox has become the new IE6.
  • Google Chrome is the new king.
  • Firefox became a clone of Chrome. Mozilla lost sponsorship of Google. Lack of funds means cutting down on business. Not much to pay anyone. So take chromium source and repack it as Firefox.
  • Firefox lost all USPs primary of which was that it was everyone’s own browser: Firefox looked unique on every PC it was installed on… pretty much like how each Linux desktop is unique. Now you can’t customize it much.
  • As far as speed is concerned, Firefox from 10 years back runs faster than Firefox 57 on today’s hardware.
  • And for all the speed gains touted, it’s still a poor catch-up show with Chrome and an utter failure at that.
  • For all the new source code copied from Chromium and ported to Firefox, you’ll need to re-build and finish this browser from scratch for all the bugs you’ve inherited and introduced during this plagiarization.

So why use a browser that’s a clone of a better performer out there? Have any reasons?

Moral: Choose your CEO’s wisely lest they close shop.

Copied from: Here's Why Firefox Quantum Is The New IE6 - <https://www.binaryturf.com/wordpress-consulting/articles/heres-firefox-quantum-new-ie6/>
785
Living Room / Re: Gadget WEEKENDS - Sony Ericsson Walkman Series in-ear headphones.
« Last post by IainB on November 17, 2017, 04:36 AM »
I found these headphones. They are in-ear models. After removing the neoprene plugs and cleaning all parts with alcohol, then reassembling them, I tested them out and found that they give superb clarity of audio (e.g., in Fallout).
I found the photo (below) after doing a search for Images of "Sony Walkman headphones".

I have been unable to find a technical specification for these headphones though.

The plug has 3 segments and goes into the combined headphone/mic socket on my HP Pavilion 15 laptop. The circle of little holes on the back of each earphone is apparently a microphone. Testing the mics with Audacity, the RH one is much the loudest, so I suspect the plug is a proprietary Sony design that allows for a two-channel mic, which channels feed into the respective RH and LH noise-cancelling circuitry in the Walkman player.
I was wondering whether I could adapt them to use as a binaural stereo mic.

My full description is: Sony Ericsson Walkman Series in-ear headphones (with the "W" on the back) for ambient noise-cancelling audio from certain Walkman players.

17_442x506_D4D72091.png
786
Coding Snacks / Re: Display program and / or command that triggred mouse Wait cursor?
« Last post by IainB on November 13, 2017, 01:46 PM »
@TichGirl: I can't help with your logging query, however this (following) may be of use - if you haven't already been down this path:
From experience (trial-and-error), if it's in Windows 10, when something is apparently causing new problematic/unwanted mouse behaviour/errors, then it might be worth:
  • (a) Re-setting the current mouse-settings.
  • (b) If you have the facility to save a mouse settings profile, then (if not already done) create a profile and save it, and then reload that profile in the event that the mouse error condition recurs.
  • (c) Trying to force an update check/install to the Pointing Device (mouse) driver, to see if that makes any difference. Go look for a newer relevant mouse driver version on the manufacturer site if an auto-check for driver updates does not throw up anything new.
  • (d) Stopping, starting (or restarting) any relevant mouse executables or services.
  • (e) Stopping, starting (or restarting) Windows Explorer.
    ____________________________________

The above usually provides some kind of an effective workaround for me - this is on a laptop with a touchpad and where I also simultaneously use a separate wifi mouse. I use Autohotkey a bit to mess around with the mouse behaviour, sometimes.
Mouse drivers seem to be notoriously buggy/fragile, but that might be because they have to be ubiquitously available.
The system is usually not in any kind of a steady state. If the mouse was behaving OK before the situation you describe presented itself, then the new problem has probably been caused/triggered by an OS change/update or an update to a frequently-used  application (some process that is usually resident). Hence I suggest forcing a mouse driver update, as one might have been pushed out to rectify a known, newly-created OS update problem for the mouse driver, but the user doesn't always get notification of that.

Hope that helps or is of use.
787
Living Room / Re: Large yet compact storage
« Last post by IainB on November 12, 2017, 08:32 PM »
Is there some philosophical reason it always takes half a dozen posts before we get enough information?
_______________________________
Ah, my apologies @4wd, but I suspect this may come from a clone replication of the CONTRO AI that I recall having explained about in a separate thread.
788
General Software Discussion / Re: Malwarebytes 3.0 out
« Last post by IainB on November 12, 2017, 08:19 PM »
I know this, the problem is you'll have to do it for every program update, probably even incremental, since it most likely uses the same installer the same way.
It would be better if they fixed the problem.
_____________________________________
Oh yes, absolutely. You will probably be proven right by events.
Just my opinion, mind, and not really relevant, but I feel obliged to mention that I generally feel nothing but disgust for developers who decide to leave things to remain in some sort of bad shape for the hapless users to sort out. Ultimately, such decisions tend to backfire on the authors. One does not easily forget.
789
I got this (new?) tip from Gary North's newsletter (see below). I'd not come across this before. It seems to work rather well, despite potential ambiguity and imprecision with or without the syntax he suggests - e.g., I fed the string "Lumia 830 vs Samsung S7" (without the quotes) into duckgo and got a good result.
GARY NORTH'S TIP OF THE WEEK
Google is introducing a new feature: a comparison option for smart phones.

It isn't universal yet. It is in limited testing mode. But it may be
operational for you.

(1) Type a quotation mark.
(2) Type a smart phone's name and model.
(3) Type vs.
(4) Type another smart phone's name and model.
(5) Type a quotation mark.
(6) Click.
- See what you get.

The story is here: https://www.garynorth.com/snip/1303.htm

My wife is shopping for a smart phone. Sadly, the search did not work.

Gary "Dumb Phone" North

Visit my site, www.garynorth.com, for the latest charts on the U.S. dollar, gold's price, and Federal Reserve statistics.

Reminds me of an excellent website I used to use where you could get several cameras lined up for comparison, in columns, on one page.
790
Living Room / Re: Does anyone here use Bitcoins?
« Last post by IainB on November 12, 2017, 01:39 PM »
What @Deozaan writes would seem to indicate that not only do bitcoin-type assets suffer from price instability, theft/fraud, inadvertent loss (QED), but the trading mechanisms for them are also subject to episodic interruptions, rendering them temporarily illiquid at those times and potentially worthless.
So, if it's not all media "hype" against bitcoins, then we seem to have:
  • apparently not much good as a currency.
  • apparently not a safe or liquid store of value.
  • an apparently speculative/risky and costly(?) "fiduciary instrument" to trade with.
    ____________________________
Reminds me of a friend of mine who lost his shirt and his job through betting on the gee-gees, whilst all the time telling me what big wins were in the offing.

So, in the Q: "Does anyone here use Bitcoins?":
  • what exactly is the meaning and supposed purpose of "use"?
  • why have Goldman Sachs expressed an interest in bitcoins?
791
General Software Discussion / Re: Malwarebytes 3.0 out
« Last post by IainB on November 11, 2017, 08:31 PM »
Finally figured out how to sort this problem in my case:
  • I was using ImDisk Virtual Disk Driver. It's really very handy/flexible in that the \TEMP setting can be changed dynamically from (say) R:\TEMP (on the RAMdrive) to C:\TEMP, and then back again, as necessary. I used to switch it like this as a workaround for the installer script for GDU (Google Drive Update). The GDU script consistently failed if \TEMP was in a RAMdrive, and worked OK if \TEMP was in C:

  • But apparently this isn't enough for the MBAM (Malwarebytes) installer. To get the installer to run, the RAMdrive has to be disabled at Autostart, and then the PC rebooted, so it comes up with C:\TEMP at startup. Then the MBAM installer seems to work OK. I found this out by trial-and-error. I guess the system retains some pointers to the RAMdrive, even if the \TEMP setting has been re-pointed to C: - so it's a bit of a flaky installer if it can't adapt to there being a RAMdrive.
    _________________________________
PITA.

Note that, once the MBAM update has been successfully installed, the \TEMP in RAMdrive can be reinstated at system startup, as normal, and MBAM seems to work fine with that. So it seems to be just the MBAM installer that has a problem with \TEMP being in a RAMdrive. The updated MBAM seems to works just fine with \TEMP being in a RAMdrive.
792
Screenshot Captor / Re: Sending PageDown command in Post Capture CommandLine option
« Last post by IainB on November 11, 2017, 08:02 PM »
...I finally managed to program the END key as a trigger and scrolled 500 pages pressing END and PGDN on after another 500 times. It sound more scary than it really is. At 1.5 second interval per page that is only 750 seconds. Took like 15 minutes to do...
_____________________________
Risk of error and/or RSI (Repetitive Strain Injury)!?
Wouldn't that be a case for using a loop?
793
A font of 24 point Helvetica, black, bold, with a bright yellow flashing background would probably catch the reader's eye nicely.
794
Living Room / Re: Does anyone here use Bitcoins?
« Last post by IainB on November 08, 2017, 01:00 PM »
Psychologists have theorised that there seems to be in the human psyche an irrational fear of unrealised loss.
The reality is that one only realises a profit or a loss when something is actually sold.

In any speculative venture, managing to sell a tradeable asset at the highest market value/price point is likely to be largely a matter of chance. If one sells it at a profit, then, however one might attempt (and fail) to predict it, the market's perceived value of the asset could subsequently (of course) go down as well as up, post-sale.

However, if the asset was sold at an acceptable profit at the time, then, from an accounting perspective, it was a profitable investment, by definition. Barring fraud or market-rigging, the fact that the asset might have risen appreciably in market value after having been sold is kinda academic, and to consider its rise in value as, for example (say) a missed opportunity, or as a loss/cost, because the higher resale price was never realised, is a speculator's (gambler's) irrational nightmare.
It's an "If only I had a done such-and-such" event - a sort of needless self-recrimination, post fact.

One would arguably need to hoard and avoid selling any tradeable asset - once acquired - if one wanted to be sure of getting the highest possible potential future sale price, and thus one would never actually sell, and the objective would be forever unachievable, and the price would continue to fluctuate up or down, regardless. The unsold/hoarded tradeable asset would simply form part of one's estate on death.

A useful rule-of-thumb is probably:
Buy when everyone else is selling and hold until everyone else is buying. That's not just a catchy slogan. It's the very essence of successful investing.
 - J. PAUL GETTY.
____________________________________________

I recall reading another another quote from Getty to the effect that:
"To avoid taxes, in life have all capital but no income; in death have all income but no capital."
____________________________________________
795
General Software Discussion / Re: Download manager
« Last post by IainB on November 08, 2017, 11:46 AM »
Recently have been using Free Download Manager with good results.  Thing is, the most recent version, 5.x, is complained about as bloatware with decreased functionality.  Advice which I took was to install the last good version, 3.9.7 build 1627 available at Filehippo.  Integrates as seamlessly with FF plugin Flashgot as NetXfer did.
DownloadThemAll! worked great but this works a little better.
_______________________________
-Midnight Rambler (November 06, 2017, 06:21 PM)
For years I have always used the highly customisable GetRight downloader (triggered in Firefox via Flashgot integration). GR still is a superb downloader - very aggressive and persistent, can searche mirrors, etc. - and its unique (?) "download site browser" capability can come in very handy on shy/reluctant sites.

However, I don't really need to use GR in Slimjet (wot I have now migrated to), as Slimject has a built-in downloader and the option to use "turbocharged download manager" as the default downloader (can be bypassed temporarily by holding down the ALT key). The TDM seems to be at least as aggressive/persistent as GetRight. You can also set the default maximum number of connections used by TDM (which can be very effective in helping to speed-up downloads and make optimum use of available bandwidth), though TDM does not have the equivalent flexibility of GetRight - e.g., to search mirror sites, etc..
796
Developer's Corner / Re: Python - Python Autocompleter.
« Last post by IainB on November 08, 2017, 10:22 AM »
Python Autocompleter at anvil.works: Interesting blog post and video of PyCon UK 2017 talk at: https://anvil.works/blog/python-autocompleter-pycon17
Video: https://youtu.be/U1TKC5Gp-Zw
Refs.:
    anvil.works (blog referred to)
    skulpt.org   (well worth a look)
_______________________________________________
(Post is Copied below with some embedded hyperlinks/images.)

Building a Python Autocompleter
tags: blog
Auto-completing Python on the Web
By Meredydd Luff - 8th of November, 2017

Why do you need autocompletion, and how does it work? My talk at PyCon UK 2017 explains how – and why – we built an in-browser autocompleter for Anvil.

Watch it below, or scroll down for a transcript:



Anvil logo
For more information about Anvil, check out anvil.works.
Skulpt logo
For more information about Skulpt, check out skulpt.org.

Transcript:
I'd like to start by taking some time to thank the PyCon UK organising committee. This has been our first time sponsoring PyCon UK, and we've been made to feel very welcome.

We make Anvil – it's a tool for building full-stack web apps with nothing but Python. We did this because we think we can make a better developer experience using full Python than using the traditional tools. And autocompletion is part of that.

Having proper code completion gives you discoverability. It lets you explore the APIs, without having to tab to the documentation all the time. It gives you speed, because you go a lot faster when you can hit the Tab key every few characters. It gives you confidence that what you're doing is right, because there are whole classes of bugs you can fix without even hitting the Run button. And it just feels good to use.

We started out thinking we could make a good developer experience without autocomplete. I'm here to tell you that we were wrong.

If you don't use autocomplete yourself, you might not know what you're missing. I really encourage you to try it out. Even if you spend all your days in a terminal with vim or emacs, you can get Jedi as a plugin. Really, just try it for a week. See what happens. You'll be amazed.

Unfortunately, Jedi wasn't quite what we needed. Earlier I said Anvil was "full stack", and that means that it knows about everything from your database tables...
...to your server-side code...
...to your client-side code. And it's got to autocomplete all of them.

What's more, Anvil is web-based, and Jedi is expecting a filesystem. And when you're hitting the Tab key, there's just not enough time to go back to the server to fetch your completions.

So we had to write it ourselves, in Javascript. Which means that, yes, here I am, talking about my Javascript project at a Python conference. (Please save the rotten fruit until after the photos at the end.)

So, what do we do?

Conveniently, because Anvil runs all your client-side Python code in the browser, we have a Javascript parser for Python just lying around the place. (We use the open-source Skulpt project.)

So we can take your code, insert a random symbol at your cursor position, and then feed it to the Skulpt parser. The parser then produces an abstract syntax tree that represents your module.

We can then recursively walk this tree, and build up a representation of what's in scope at any given point in the code. We actually use Javascript's prototypical inheritance for this: Inside scopes (like inside a function) prototypically inherit all the names that are in scope from outside scopes (like the module globals).

And when we hit a Name node that contains the magic cursor symbol, we can just suggest all the things that are currently in scope.

That's not the only thing we want to autocomplete. For example, you can access Anvil's database rows like dictionaries, using square brackets (aka __getitem__). So we have to store which items are available on each type.

We also compute and store what you get if you iterate over an object, what its attributes are, what you get if you call it as a function, and so on.

Speaking of function calls, we also need to infer between modules. For example, in Anvil you write your server code in Python, and you call it from the client with a Python function call. And if you pass something into that server code, you want to be able to autocomplete it inside that server function.

So, as well as saving the top-level scope of every module (so it can be used in import statements from other modules), we also store every outbound call from a module – including calls to the server.

So when we parse this client code, we store this outbound call, along with the types of its arguments. And then when we're parsing the server code for autocomplete, we can just pull out the type information for those arguments, and stick it into the local scope, where it autocompletes.

We can store a lot of information about types. This leads to a rather philosophical discussion about what, exactly, a type is.

You might say, "that's easy, the type of an object is its Python class". But of course, in Python, you can dynamically add attributes to individual object instances. And, arguably, even two dicts aren't really the same type.

So what we actually do is mostly forget the Python class – our autocompleter is duck-typed. As far as we're concerned, these two dictionaries are two separate types, with separate item mappings, and should be treated as such.

There's so much more I could talk about, but this is a short talk. And so, if you remember only one thing, make it this:

Ladies and gentlemen of Pycon UK 2017, use autocomplete!

Thank you very much.
____________________________________
797
Developer's Corner / Python - useful notes and references.
« Last post by IainB on November 08, 2017, 10:21 AM »
I set this up 2017-11-09 to collect useful and educational notes, references/links to Python - a sort of a Python "nook" within the Developer's Corner.
Couldn't seem to find a suitable place on the existing forum as it stands.
Not intending to duplicate anything that already exists.

This originally stemmed from my intention to help my daughter (and her classmates) find a better/more comprehensible route to learning Python. I am resigned to having to learn Python to do this - time permitting - so it is likely to be a bit of a journey.
Thought it could potentially be of use to other DCF members as well, and hoping they might be able to contribute too...     :o
______________________________________
Python education + books:

Python tools:

798
Find And Run Robot / Re: How to search for specific file types?
« Last post by IainB on November 06, 2017, 05:03 AM »
What @tomos wrote.
Also,you could do worse than use Everything.
799
Living Room / Re: Recommend some music videos to me!
« Last post by IainB on November 05, 2017, 10:39 AM »
@tomos: I was looking for that. Thankyou for saving me the trouble. Good find!    :Thmbsup:

Published on 12 Aug 2014
Este video no me pertenece

REsubo este discazo q bajaron

01. Metamorphosis 1 : 0:00
02. Metamorphosis 2 : 6:40  (This is the one in the  Yoann Bourgeois trampoline video)
03. Metamorphosis 3 : 14:48
04. Metamorphosis 4 : 20:13
05. Metamorphosis 5 : 26:04
06. Mad Rush : 31:46
07. Wichita vortex sutra : 49:05
08. Glassworks, opening : 56:10
09. The hours : 1:00:55
10. Modern Love waltz : 1:09:06

Copied from: (1) Philip Glass Metamorphosis full album 2006 piano Branka Parlic - YouTube - <https://www.youtube.com/watch?v=_hMw1C6fPt8>
800
Living Room / Re: good Videos [short films] here :)
« Last post by IainB on November 05, 2017, 10:03 AM »
- and this:
[Yoann Bourgeois - Fugue / Trampoline sur Metamorphosis II]
__________________________
this is a real gem.
Couldnt stop watching, and at some stage just had to laugh at it.
__________________________
Yes. It's mesmerizing.
I had never before seen such a parody as this of the human condition.

PS: Note changes to the links in the videos posted above.
Pages: prev1 ... 27 28 29 30 31 [32] 33 34 35 36 37 ... 264next