Is init one word


Asked by: Mrs. Julia Rowe Sr.

Score: 4.9/5
(2 votes)

Senior Member. As most people have correctly identified «innit» is a shortened and somewhat crude way of saying ‘isn’t it’.

Why do British say innit?

«Innit» is an abbreviation of «isn’t it» most commonly used amongst teenagers and young people. This phrase is used to confirm or agree with something that another person has just said. «It’s really cold today.»

What does init mean in British slang?

nothing in it (for someone)

idiom. : nothing to be gained (by someone) See the full definition.

Is innit grammatically correct?

Innit is a real word (it’s in the OED), just as valid as isn’t, ain’t or shan’t. … Just because the word is used “incorrectly” doesn’t mean it is incorrect in and of itself.

Why are chavs called chavs?

«Chav» may have its origins in the Romani word «chavi», meaning «child». … In the 2010 book Stab Proof Scarecrows by Lance Manley, it was surmised that «chav» was an abbreviation for «council housed and violent». This is widely regarded as a backronym.

42 related questions found

What does innit bruv mean?

Innit is short for «isn’t it?» Some people use this when they want to confirm that the listener has understood or agrees with what the speaker had said. Bruv is short for brother. Some people use this as a term of friendly address.

What does innit FAM mean?

Innit is a short version of «isn’t it» and fam is a short version of family, fam is in this phrase a word for a group of friends that you’re part of. See a translation. 0 likes.

What’s the meaning of Tommyinnit?

According to a user from Michigan, U.S., the name Tommyinnit means «He is a 16 year old Minecraft YouTube/twitch streamer who mostly play with turbo, dream, technoblade, and wilbur soot who are his friends».

Where is innit used?

Innit can be used at the end of a statement to make it into a question. It is a way of saying ‘isn’t it’.

Is init a real word?

short form of isn’t it. Used at the end of a statement for emphasis: «It’s wrong, innit?»

How do you say hi in London slang?

. ‘Hiya’ or ‘Hey up’ – these informal greetings both mean ‘hello’ and are especially popular in the north of England.

Why do British people say maths?

The UK version is more logical. Math is an abbreviation of mathematics, which is a count noun in British English because there are different types of maths (geometry, algebra, calculus, etc.) and a mass noun that happens to end in an ‘s’ in American English (like gymnastics in both dialects).

How old is BadBoyHalo?

BadBoyHalo was born on 2 April 1995. BadBoyHalo is 26 years old.

What is Philza real name?

Philip Watson (born March 1, 1988), better known online as Philza Minecraft, Philza, or Phil, is an English YouTuber and Twitch streamer. He is best known for his five-year Hardcore world; its end in April 2019 was featured in many news outlets and launched Phil to fame.

What does chav mean slang?

[ chav ] SHOW IPA. / tʃæv / PHONETIC RESPELLING. ? High School Level. noun Chiefly British Slang: Disparaging and Offensive. a young person who wears fashionable sportswear or flashy jewelry but is regarded as badly behaved or as having lower-class taste.

What is a Roadman in the UK?

British slang. a young and gregarious member of a street gang, often involved in selling drugs.

Does bruv mean bruh?

Overall, the term “bruv” is a colloquial English term meaning “brother.” This term is used to refer to a friend that one is close with, often of a similar age. This slang term is common amongst London youth, and is used in the same way that slang words like “bro,” “bruh,” “cuz,” “fam,” and “boi” are used.

Do British say bruv?

Bruv. Short for «brother», this London street slang is used to refer to a male friend.

Do they say bruv in America?

Brits (particularly in the south) will often employ the term bruv to reference the former, whereas Americans might say bro (though this is more commonly used among males to describe a male friend). …

What does Jobby mean in Scotland?

(Scotland, slang) Faeces; a piece of excrement.

Who are the TikTok chavs?

TikTok is host to a growing number of videos stereotyping and mocking working-class people in the UK. The term ‘chav’ — a slur used to describe poor people — features in thousands of clips posted to the app, which have been watched more than 150 million times in total.

System 5 init will tell you only a small part of the story.

There’s a sort of myopia that affects the Linux world. People think that they use a thing called «System 5 init«, and that is both what is traditional and the best place to start. Neither is in fact the case.

Tradition isn’t in fact what such people say it to be, for starters. System 5 init and System 5 rc date to AT&T UNIX System 5, which was almost as far after the first UNIX as we are now (say) after the first version of Linux-Mandrake.

1st Edition UNIX only had init. It did not have rc. The 1st Edition assembly language init (whose code has been restored and made available by Warren Toomey et al.) directly spawned and respawned 12 getty processes, mounted 3 hardwired filesystems from a built-in table, and directly ran a program from the home directory of a user named mel. The getty table was also directly in the program image.

It was another decade after UNIX System 5 that the so-called «traditional» Linux init system came along. In 1992, Miquel van Smoorenburg (re-)wrote a Linux init+rc, and their associated tools, which people now refer to as «System 5 init«, even though it isn’t actually the software from UNIX System 5 (and isn’t just init).

System 5 init/rc isn’t the best place to start, and even if one adds on knowledge of systemd that doesn’t cover half of what there is to know. There’s been a lot of work in the area of init system design (for Linux and the BSDs) that has happened in the past two decades alone. All sorts of engineering decisions have been discussed, made, designed, implemented, and practised. The commercial Unices did a lot, too.

Existing systems to study and and learn from

Here is an incomplete list of some of the major init systems other than those two, and one or two of their (several) salient points:

  • Joachim Nilsson’s finit went the route of using a more human-readable configuration file.
  • Felix von Leitner’s minit went for a filesystem-is-the-database configuration system, small memory footprints, and start/stop dependencies amongst things that init starts.
  • Gerrit Pape’s runit went for what I have previously described as the just spawn four shell scripts approach.
  • InitNG aimed to have dependencies, named targets, multiple configuration files, and a more flexible configuration syntax with a whole load more settings for child processes.
  • upstart went for a complete redesign, modelling the system not as services and interdependencies at all, but as events and jobs triggered by them.
  • The design of nosh includes pushing all of the service management out (including even the getty spawning and zombie reaping) into a separate service manager, and just handling operating-system-specific «API» devices/symlinks/directories and system events.
  • sinit is a very simple init. It executes /bin/rc.init whose job it is to start programs, mount filesystem, etc. For this you can use something like minirc.

Moreover, about 10 years ago, there was discussion amongst daemontools users and others of using svscan as process #1, which led to projects like Paul Jarc’s svscan as process 1 study, Gerrit Pape’s ideas, and Laurent Bercot’s svscan as process 1.

Which brings us to what process #1 programs do.

What process #1 programs do

Notions of what process #1 is «supposed» to do are by their natures subjective. A meaningful objective design criterion is what process #1 at minimum must do. The kernel imposes several requirements on it. And there are always some operating-system-specific things of various kinds that it has to do. When it comes to what process #1 has traditionally done, then we are not at that minimum and never really have been.

There are several things that various operating system kernels and other programs demand of process #1 that one simply cannot escape.

People will tell you that fork()ing things and acting as the parent of orphaned processes is the prime function of process #1. Ironically, this is untrue. Dealing with orphaned processes is (with recent Linux kernels, as explained at https://unix.stackexchange.com/a/177361/5132) a part the system that one can largely factor out of process #1 into other processes, such as a dedicated service manager. All of these are service managers, that run outwith process #1:

  • the IBM AIX srcmstr program, the System Resource Controller
  • Gerrit Pape’s runsvdir from runit
  • Daniel J. Bernstein’s svscan from daemontools, Adam Sampson’s svscan from freedt, Bruce Guenter’s svscan from daemontools-encore, and Laurent Bercot’s s6-svscan from s6
  • Wayne Marshall’s perpd from perp
  • the Service Management Facility in Solaris 10
  • the service-manager from nosh

Similarly, as explained at https://superuser.com/a/888936/38062, the whole /dev/initctl idea doesn’t need to be anywhere near process #1. Ironically, it is the highly centralized systemd that demonstrates that it can be moved out of process #1.

