**** BEGIN LOGGING AT Mon Sep 18 03:00:01 2017 Sep 18 03:50:24 not exactly a maemo question, but whats wrong in this syntax? "if answer != "y" || "n")" It works, but not they way i wanted. I wanted it to trigger if answer is not y or n, but now it triggers at any input and i can't wrap my head around it. Sep 18 04:23:05 if {answer != "y"} || {"n"}, I would guess Sep 18 04:23:15 Aka, "n" is always true Sep 18 04:23:39 But, I am not sure what ")" stands for in your example Sep 18 04:28:58 oh i mistyped. It was supposed to be (answer.... Sep 18 04:29:44 so it is just closing ) Sep 18 04:42:49 Either way, my argument still holds. What would happen with this? (if answer != "y" && answer != "n") Sep 18 04:43:23 * Oksana expects that || means or and && signifies and, but haven't tried scripts for a long time Sep 18 04:59:41 let me try what happens Sep 18 05:02:15 same problem as from the start Sep 18 05:02:52 it just triggers no matter the letter and doesn't move to else even if letter is y or n Sep 18 05:03:12 sigh i give up and clean my house instead Sep 18 05:03:20 Is it possible in your script to print out values of answer, answer != "y", answer = "y", and others? Sep 18 05:04:12 i wouldn't know. Im just taking my first steps on programming :) Sep 18 05:04:34 they want us to learn typescript Sep 18 05:06:00 is Lisp/Scheme also on the menu someday Vajb? Sep 18 05:07:35 i don't know haven't check next courses Sep 18 05:09:07 scheme got me thinking in new ways Sep 18 05:09:21 * Oksana has heard that Smalltalk is one of the most liked programming languages Sep 18 05:09:52 the syntax though ugh Sep 18 05:30:20 i kinda like typescript so far, but i don't like to fail no matter what Sep 18 05:30:42 and now im failing no matter what i try Sep 18 05:34:50 to be exact. I wanna make script that asks y or n and answers accordingly. If i use any other character than y or n it gives error. Sep 18 05:35:16 sounds simple enough, but i don't seem to make it Sep 18 05:47:19 in bash i simply use: read ans; if [ "$ans" = "y" -o "$ans" = "Y" ]; then echo yes; else echo no; fi Sep 18 05:48:13 never touched scheme **** BEGIN LOGGING AT Mon Sep 18 08:08:04 2017 Sep 18 08:53:40 KotCzarny: tried to translate that to typescript, didn't work :) Sep 18 08:53:51 I'll figure it out eventually. Sep 18 09:15:32 cool, i can copy a random set of music or podcasts to my phone SD card Sep 18 09:15:33 ls |sort -R |tail -$1 |while read file; do cp -v $file $2; done Sep 18 10:53:08 if(["y", "n"].indexOf(answer) != -1) Sep 18 10:53:25 Should work in TypeScript. Sep 18 10:53:35 what about upper case? Sep 18 10:54:01 if(["y", "n"].indexOf(answer.toLowerCase()) != -1) Sep 18 10:57:43 TypeScript seems like a bad language to be taught as an introductory language. Sep 18 10:59:28 It has a static type system, but it relies on fairly careful reasoning to ensure your code is actually well-typed (given that it compiles) Sep 18 11:00:52 due to its unsoundness WRT structural subtyping (assumes covariance of data structures), and its use of `any` typing, etc Sep 18 11:01:45 and when you actually do have type errors, they're not even caught at runtime, unless they happen to be real ECMAScript type errors (in which case `TypeError`s will be thrown) Sep 18 11:03:25 I see it as a language that acts as a pretty good workaround for the lack of type safety in ES, not as something that would be optimal to learn to understand something about programming or type theory. Sep 18 20:26:54 Feature request for camera: using an image as semi-transparent overlay while shooting a photograph. Sep 18 20:27:54 Usecase: creating time lapse sequences of photographs. Such an overlay would make it easier to avoid movement of camera from one day to another. Sep 18 20:34:42 it's easier to be done in postprocess Sep 18 20:34:51 ie. in software after Sep 18 20:35:10 just requires some key points in the scene to be permanenet Sep 18 20:35:20 *permanent Sep 18 20:36:18 Sure, but post-processing implies that the images will have to be cropped at least. Sep 18 20:36:46 Pre-processing allows to make sure that all angles and distances are correct. Sep 18 20:37:21 assuming your onion image is similar enough in the angles, distance etc Sep 18 20:37:52 Because not everybody is going to have a tripod mount sitting to specify where the photographing should take place. Sep 18 20:43:45 /me is probably too picky; hoped that gstreamer has such a image-overlay-over-camera-stream functionality **** ENDING LOGGING AT Tue Sep 19 03:00:01 2017