Conversely, the mandatory things for init, that people usually forget in their off-the-top-of-the-head designs, are things such as handling SIGINT, SIGPWR, SIGWINCH, and so forth sent from the kernel and enacting the various system state change requests sent from programs that «know» that certain signals to process #1 mean certain things. (For example: As explained at https://unix.stackexchange.com/a/196471/5132, BSD toolsets «know» that SIGUSR1 has a specific meaning.)

There are also once-off initialization and finalization tasks that one cannot escape, or will suffer greatly from not doing, such as mounting «API» filesystems or flushing the filesystem cache.

The basics of dealing with «API» filesystems are little different to the operation of init rom 1st Edition UNIX: One has a list of information hardwired into the program, and one simply mount()s all of the entries in the list. You’ll find this mechanism in systems as diverse as BSD (sic!) init, through the nosh system-manager, to systemd.

«set the system up for a simple shell»

As you have observed, init=/bin/sh doesn’t get «API» fileystems mounted, crashes in an ungainly fashion with no cache flush when one types exit (https://unix.stackexchange.com/a/195978/5132), and in general leaves it to the (super)user to manually do the actions that make the system minimally usable.

To see what one actually has no choice but to do in process #1 programs, and thus set you on a good course for your stated design goal, your best option is to look at the overlaps in the operation of Gerrit Pape’s runit, Felix von Leitner’s minit, and the system-manager program from the nosh package. The former two show two attempts to be minimalist, yet still handle the stuff that it is impossible to avoid.

The latter is useful, I suggest, for its extensive manual entry for the system-manager program, which details exactly what «API» filesystems are mounted, what initialization tasks are run, and what signals are handled; in a system that by design has the system manager just spawn three other things (the service manager, an accompanying logger, and the program to run the state changes) and only do the unavoidable in process #1.

In UNIX parlance, the word “init”
doesn’t identify a specific program, but rather a class of
programs. The name “init” is used generically to call the first
process executed at system boot—actually, the
only
process that is executed at system boot. When the
kernel is finished setting up the computer’s hardware, it invokes
init and gives up controlling the computer. From that point on, the
kernel processes only system calls without taking any decisional
role in system operation. After the kernel mounts the root file
system, everything is controlled by init.

Currently, several choices of init are available. You can use
the now-classic program that comes with the SysVinit package by
Miquel van Smoorenburg, simpleinit
by Peter Orbaek (found in the source package of util-linux), or a
simple shell script (such as the one shown in this article, which
has a lot less functionality than any C-language implementation).
If you set up embedded systems, you can even run the target
application as if it were init. Masochistic people who dislike
multitasking could even port
command.com to Linux and run it as
the init process, although you won’t ever be able to restrict
yourself to 640KB when running a Linux kernel.

No matter which program you choose, it needs to be accessed
with a path name of /sbin/init, /etc/init or /bin/init, because
these path names are compiled in the kernel. If none of them can be
executed, then the system is severely broken, and the kernel will
spawn a root shell to allow interactive recovery (i.e., /bin/sh is
used as the init process).

To achieve maximum flexibility, kernel developers offer a way
to select a different path name for the init process. The kernel
accepts a command line option of init= exactly
for that purpose. Kernel options can be passed interactively at
boot time, or you can use the append= directive
in /etc/lilo.conf. Silo, Milo, Loadlin and other loaders allow
specifying kernel options as well.

As you may imagine, the easiest way to get root access to a
Linux box is by typing init=/bin/sh at the LILO
prompt. Note that this is not a security hole per
se
, because the real security hole is physical access to
the console. If you are concerned about the
init= option, LILO can prevent interaction using
its own password protection.

The Task of init

Now we know that init is a
generic naming, and almost anything can be used as init. The
question is, what is a real init supposed to do?

Being the first (and only) process spawned by the kernel, the
task of init consists of spawning every other process in the
system, including the various daemons used in system operation as
well as any login session on the text console.

init is also expected to
restart some of its child processes as soon as they exit. This
typically applies to login sessions running on the text consoles.
As soon as you log out, the system should run another
getty to allow starting another
session.

init should also collect
dead processes and dispose of them. In the UNIX abstraction of
processes, a process can’t be removed from the system table unless
its death is reported to its parent (or another ancestor in case
its parent doesn’t exist anymore). Whenever a process dies by
calling exit or otherwise, it remains in the
state of a zombie process until someone collects it.
init, being the ancestor of any
other process, is expected to collect the exit status of any
orphaned zombie process. Note that every well-written program
should reap its own children—zombies exist only when some program
is misbehaving. If init didn’t collect zombies, lazy programmers
could easily consume system resources and hang the system by
filling the process table.

The last task of init is handling system shutdown. The init
program must stop any process and unmount all the file systems when
the superuser indicates that shutdown time has arrived. The
shutdown executable doesn’t do
anything, it only tells init that everything is over.

As we have seen, the task of init is not too difficult to
implement, and a shell script could perform most of the required
tasks. Note that every decent shell collects its dead children, so
this is not a problem with shell scripts.

What real init implementations add to
the simple shell script approach is a greater control over system
activity, and thus a huge benefit in overall flexibility.

Using /bin/sh as a Minimal Choice

As suggested above, the shell can be used as an init program.
Using a bare shell (init=/bin/sh) simply causes
a root shell to open in a completely unconfigured system. This
section shows how a shell script can perform all of the tasks you
need to have in a minimal running system. This kind of tiny init
can be used in embedded systems or similar reduced environments,
where you must squeeze every single byte out of the system. The
most radical approach to embedded systems is directly running the
target application as the init process; this results in a closed
system (no way for the administrator to interact, should problems
arise), but it sometimes suits the setup. The typical example of a
non-init-driven Linux system is the installation environment of
most modern distributions, where /sbin/init is a symbolic link to
the installation program.

Listing 1 shows a script
that can perform acceptably as init. The script is short and
incomplete; in particular, note that it runs only one getty, which
isn’t restarted when it terminates. Be careful if you try to use
this script, as each Linux distribution chooses its own flavour of
getty. Type grep getty /etc/inittab to know what
you have and how to call it.

The script has another problem: it doesn’t deal with system
shutdown. Adding shutdown support, however, is fairly easy; just
bring everything down after the interactive shell terminates.
Adding the text shown in Listing 2
does the trick.

Whenever you boot with a plain
init=/bin/sh, you should at least remount the
root file system before you do anything; you should also remember
to do umount -a before pressing
ctrl-alt-del, because the shell doesn’t
intercept the three-finger salute.

simpleinit, from util-linux

The util-linux package includes a C version of an init
program. It has more features than the shell script and can work
well on most personal systems, although it doesn’t offer the huge
amount of configurability offered by the SysVinit package, which is
the default on modern distributions.

The role of simpleinit (which should be called init to work
properly) is very similar to the shell script just shown, with the
added capability of managing single-user mode and iterative
invocation of console sessions. It also correctly processes
shutdown requests.

simpleinit is interesting to
look at, and well-documented too, so you might enjoy reading the
documentation. I suggest using the source distribution of
util-linux to get up-to-date information.

The implementation of simpleinit truly is simple, as its name
suggests. The program executes a shell script (/etc/rc) and parses
a configuration file to determine which processes need to be
respawned. The configuration file is called /etc/inittab, just like
the one used by the full-featured init; note, however, that its
format is different.

If you plan to install simpleinit on your system (which most
likely already includes SysVinit), you must proceed with great care
and be prepared to reboot with a kernel argument of
“init=/bin/sh” to recover from unstable situations.

The Real Thing: SysVinit

Most Linux distributions come with the version of init
written by Miquel van Smoorenburg; this version is similar to the
approach taken by System V UNIX.

The main idea is that the user of a computer system may wish
to operate his box in one of several different ways (not just
single-user and multi-user). Although this feature is not usually
exploited, it is not so crazy as you might imagine. When the
computer is shared by two or more people in one family, different
setups may be needed; a network server and a stand-alone
playstation can happily coexist in the same computer at different
runlevels. Although I’m the only user of my laptop, I sometimes
want a network server (through PLIP) and sometimes a netless
environment to save resources when I’m working on the train.

Each operating mode is called a “runlevel”, and you can
choose the runlevel to use at either boot or runtime. The main
configuration file for init is called /etc/inittab, which defines
what to do at boot, when entering a runlevel or when switching from
one runlevel to another. It also tells how to handle the
three-finger salute and how to deal with power failure, although
you’ll need a power daemon and a UPS to benefit from this
feature.

The inittab file is organized by lines, where each line is
made up of several colon-separated fields:
id:runlevel:action:command.

The inittab(5) man page is well written
and comprehensive as a man page should be, and I feel it is worth
repeating one of its examples—a stripped-down /etc/inittab that
implements the same features and misfeatures of the shell script
shown above:

id:1:initdefault:
rc::bootwait:/etc/rc
1:1:respawn:/sbin/getty 9600 tty1

This simple inittab tells init that the default runlevel is
“1”, at system boot it must execute /etc/rc, and when in runlevel
1 it must respawn forever the command
/sbin/getty 9600 tty1. You’re not
expected to test this script out, because it doesn’t handle the
shutdown procedure.

Before proceeding further, however, I must fill in a couple
of gaps. Let’s answer two common questions:

  • “How can I boot into a different runlevel than the
    default?” Add the runlevel on the kernel command line; for
    example, type Linux 2 at the LILO prompt,
    if “Linux” is the name of your kernel.

  • “How can I switch from one runlevel to another?”
    As root, type telinit 5 to tell the init
    process to switch to runlevel 5. Different numbers indicate
    different runlevels.

Configuring init

Naturally, the typical /etc/inittab file has many more
features than the three-line script shown above. Although
bootwait and respawn are the
most important actions, several other actions exist in order to
deal with issues related to system management. I won’t discuss them
here.

Note that SysVinit can deal with
ctrl-alt-del, whereas the versions of init shown
earlier didn’t catch the three-finger salute (i.e., the machine
would reboot if you pressed the key sequence). Those interested in
how this is done can check sys_reboot in
/usr/src/linux/kernel/sys.c. (If you look in the code, you’ll note
the use of a magic number 672274793: can you imagine why Linus
chose this number? I think I know the answer, but you’ll enjoy
discovering it yourself.)

Let’s look at how a fairly complete /etc/inittab can take
care of everything required to handle the needs of a system’s
lifetime, including different runlevels. Although the magic of the
game is always on display in /etc/inittab, several different
approaches to system configuration can be taken, the simplest being
the three-line inittab shown above. In my opinion, two approaches
are worth discussing in some detail; I’ll call them “the Slackware
way” and “the Debian way” from two renowned Linux distributions
that chose to follow them.

The Slackware Way

Although it has been quite some time since I last installed
Slackware, the documentation included in SysVinit-2.74 tells me
that it still works the same. It has fewer features but is much
faster than the Debian way. My personal 486 box runs a
Slackware-like /etc/inittab just for the speed benefit.

The core of an /etc/inittab as used by a Slackware system is
shown in Listing 3. Note that the
runlevels 0, 1 and 6 have a predefined meaning. This is hardwired
into the init command, or better, into the shutdown command part of
the same package. Whenever you want to halt or reboot the system,
init is told to switch to runlevel 0 or 6, thus executing
/etc/rc.d/rc.0 or /etc/rc.d/rc.6.

This works flawlessly because whenever init switches to a
different runlevel, it stops respawning any task not defined for
the new runlevel; actually, it kills the running copy of the task.
In this case, the active task is /sbin/agetty.

Configuring this setup is fairly simple, as the roles of the
different files are clear:

  • /etc/rc.d/rc.S is run at system boot, independently
    of the runlevel. Add to this file anything you want to execute
    right at the start.

  • /etc/rc.d/rc.M is run after rc.S is over, only when
    the system is going to runlevels 2 through 5. If you boot at
    runlevel 1 (single user), this script is not executed. Add to this
    file anything you run only in multiuser mode.

  • /etc/rc.d/rc.K deals with killing processes when
    going from multi-user to single-user mode. If you add anything to
    rc.M, you’ll probably want to stop it from rc.K.

  • /etc/rc.d/rc.0 and /etc/rc.d/rc.6 shut down and
    reboot the computer, respectively.

  • /etc/rc.d/rc.4 is executed only when runlevel 4 is
    entered. This file runs the “xdm” process, to allow graphic
    login. Note that no getty is run on /dev/tty1 when in runlevel 4
    (this can be changed if you wish).

This kind of setup is easy to understand, and you can
differentiate between runlevels 2, 3 and 5 by adding proper
wait (execute once while waiting for
termination) and respawn (execute forever)
entries.

By the way, if you haven’t guessed what “rc” means, it is
the short form of “run command”. I had been editing my .cshrc and
.twmrc files for years before being told what this arcane “rc”
suffix meant—some things in the UNIX world are handed down only by
oral tradition. I feel I’m now saving someone from years of being
in the dark—and I hope I won’t be punished for defining it in
writing.

The Debian Way

Although simple, the Slackware way to set up /etc/inittab
doesn’t scale well when adding new software packages to the
system.

Let’s imagine, for example, that someone distributes an
ssh package as a Slackware add-on
(not unlikely, as ssh can’t be
distributed on official disks due to the illogical U.S. rules about
cryptography). The program sshd is
a stand-alone server that must be invoked at system boot; this
means the package should patch /etc/rc.d/rc.M or one of the scripts
it invokes to add ssh support. This is clearly a problem in a world
where packages are typically archives of files. In addition, you
can’t assume that rc.local is always unchanged from the stock
distribution, so even a post-install script that patches the file
will fail miserably when run in the typical user-configured
computer.

You should also consider that adding a new server program is
only part of the job; the server must also be stopped in rc.K, rc.0
and rc.6. Things are now getting quite tricky.

The solution to this problem is both clean and elaborate. The
idea is that each package which includes a server must provide the
system with a script to start and stop the service; each runlevel
will then start or stop the services associated with that runlevel.
Associating a service and a runlevel can be as easy as creating
files in a runlevel-specific directory. This setup is common to
Debian and Red Hat, and possibly other distributions that I have
never run.

The core of the /etc/inittab used by Debian 1.3 is shown in
Listing 4. The Red Hat setup
features exactly the same structure for system initialization, but
uses different path names; you’ll be able to map one structure to
the other. Let’s list the roles of the different files:

  • /etc/init.d/boot is the exact counterpart of rc.S.
    It typically checks local file systems and mounts them, but the
    real thing has many more features.

  • /sbin/sulogin allows root to log in to a
    single-user workstation. Shown in Listing 4 only because
    single-user mode is so important for system maintenance.

  • /etc/init.d/rc is a script that runs any start/stop
    script belonging to the runlevel being entered.

The last item, the rc
program, is the main character of this environment: its task
consists in scanning the directory
/etc/rc$runlevel.d and invoking any script
located in that directory. A stripped-down version of rc would look
like this:

#!/bin/sh
level=$1
cd /etc/rc.d/rc$level.d
for i in K*; do
        ./$i stop
done
for i in S*; do
        ./$i start
done

What does this mean? It means that /etc/rc2.d (for example)
includes files called K* and
S*; the former identifies services that must be
killed (or stopped), and the latter identifies services that must
be started.

Okay, but I didn’t explain where the K* and S* files come
from. Each software package that must run for a particular runlevel
adds itself to all the /etc/rc?.d directories, as either a start
entry or a kill entry. To avoid code duplication, the package
installs a script in /etc/init.d and several symbolic links from
the various /etc/rc?.d directories.

To show a real-life example, lets’s see what is included in
two rc directories of Debian:

rc1.d:
K11croni        K20sendmail
K12kerneld      K25netstd_nfs
K15netstd_init  K30netstd_misc
K18netbase      K89atd
K20gpm          K90sysklogd
K20lpd          S20single
K20ppp
rc2.d:
S10sysklogd     S20sendmail
S12kerneld      S25netstd_nfs
S15netstd_init  S30netstd_misc
S18netbase      S89atd
S20gpm          S89cron
S20lpd          S99rmnologin
S20ppp

The contents of these two directories show how entering
runlevel 1 (single-user) kills all the services and starts a
“single” script, and entering runlevel 2 (the default level)
starts all the services. The number that appears near the K or the
S is used to order the birth or death of the various services, as
the shell expands wild cards appearing in /etc/init.d/rc in
alphanumeric order. Invoking an ls -l command
confirms that all of these files are symbolic links, such as the
following:

rc2.d/S10sysklogd -> ../init.d/sysklogd
rc1.d/K90sysklogd -> ../init.d/sysklogd

To summarize, adding a new software package in this environment
means adding a file in /etc/init.d and the proper symbolic link
from each of the /etc/rc?.d directories. To make different
runlevels behave differently (2, 3, 4 and 5 are configured in the
same way by default), just remove or add symbolic links in the
proper /etc/rc?.d directories.

If this seems too difficult and discouraging, all is not
lost. If you use Red Hat (or Slackware), you can think of
/etc/rc.d/rc.local like it was autoexec.bat—if you are old enough
to remember the pre-Linux age. If you run Debian, you could create
/etc/rc2.d/S95local and use it as your own rc.local; note, however,
that Debian is very clean about system setup, and I would rather
not suggest such heresy. Powerful and trivial seldom match—you
have been warned.

Debian 2.0

At the time of writing, Debian 2.0 is being released to the
public, and I suspect it will be in wide use by the time you read
this article.

Although the structure of system initialization is the same,
it is interesting to note that the developers managed to make it
faster. Instead of executing the files in /etc/rc2.d, the script
/etc/init.d/rc can now source (read) them, without spawning another
shell. Whether to execute or source them is controlled by the file
name: executables whose name ends in .sh are
sourced, the other ones are executed. The trick is shown in the
following few lines:

case "$i" in
        *.sh)
            # Source shell script for speed.
            (
            trap - INT QUIT TSTP
            set start; . $i
            ) ;;
        *)
            # No sh extension, so fork subprocess.
            $i start ;;
   esac

The speed benefit is quite noticeable.

is a Stone Age guy who runs old
hardware, rides an old bike and drives an old car. He enjoys
hunting (using grep) through his
(old) file system for information that can be converted from C
language to English or Italian. If he’s not reading e-mail at
[email protected], then he’s doing something else.

Forum rules
This is the right place for Ren’Py help. Please ask one question per thread, use a descriptive subject like ‘NotFound error in option.rpy’ , and include all the relevant information — especially any relevant code and traceback messages. Use the code tag to format scripts.

User avatar

LiveTurkey

Regular
Posts: 107
Joined: Tue Dec 27, 2016 10:50 pm
Location: Brooklyn
Contact:

What is the difference between default, define, global, python, init, and $?

#1

Post

by LiveTurkey » Mon Jul 16, 2018 9:05 pm

I can’t seem to understand this.

Right now, I want to make an array variable called deckOfCards. Since a deck of cards is pretty static, I want to make it a global variable that any minigame I create can access.

Here is the one example of code that would call this deckOfCards variable:

Code: Select all

label game:
    ...
    init python:
    	...
        for k in deckOfCards:
        ...

I can’t seem to figure out how to do this relative simple task.

First I tried

Code: Select all

default deckOfCards = ['A', 'B', 'C','D','E']

and placed that before my start label. However, I get nameError, deckOfCards is not defined

I tried replacing

with

, same exact error.

What is the difference between both of these? What happens if I don’t include either and just do deckOfcards = X?

I know that when you create a variable inside a function, it can only be used inside of that function, unless you make it a global variable. Global variable can be used in all functions right? Are «labels» and «screens» functions? If you create variable inside of a label or a screen, can they be used outside of that label or screen?

I’m assuming not to both because

Code: Select all

init python:
    global deckOfCards
    deckOfCards = ['A', 'B']

gives me the same exact error as before. So how do I create a variable that can be seen by all functions, screens, and labels?

How come you can’t define a global variable in the same line that you declare it?

Is there any difference between putting your code after a python: and just putting a dollar sign before each line? Init just makes whatever code is in the block run before all other code right? You can do init with python or without? I’m a little confused about all this stuff.


User avatar

trooper6

Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#2

Post

by trooper6 » Mon Jul 16, 2018 10:46 pm

In order to declare a variable you use either define or default, outside of any block.

-You use define for variables that will not change, default for variables that will change.
-global is used inside of functions in order to get access to the variables you have previously declared.
-init is used when come code has to be run before other code. For example, if you define a class, you want to make sure that is run before you declare any classes. Generally I put all my class and function definitions inside init blocks.
-The only different between $ and python is that $ is for only one line, and python can be used for a block.

I’ll put in some code as an example in a few seconds.

A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels—On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)

Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto … 51&t=21978


User avatar

Imperf3kt

Lemma-Class Veteran
Posts: 3677
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#3

Post

by Imperf3kt » Mon Jul 16, 2018 11:11 pm

I suspect, since you have defined «deckOfCards» as a list, that the items in your list are undefined, and so, «devkOfCards», is still undefined. Try defining A, B, C, D and E

*Disclaimer*
I am an absolute novice when it comes to Python, I mostly get by, by reading documentation but never actually fully understanding it.

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI — Updated occasionally
Twitter
Imperf3kt Blackjack — a WIP blackjack game for Android made using Ren’Py


User avatar

trooper6

Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#4

Post

by trooper6 » Mon Jul 16, 2018 11:24 pm

So create a brand new project and but this code in a fresh script.rpy file.
It works and should show you all these commands in context.

Code: Select all

define p = Character('Perry')

define days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] #This is a define because it won't change
default current_day = 0 #This is a default because it will change during the course of the game
default gold = 0 #This is a default because it will change during the course of the game

init python:
    def advanceDay(): #this is a function that needs to be defined before anything else so it goes into and init. It is also python code.
        global current_day #we want this function to be able to have access to the global current_day rather than create its own, so we use global here
        global gold #we want this function to be able to have access to the global gold rather than create its own, so we use global here
        gold += 10
        if current_day == 6:
            current_day = 0
        else:
            current_day +=1

screen info(): #Here is a screen where we want to display the day and the gold.
    frame:
        xalign 1.0
        yalign 0.0
        vbox:
            text "Current Day: {0}".format(days[current_day]) #screens can have for loops and also do python style string interpolation
            text "Gold: [gold]" #screens can also do Renpy style string interpolation

## The game starts here.

label start:
    scene bg underpassD
    show screen info()
    p "Hello! What day is it? Right now?"
    $p("It is {0}".format(days[current_day])) #if you want to to python style string interpolation, which you do if you want to access list elements, use a python equivalent for the say statement
    p "I have [gold] gold pieces." #if you are using Renpy style string interpolaiton you don't need a python equivalent
    $advanceDay() #Calling a function is a python statement, so you know $
    p "What day is it now?"
    $p("It is {0}".format(days[current_day]))
    p "I have [gold] gold pieces."
    $advanceDay()
    p "We are advancing a day! [current_day]"
    $advanceDay()
    p "We are advancing a day! [current_day]"
    $advanceDay()
    p "We are advancing a day! [current_day]"
    $advanceDay()
    p "We are advancing a day! [current_day]"
    $advanceDay()
    p "We are advancing a day! [current_day]"
    $advanceDay()
    p "We are advancing a day! [current_day]...just so you can see the rollover. You are looking at the screen in the top right, correct?"
    p "Okay, game over."


    return

You may also want to look at the documentation that describes default, define, etc: https://www.renpy.org/doc/html/python.html#python

A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels—On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)

Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto … 51&t=21978


User avatar

LiveTurkey

Regular
Posts: 107
Joined: Tue Dec 27, 2016 10:50 pm
Location: Brooklyn
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#5

Post

by LiveTurkey » Tue Jul 17, 2018 12:28 am

trooper6 wrote: ↑

Mon Jul 16, 2018 11:24 pm


So create a brand new project and but this code in a fresh script.rpy file.
It works and should show you all these commands in context.

You may also want to look at the documentation that describes default, define, etc: https://www.renpy.org/doc/html/python.html#python

Are variable defined in labels or screen local only to that label/screen? What about a variable defined in the start label?

What is a label and what is a screen in python terms? Is it a function?

Can you use global variable in labels and screens?


User avatar

trooper6

Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#6

Post

by trooper6 » Tue Jul 17, 2018 12:36 am

Don’t define variables inside of labels. Define your variables outside of any block using define or default.

If you define a variable inside a screen, that is called a screen variable and it is local only: https://www.renpy.org/doc/html/screens.html#default

labels and screens aren’t python things, they are Ren’Py things…so I don’t tend to try to think of them as python things.

Can you use global variable in labels and screens? If I understand you correctly, yes…and I do in the code I provided. I declared the variable gold, for example, and used it inside the start label and the info screen.

A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels—On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)

Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto … 51&t=21978


User avatar

xavimat

Eileen-Class Veteran
Posts: 1459
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#7

Post

by xavimat » Tue Jul 17, 2018 5:36 am

Your first attempt was almost correct. It had only one error: the init word.
This code works:

Code: Select all

default deckOfCards = ['A', 'B', 'C','D','E']
label game:
    ...
    python:
    	...
        for k in deckOfCards:
        ...

Note that I only have changed one simple thing: I’ve deleted the «init» word in the «python» line.

When you tell renpy to execute something in «init», then it executes before the main menu, even if you have placed it (mistakenly) «inside» a label. If the word «init» is there, it is executed at init time, no matter what. Your error was that the «init python» block was executed before the default (or define), so the variable was not still defined.

Try not to mix renpy language and python language. Actually, renpy includes three languages: for labels, for screens and ATL.

All variables defined in labels, default, define or init are global in renpy. Only variables defined inside screens are local to the screen.


User avatar

LiveTurkey

Regular
Posts: 107
Joined: Tue Dec 27, 2016 10:50 pm
Location: Brooklyn
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#8

Post

by LiveTurkey » Tue Jul 17, 2018 1:31 pm

xavimat wrote: ↑

Tue Jul 17, 2018 5:36 am


Your first attempt was almost correct. It had only one error: the init word.
This code works:

Code: Select all

default deckOfCards = ['A', 'B', 'C','D','E']
label game:
    ...
    python:
    	...
        for k in deckOfCards:
        ...

Note that I only have changed one simple thing: I’ve deleted the «init» word in the «python» line.

When you tell renpy to execute something in «init», then it executes before the main menu, even if you have placed it (mistakenly) «inside» a label. If the word «init» is there, it is executed at init time, no matter what. Your error was that the «init python» block was executed before the default (or define), so the variable was not still defined.

Try not to mix renpy language and python language. Actually, renpy includes three languages: for labels, for screens and ATL.

All variables defined in labels, default, define or init are global in renpy. Only variables defined inside screens are local to the screen.

Yep that fixed it.

On a slightly unrelated note, does order ever matter? Does a screen have to be above the area it was called (in code)? Out of labels, screens, functions, etc does order matter for any of them?



User avatar

xavimat

Eileen-Class Veteran
Posts: 1459
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#10

Post

by xavimat » Tue Jul 17, 2018 6:32 pm

LiveTurkey wrote: ↑

Tue Jul 17, 2018 1:31 pm

On a slightly unrelated note, does order ever matter? Does a screen have to be above the area it was called (in code)? Out of labels, screens, functions, etc does order matter for any of them?

Order only matters in every phase:
— In init phase: init, define, default, image are executed. If you have different files with these, the order is (almost) alphabetical (unicode-order, actually). So the init phase of a «definitions.rpy» file will be executed before the init phase of a «script.rpy» file.
Better don’t use double zero at the start of your filenames («00mydefinitions.rpy»), because renpy uses that to ensure that its definitions are executed before yours.
You can use a number init 2: or init -5 python: if you need, for example, custom classes defined before subclasses. But this is only useful in very complex games with a lot of definitions, if you can have your classes in one file, put them in the logical order you need.

— screens (and transforms) are read by renpy but not executed until some label triggers them (with show screen or call screen) Screens can be predicted, so the code inside the screen shouldn’t have side effects (like changing directly a global variable or calling directly a function; that can be done with Actions).

— labels are executed in the order you decide. Usually, label start is the first one, and then, with jump or call, the flow of the program goes on.
Some people puts labels after labels without explicit jumping. Renpy will go on to the next line if a label ends, but I think this is not good practice:

Code: Select all

label start:
    "something"
label chapter_1:
    "More something"
label chapter_2:
    "The last something"
    "END"
    return

I prefer to put a jump even if it’s obvious. I can reorganize labels in the future without breaking anything. And maybe add some small branching in there.

Code: Select all

label start:
    "something"
    jump chapter_1
label chapter_1:
    "More something"
    jump chapter_2
label chapter_2:
    "The last something"
    "END"
    return

When your game grows, rpy files can be split to have things in order and easy to find. I usually create a «definitions.rpy» file and put there all my defaults, defines and init. And other myscreens.rpy with customs screens. But it’s up to you and your type of game. For example, a file «battle.rpy» can hold all the mechanics of the combat if your game has it. I use a «connect.rpy» file in my projects with Internet connection. And so on.


User avatar

Imperf3kt

Lemma-Class Veteran
Posts: 3677
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: What is the difference between default, define, global, python, init, and $?

#11

Post

by Imperf3kt » Tue Jul 17, 2018 8:14 pm

xavimat wrote: ↑

Tue Jul 17, 2018 6:32 pm


— labels are executed in the order you decide. Usually, label start is the first one, and then, with jump or call, the flow of the program goes on.
Some people puts labels after labels without explicit jumping. Renpy will go on to the next line if a label ends, but I think this is not good practice:

Code: Select all

label start:
    "something"
label chapter_1:
    "More something"
label chapter_2:
    "The last something"
    "END"
    return

I prefer to put a jump even if it’s obvious. I can reorganize labels in the future without breaking anything. And maybe add some small branching in there.

Code: Select all

label start:
    "something"
    jump chapter_1
label chapter_1:
    "More something"
    jump chapter_2
label chapter_2:
    "The last something"
    "END"
    return

When your game grows, rpy files can be split to have things in order and easy to find. I usually create a «definitions.rpy» file and put there all my defaults, defines and init. And other myscreens.rpy with customs screens. But it’s up to you and your type of game. For example, a file «battle.rpy» can hold all the mechanics of the combat if your game has it. I use a «connect.rpy» file in my projects with Internet connection. And so on.

To an extent, its actually very useful for looping or returning to a reused label.
In my opinion, depending on how ypur game is structured, it is only necessary for the replay feature, to add jumps and returns to labels that directly flow into the next.

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI — Updated occasionally
Twitter
Imperf3kt Blackjack — a WIP blackjack game for Android made using Ren’Py


Egoexpress


  • #1

I used to live in London, have never got familiar with the term «init» as a tag question. I still catch myself using it, and after having used it , I always wonder what it is.

I inclined to say «init» when I’m asking someone whom I know well to agree with me.

Like,

It’s a good film,init Joe? meaning isn’t it, don’t you agree with me?

Where does this come from? Is it only used in England or some other places? How would AE speakers react when they hear this?

Thank you very much,

    • #2

    It’s lazy speech for ‘isn’t it?’ Most people would understand it, but educated people would be reluctant to use it.

    ewie


    • #3

    :eek:
    Hello Ego. I can’t imagine how AE-speakers would react to a sentence like:
    We’s off the shops tomorrow, innit? [= We’re going to the shops tomorrow, aren’t we?]
    But I can tell you that in the UK, among a huge swathe of the population aged over (say) 20, there is

    quite a lot

    of consternation when this kind of thing is uttered. I imagine a lot of us old fogeys swallow our dentures, get an attack of the vapours, write indignant letters to The Times, and so on and so forth.

    Oops ~ I’m on the ‘Go advanced’ screen and have forgotten the question:eek:

    EDIT (after re-reading question): Actually, your sentence doesn’t sound all that bad to me ~ as TT says, it’s just a ‘lazy’ pronunciation of isn’t it. At least in your sentence it’s the right tag, though! In my ‘shops’ example ~

    far from rare in the UK

    ~ it’s rather like French n’est-ce pas: i.e. literally isn’t it but can be used after pretty well any verb. Unfortunately this sounds barbarous to many of us in English.

    Egoexpress


    • #4

    :)
    I was going to say «Is it that awful»?

    Anyways, in what context would it be that terrible as you mentined before, ewie?

    JamesM


    • #5

    It’s not a completely unusual thing to hear in the U.S., I would say, but it sounds sloppy. It would not be something I’d expect a professional, a teacher, an executive, or a lawyer to say, for example. It’s very, very casual and only used by some people, almost like a verbal tic. Whether the source of it is regional, economical or dialectic, I have no idea.

    ewie


    • #6

    ‘N’est-ce pas’ version: I would say that unless it was being used by one 15-year old in conversation with another 15-year old it would sound, at the very best, ‘inappropriate’, at the very worst, ‘downright ridiculous’. [And having thought about it a while longer, it seems to me that

    this

    English innit has a

    lot

    less meaning than French n’est-ce pas: it is, to borrow a term from JamesM, a verbal tic, a mere noise tacked on to the end of a sentence.]
    The ‘Isn’t it’ version I can imagine being used a lot more widely (in BE), in rapid-fire informal speech, by all kinds and ages of folk.

    • #7

    In some circles in AE, we would hear «ain’t it?»

    Egoexpress


    • #8

    I’m absolutely satisfied with your answers, if you were in retail I would pay for this.;) See you later.

    • #9

    I just thought of:

    «Iddn it»

    Sloppy way of saying «isn’t it».

    ewie


    • #10

    You could always just pay us anyway, Ego:D

    panjandrum


    • #12

    it means «isn’t it» — came to English through Indian English where there is a question tag meaning «isn’t it (true)» or «isn’t it (the case)» but recently we have started tagging «isn’t it» or «innit» in contexts where (without the «true»/»the case» etc at the end) it doesn’t make sense grammatically

    hope that helps

    Cagey

    post mod (English Only / Latin)


    • #13

    It’s not a completely unusual thing to hear in the U.S. [….] Whether the source of it is regional, economical or dialectic, I have no idea.

    «Innit» is used by the Native American Indians of the *Spokane/Coeur d’Alene area, as in the stories of Sherman Alexie and his movie «Smoke Signals».

    *That is, they live in the northwest section of the US.

    alexacohen


    • #14

    From a very foreigner’s point of view:

    I’ve only seen it written, whenever the author wanted to convey that the character was, er, not very cultured.
    So, if I heard someone actually say it, I would think the person was, er, not very cultured.

    • #15

    As most people have correctly identified «innit» is a shortened and somewhat crude way of saying ‘isn’t it’. «Ain’t it» is a similar one, but not deemed quite as ‘common’. ;)

    I don’t really want to indoctrinate you with social prejudice — I’ll just give you some background to why it is ‘that awful’. It can be seen as almost synonymous with ‘chavs’ (well, as far as I can tell, in this area of Britain at least) — that alexacohen correctly identifies as not particularly ‘cultured’ people. In fact, there is at least some consensus that ‘chavs’ are any youths that constantly use ‘innit’ as an interjection, regardless of whether it makes sense or not. I know this, because I wasn’t exactly born that long before the ‘innit’ generation. Although it probably depends on where about in the country you are. :)

    • #16

    The Welsh have always used ‘isn’t it?’ as a tag question.

    «Blodwen’s pregnant, isn’t it?»

    «We’ll beat the English at Twickenham, isn’t it?»

    cirrus


    • #17

    Speaking as someone who lives and works in East London I can report that innit is going out of fashion. Flavour of the month is «is it?»
    On Monday I told someone at the lights their brake light wasn’t working. The princely two word response was: «Is it?»
    Boy was I pleased I was on my bike so I could pedal off and giggle, secure in the knowledge the witless twit who said it wouldn’t hear me laughing my head off in the rush hour traffic.

    ewie


    • #18

    The Welsh have always used ‘isn’t it?’ as a tag question.

    «Blodwen’s pregnant, isn’t it?»

    «We’ll beat the English at Twickenham, isn’t it?»

    I think this is one of those crossover things between Welsh and English, to do with the way Welsh verbs work:
    It’s going to the pub I am, isn’t it?
    Maybe a bit exaggerated there …

    • #19

    Speaking as someone who lives and works in East London I can report that innit is going out of fashion.

    I’m extremely pleased to read that!!

    The use of innit in England was, as far as I’m aware, restricted to East London, until Martin Amis published

    London Fields

    . In this book, the main character terminates every second sentence with it. The book had the unfortunate side-effect of spreading the disease to other parts of the country.

    Loob


    • #20

    The use of innit in England was, as far as I’m aware, restricted to East London

    I don’t think it was [is].

    • #21

    OK, Loob, would you accept «…of innit in England, when used to mean something other than (literally) isn’t it, was, …»
    Anyway, with those pigtails, you don’t look old enough to remember the time before Martin Amis. :D

    cirrus


    • #22

    I just love the idea that Martin Amis can spread anything, let alone low status speech patterns. Innit / Is it has become a crutch, a filler. It’s as though there is an overwhelming urge to follow the ¿no?/ n’est — ce pas?

    As a linguist I particularly enjoy it when innit is used as a tag where it just doesn’t fit and shows this urge to fly free of any grammatical convention. It gives us some marvellous constructions that make me want to laugh out loud eg

    the bin men are coming today innit
    tonight we’re going pizza innit
    he didn’t ought to have done that innit

    ewie


    • #23

    Anyway, with those pigtails, you don’t look old enough to remember the time before Martin Amis. :D
    If only you knew, Lexi, you’d be astonished:eek:

    It gives us some marvellous constructions that make me want to laugh out loud

    Yes, they are often hilarious.
    In the recent The Armstrong and Miller Show* on the BBC they had two WW2 British airmen (you know, the Richard Attenborough / John Mills type) who spoke this kind of (erm) twaddle. And sure enough, if my memory serves me, their favourite tag was indeed izzit? rather than innit? The incongruity of these two stiff-upper-lippers talking like that had me in tears of laughter.

    *Yes, sorry, I have mentioned this before.

    Loob


    • #24

    OK, Loob, would you accept «…of innit in England, when used to mean something other than (literally) isn’t it, was, …»

    Hi Lexi

    Sorry I was so cryptic in post 20. What I had in mind was that there are traditional English dialects (including those of Devon and Corwall) which use all-purpose «innit». I’ve spent some time googling this afternoon, but can’t find much discussion of this, other than passing references such as:

    The use of the interrogative «innit» at the end of the sentence has been attributed to the influx of both Asian and Caribbean words, but may have spread so rapidly because it has similarities with speech patterns among people in Wales and South-west England. (source)

    Originally Posted by Lexiphile
    Anyway, with those pigtails, you don’t look old enough to remember the time before Martin Amis. :D
    If only you knew, Lexi, you’d be astonished:eek:

    How cruel, ewie! The fact that I am a bald nonagenarian was imparted to you in strictest confidence…

    • #25

    I pronounce «isn’t it» as «iddn it» about as often as I say «gonna» for «going to», but I have never written «iddn» until just now. I would never use it in place of anything except «isn’t it». But «haddn it» (first time I’ve written this one too) works for both «hasn’t it» and «hadn’t it».

    • #26

    Hi
    Some of my friends living in Australia speak like this:
    — You are from Turkey, is it?
    — We can do it better if we keep practicing, isn’t it?
    In standard English, this is not grammatically correct. Is it acceptable in conversational communications in Australian English? Have you heard people saying this way?

    Please verify this. My friends are not native English speakers, by the way.
    Thank you.

    ewie


    • #27

    Hello Ling. I’ve added your question to the end of this previous thread which deals with the same phenomenon.

    ~ewie, moderator:)

    Definitions.net

    WiktionaryRate this definition:2.3 / 3 votes

    1. initverb

      Abbreviation for initialize.

    FreebaseRate this definition:3.0 / 4 votes

    1. init

      In Unix-based computer operating systems, init is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct or indirect ancestor of all other processes and automatically adopts all orphaned processes. Init is started by the kernel using a hard-coded filename, and if the kernel is unable to start it, a kernel panic will result. Init is typically assigned process identifier 1.
      The design of init has diverged in Unix systems such as System III and System V, from the functionality provided by the init in Research Unix and its BSD derivatives. The usage on most Linux distributions is somewhat compatible with System V, but some distributions, such as Slackware, use a BSD-style and others, such as Gentoo, have their own customized version.
      Several replacement init implementations have been written with attempt to address design limitations in the standard versions. These include systemd and Upstart, the latter being used by Ubuntu and some other Linux distributions.

    How to pronounce init?

    How to say init in sign language?

    Numerology

    1. Chaldean Numerology

      The numerical value of init in Chaldean Numerology is: 2

    2. Pythagorean Numerology

      The numerical value of init in Pythagorean Numerology is: 7

    Popularity rank by frequency of use


    Translation

    Find a translation for the init definition in other languages:

    Select another language:

    • — Select —
    • 简体中文 (Chinese — Simplified)
    • 繁體中文 (Chinese — Traditional)
    • Español (Spanish)
    • Esperanto (Esperanto)
    • 日本語 (Japanese)
    • Português (Portuguese)
    • Deutsch (German)
    • العربية (Arabic)
    • Français (French)
    • Русский (Russian)
    • ಕನ್ನಡ (Kannada)
    • 한국어 (Korean)
    • עברית (Hebrew)
    • Gaeilge (Irish)
    • Українська (Ukrainian)
    • اردو (Urdu)
    • Magyar (Hungarian)
    • मानक हिन्दी (Hindi)
    • Indonesia (Indonesian)
    • Italiano (Italian)
    • தமிழ் (Tamil)
    • Türkçe (Turkish)
    • తెలుగు (Telugu)
    • ภาษาไทย (Thai)
    • Tiếng Việt (Vietnamese)
    • Čeština (Czech)
    • Polski (Polish)
    • Bahasa Indonesia (Indonesian)
    • Românește (Romanian)
    • Nederlands (Dutch)
    • Ελληνικά (Greek)
    • Latinum (Latin)
    • Svenska (Swedish)
    • Dansk (Danish)
    • Suomi (Finnish)
    • فارسی (Persian)
    • ייִדיש (Yiddish)
    • հայերեն (Armenian)
    • Norsk (Norwegian)
    • English (English)

    Word of the Day

    Would you like us to send you a FREE new word definition delivered to your inbox daily?


    Citation

    Use the citation below to add this definition to your bibliography:

    Are we missing a good definition for init? Don’t keep it to yourself…

    Image or illustration of

    init

    init

    Credit »

    Browse Definitions.net

    Quiz

    Are you a words master?

    »

    a central point or locus of an infection in an organism
    • A. nidus

    • B. epiphora

    • C. preponderance

    • D. chin-wag

    Nearby & related entries:

    • inishmore
    • inishowen
    • inisle
    • inist
    • inistioge
    • init.
    • inite
    • initech
    • initgame
    • initiable

    Alternative searches for init:

    • Search for Synonyms for init
    • Search for Anagrams for init
    • Quotes containing the term init
    • Search for Phrases containing the term init
    • Search for Poems containing the term init
    • Search for Scripts containing the term init
    • Search for Abbreviations containing the term init
    • What rhymes with init?
    • Search for Song lyrics that mention init
    • Search for init on Amazon
    • Search for init on Google

    The dataengine will only load your plugin and thus call init () if the asked for comic strip has not been cached.comic. requestPage (url, id, metadata) ❋ Mat69 (2010)

    I am worried > that if this is happening in the session scope it is also happening with > other cfc’s in the application scope, such as when I call their init > functions within a request — is it possible that it will alter the data for > other requests if they are accessing the cfc at the same time? ❋ Unknown (2010)

    The name init () is just a convention; other programmers might choose different names for an initialization function or they might forget to call that function. ❋ Unknown (2010)

    Since its contents must be set in order for createChildren to work, it is necessary for the Mediator to call the init method before adding URLView to the display list. ❋ Algorithmist (2010)

    In C++03, the common workaround is to define a private member function called init (). ❋ Unknown (2010)

    This constructor first calls init () and then sets the label text. ❋ Unknown (2010)

    After Plasma has constructed and initialised the applet, Plasma will call the init method on the applet to let it continue setting itself up. ❋ 83.191.119.57 (2009)

    They are also stored by the init process and can be retrieved by calling init: get_plain_arguments / 0. ❋ Unknown (2009)

    Unless otherwise specified, all other flags are user flags, for which the values can be retrieved by calling init: get_argument / 1. ❋ Unknown (2009)

    The latter can be retrieved by calling init: get_argument / 1. ❋ Unknown (2009)

    The directory will include one file called init (Dir, MaxBytes, MaxFiles, Pred) — > Args ❋ Unknown (2009)

    Note: I actually had to place the script block in the HTML head for the ajaxOnLoad () function to call the init method. ❋ Unknown (2008)

    I then located a member function called init () and selected Go To Declaration … upon which it brought up a list of about five dozen random unrelated init () functions throughout my app, like VS2005 often does. ❋ Unknown (2008)

    Malapit na rin ang tag init Karen, mga June July … hirap nga nyan, kelan ka ba mangananak? manganganak na rin yung bunsong kapatid ko mga first week of May daw …. good luck! ❋ Unknown (2009)

    The world state is initially produced by an ‘init‘ function. ❋ AshleyF (2010)

    Ultimately the last three functions ( ‘init‘, ‘tick’ and ‘draw’) represent the simulation. ❋ AshleyF (2010)

    Initialization methods often take arguments to allow particular values to be passed and have keywords to label the arguments (initWithPosition: size:, for example, is a method that might initialize a new Rectangle instance), but they all begin with «init«. ❋ Banane (2010)

    Your mainboard might require a special «init» sequence to allow ROM writes, which is likely not documented anywhere and flashrom probably doesn’t know about. ❋ Unknown (2010)

    It have a lot of way to shutdown / reboot your machine, the easier way is using shutdown button in gnome or KDE menu; p The another way is using ‘init‘ which already intro in Shutdown Using ‘init‘. ❋ Unknown (2009)

    [roodboy] 1:init man, that [war] [well good]
    roodboy 2:yeah, it was hecktick init ❋ I Am Lysdexic (2004)

    [Init] [cold] here? ❋ Gumba Gumba (2004)

    bob: [that man] is such a [wanker]
    [wendy]:init ❋ Tara05 (2005)

    1
    ME — ‘I went to the store’
    U — ‘innit’
    Me — ‘ Bought some [milk and bread] and smokes and went home, watched BB on TV’
    U — ‘innit’
    2
    » So me was out with me boys, [innit], and [we was] going to get some beers, innit, when this guy, yeah, like comes up to us, yeah, innit, and he was like Gimme some change, we was like, innit» ❋ Hoki (2004)

    /sbin/init 6 (This would [restart] [the system]) ❋ Matt (2004)

    [Hubby]: «I’ve had a crap day, [roofers], arsehole bosses, traffic, more traffic….»
    [Essex] Wife: «init» ❋ Patch (2004)

    I have two words for you:
    Keep It real
    ==That’s three words!==
    Nah, [i’] ain’t, coz it ain’t a real [wurd], it iz short for ‘init‘… init?
    Ali [Gumba] ‘INDAHOUSE’ ❋ Gumba Gumba (2004)

    [Chavs] and [Ali G] will use this term in phrases such as: ‘Init man!’ , ‘its well [buzzin] init!’ , ‘well bad init ❋ JNDKS (2006)

    [nice car], init?! ❋ Unkown Sender (2004)

    Cold out today, init?
    [Snowboarding] in [Canada] is far better than in [UK] init? ❋ Sidekick (2008)

    Class objects support two kinds of operations: attribute references and instantiation

    Attribute references use the standard syntax used for all attribute references in Python: obj.name. Valid attribute names are all the names that were in the class’s namespace when the class object was created. So, if the class definition looked like this:

    class MyClass:
        """A simple example class"""
        i = 12345
    
        def f(self):
            return 'hello world'
    

    then MyClass.i and MyClass.f are valid attribute references, returning an integer and a function object, respectively. Class attributes can also be assigned to, so you can change the value of MyClass.i by assignment. __doc__ is also a valid attribute, returning the docstring belonging to the class: «A simple example class».

    Class instantiation uses function notation. Just pretend that the class object is a parameterless function that returns a new instance of the class. For example:

    x = MyClass()
    

    The instantiation operation (“calling” a class object) creates an empty object. Many classes like to create objects with instances customized to a specific initial state. Therefore a class may define a special method named __init__(), like this:

    def __init__(self):
        self.data = []
    

    When a class defines an __init__() method, class instantiation automatically invokes __init__() for the newly-created class instance. So in this example, a new, initialized instance can be obtained by:

    x = MyClass()
    

    Of course, the __init__() method may have arguments for greater flexibility. In that case, arguments given to the class instantiation operator are passed on to __init__(). For example,

    class Complex:
        def __init__(self, realpart, imagpart):
            self.r = realpart
            self.i = imagpart
    
    x = Complex(3.0, -4.5)
    x.r, x.i
    

    Taken from official documentation which helped me the most in the end.


    Here is my example

    class Bill():
        def __init__(self,apples,figs,dates):
            self.apples = apples
            self.figs = figs
            self.dates = dates
            self.bill = apples + figs + dates
            print ("Buy",self.apples,"apples", self.figs,"figs 
                    and",self.dates,"dates. 
                    Total fruitty bill is",self.bill," pieces of fruit :)")
    

    When you create instance of class Bill:

    purchase = Bill(5,6,7)
    

    You get:

    > Buy 5 apples 6 figs and 7 dates. Total fruitty bill is 18  pieces of
    > fruit :)
    

    In Unix or Linux-based operating systems, init, short for initialization, is the first process during the booting of a computer system that runs until the system is shut down. Init is a daemon process executed by the kernel and is the last step of the kernel boot sequence. Its principal role is to create processes from a script stored in the /etc/inittab file. It also controls independent processes required by any particular system.

    In simplest terms, the job of init is to get everything running the way it should be once the kernel is fully running. It essentially establishes and operates the entire user space.

    After the /etc/inittab is read, init determines how the system in each runlevel should be set up as well as the set default runlevel. Runlevel is a software configuration that allows only a selected group of processes to exist. These processes are defined in the /etc/inittab file.

    Init runlevels

    Init can be one of eight runlevels: 0-6, S, or s, although the runlevel can be changed if needed. It’s worth noting S and s are the same and are not meant to be used directly but only for the scripts that are executed when entering runlevel 1.

    The functions of runlevels are as follows:

    • 0: Halts the system
    • 1: Gets the system down into single user mode
    • 2: Gets multiuser mode without networking
    • 3: Gets multiuser mode with networking
    • 4: Not used
    • 5: Gets multiuser with networking and X windows
    • 6: Reboots the system

    After init is invoked as the last step of the kernel boot sequence, the /etc/inittab file is looked for to see if an entry of the type initdefault is present, which determines the initial runlevel of the system. If it’s not present, a runlevel must be entered at the system console.

    By default most Linux-based systems boot to runlevel 3 or 5. After the default runlevel is set, init starts all background processes. Init must start all necessary daemons, background processes, and services required such as starting up a boot screen, various parts of the networking stack, and hardware in the machine.

    Macs also used the term init before System 7 to refer to system extensions.

    present when the mode attribute value is init, removed, updated, attrsUpdated, or added.

    context icon

    Этот атрибут присутствует, когда значением атрибута mode является init, removed, updated или added.

    present when the mode attribute value is init.

    context icon

    Этот атрибут присутствует, когда значением атрибута mode является init.

    present when the mode attribute value is init.

    context icon

    Эти атрибуты присутствуют, когда значением атрибута mode является init.

    present when the mode attribute value is init.

    context icon

    Этот атрибут присутствует, когда значением атрибута mode является init.

    If the attribute value is init then the messages attribute specifies the total

    number of messages in the Folder, and the unseen attribute specifies the total number of unseen messages(messages without the Seen flag) in the Folder.

    context icon

    Если значением атрибута является init, то атрибут messages указывает общее число

    сообщений в Представлении папки, а атрибут unseen указывает общее число непрочитанных сообщений( сообщений без флага Seen) в Представлении папки.

    context icon

    The OnInit() function is the Init event handler.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    MX-15 moved to the new Debian Stable»Jessie» using systemd-shim,

    meaning that systemd

    is

    installed but the default init is sysvinit.

    context icon

    MX- 15 переходит на базу нового Debian Stable« Jessie», и использует systemd- shim, что означает,

    что systemd установлен, но init по умолчанию является sysvinit.

    Like git init, cloning is generally a one-time operation.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    The apache2 file located in/etc/conf.d is Gentoo’s init script configuration file.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    Файл apache2, находящийся в/ etc/ conf. d, является конфигурационным файлом для Gentoo init— скрипта.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    Process ID 1 is usually the init process primarily responsible for starting and shutting down the system.

    context icon

    Процесс 1- обычно является процессом init, ответственным за запуск и остановку системы.

    The init process is special: It does not get signals

    that it does not want to handle, and thus it can ignore SIGKILL.

    context icon

    Процесс init является особым случаем- он не получает от операционной

    системы сигналов, которые он не хочет обрабатывать, и, следовательно, может игнорировать SIGKILL.

    The server startup script is created as/sbin/init.

    context icon

    Будет создан сценарий запуска сервера/ sbin/ init.

    The user-defined function is first called from the special function init.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    Note: This action mustn’t

    be

    placed in an admin_init action function,

    because the admin_init action is called after admin_menu.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    Примечание: Этот экшен не должен размещаться в экшен- функции admin_ init, потому что экшен admin_ init вызывается уже после admin_ menu.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    Pay attention to the fact that init() is executed in a program only once.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    Any subsequent executions of/sbin/init are redirected to the original

    init.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    Любое последующее выполнение/ sbin/ init будет перенаправлено на исходный

    init.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    The top level configuration file for init

    is

    at/etc/inittab.

    context icon

    Главный файл конфигурации уровней для init-/ etc/ inittab.

    An exception from this exception is while

    init is

    ptraced on Linux.

    context icon

    Ввиду угрозы затопления был отбуксирован в Лайнесс.

    The best suiting place for it

    is

    the special function init.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    Наиболее подходящее для этого место в программе- специальная функция init.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    This file

    is

    read by the

    init

    startup script/etc/init.

    context icon

    Этот файл читается сценарием запуска/ etc/ init.

    In VB calling MemoryMappedFile_Init

    is

    no longer needed If you call does

    not give error.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    В VB вызова MemoryMappedFile_ Init больше не требуется Если вы звоните не

    дает ошибку.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    This file

    is

    read by the

    init

    startup script/etc/init. d/STLKCGPro.

    context icon

    Этот файл читается сценарием запуска/ etc/ init. d/ STLKCGPro.

    If the function init

    is

    not able to initialize an object,

    possibly a memory leak will occur.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    Если функция init не сможет инициализировать объект, то возможно произойдет утечка памяти.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    In commonly used programs,

    such an algorithm

    is

    very rare, because such init() usage

    is

    of little help.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    В реально используемых программах

    такой алгоритм встречается редко, потому что от такого применения init() мало пользы.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    In the analyzed program, the description of init()

    is

    the following.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    If there

    is

    no special init() function in a program, no actions will

    be

    performed at the program’s start.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    Если в программе нет специальной функции init(), то при запуске программы не выполняется никаких действий.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    After init()

    is

    executed, the program will

    be

    executed in the following manner.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    The destroy() method, like init(),

    is

    called only once in the lifecycle of a servlet.

    context icon

    За весь жизненный цикл метод init() вызывается только один раз.

    The distinct property of the special

    init()

    function is its execution at the program initialization.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    context icon

    Собственным свойством специальной функции init() является ее исполнение при запуске( инициализации) программы.

    icon https://st.tr-ex.me/img/material-icons/svg/open_in_new/baseline.svg

    Понравилась статья? Поделить с друзьями:
  • Is has a sight word
  • Is harrowing a word
  • Is harked a word
  • Is hardworking all one word
  • Is hard working all one word